This happened in [abc213d](https://atcoder.jp/contests/abc213/tasks/abc213_d).↵
↵
[Diffcheck](https://www.diffchecker.com/) between the two codes ([MLE](https://atcoder.jp/contests/abc213/submissions/25134347), [AC](https://atcoder.jp/contests/abc213/submissions/25134336)) shows that they are exactly the same, surprisingly though, the MLE code consumes about 1GB+ memory (and significantly greater time) whereas the AC one only consumes 250MB.↵
↵
It's been bugging me a lot, why would this happen, can anyone please help?↵
↵
Thanks in advance.
↵
[Diffcheck](https://www.diffchecker.com/) between the two codes ([MLE](https://atcoder.jp/contests/abc213/submissions/25134347), [AC](https://atcoder.jp/contests/abc213/submissions/25134336)) shows that they are exactly the same, surprisingly though, the MLE code consumes about 1GB+ memory (and significantly greater time) whereas the AC one only consumes 250MB.↵
↵
It's been bugging me a lot, why would this happen, can anyone please help?↵
↵
Thanks in advance.