Mfchenone's blog

By Mfchenone, history, 5 years ago, In English

I am working on this problem: link.

I get the correct answer on the first example, and here is the submission: 61187097

Can anyone tell me the reason?

Thanks!

  • Vote: I like it
  • -11
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I runned your solution in my local machine and got WA, AddressSanitizer got an error in your solution, maybe you can check this must be the reason behind this undefined behavior in your code.

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Undefined behavior can cause execution differences between systems, especially between different operating systems/compilers.