无法运行?

P2014 [CTSC1997] 选课

@[kingofpupil](/space/show?uid=37637) 没有编译错误啊……
by CHENRUIJIE @ 2019-01-13 19:24:22


@[CHENRUIJIE](/space/show?uid=108875) 数据输进去会卡,然后停止工作
by kingofpupil @ 2019-01-13 19:28:07


@[kingofpupil](/space/show?uid=37637) 这种东西叫做RE
by CHENRUIJIE @ 2019-01-13 19:30:29


你的son有可能是-1,然而dp这个数组是不可能有dp[-1][X]这个东东的,所以是数组越界
by CHENRUIJIE @ 2019-01-13 19:31:41


@[CHENRUIJIE](/space/show?uid=108875) 所以为何RE
by kingofpupil @ 2019-01-13 19:31:54


@[kingofpupil](/space/show?uid=37637) sorry,我说错,应该是你这个work 函数死循环了
by CHENRUIJIE @ 2019-01-13 19:32:33


if (y==0||x==-1) return; if (dp[x][y]>0) return; int t=0; work(son[x][1],y); 这一段有错
by CHENRUIJIE @ 2019-01-13 19:33:12


@[CHENRUIJIE](/space/show?uid=108875) 欧
by kingofpupil @ 2019-01-13 19:33:52


@[kingofpupil](/space/show?uid=37637) 具体题目意思我没看懂(滑稽,我语文水平太差了),但是差错我还是懂那么一丢丢的
by CHENRUIJIE @ 2019-01-13 19:34:50


@[CHENRUIJIE](/space/show?uid=108875) 那son=-1时不是会在``` if (y==0||x==-1) return; ``` 里返回么
by kingofpupil @ 2019-01-13 19:37:09


| 下一页