为什么MLE开大数组后可以解决?

P2420 让我们异或吧

原代码中,我写的是: ```cpp struct edge { int to; int nex; int val; }e[maxn]; ``` 而后来我改成了: ```cpp struct edge { int to; int nex; int val; }e[maxn<<1]; ``` 却A了,原因至今是个谜
by first_fan @ 2019-09-18 00:09:59


@[first_fan](/space/show?uid=126484) 无向图边不开两倍的错怎么还有人犯(捂脸)
by StudyingFather @ 2019-09-18 00:26:37


原因可能是空间开小了会引起无限递归导致MLE
by Rhodoks @ 2019-09-18 00:41:56


数组越界在评测机上可能表现为 AC, WA, RE, TLE, MLE(
by fa_555 @ 2019-09-18 06:09:56


没事,反正把锅推给 UB 就对了(
by tiger0133 @ 2019-09-18 07:02:21


你存不下边的时候也会MLE
by zlnleo @ 2019-09-18 09:07:20


MLE其实大部分都是递归爆栈 数组开过大那种错误 应该没什么人会犯吧
by whyl @ 2019-09-18 09:10:50


@[first_fan](/space/show?uid=126484) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
by BrandonSoong @ 2019-10-05 23:50:38


@[BS一夏雪](/space/show?uid=117111) 你是魔鬼吗
by first_fan @ 2019-10-05 23:57:08


刚好做到2333,话说这道题被标记为树链剖分也太牵强了2333
by BrandonSoong @ 2019-10-06 00:12:32


|