KIMJONGOOF's blog

By KIMJONGOOF, history, 3 hours ago, In English

Below are 2 submissions I made for the above mentioned CSES problem.

Question link -> https://cses.fi/problemset/task/1158

AC submission -> https://cses.fi/problemset/result/10353320/

Runtime error submission -> https://cses.fi/problemset/result/10353300/

The only difference between the submissions is that in the AC submission, I commented out (#define int long long). Otherwise everything else is exactly the same.

Could someone explain why this happens? Is it some fault in my code? or something wrong with CSES website?

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
3 hours ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

btw, your submissions are not visible, but I think that, this is most likely due to a MLE kind of issue, cuz long long takes more memory than int, but I cannot say for sure, before seeing your code

for example assume, that you made a 1e4 x 1e4 array, so, a long long array of that size would be 64 * 1e8 bits => 800 mb (MLE) whereas, an int array would be 32 * 1e8 bits => 400 mb (limit is 512 mb, so it can pass)

ig you can check if something like this is happening...