devilsliveon's blog

By devilsliveon, 13 years ago, In English

Can anyone please explain, why my code submitted against Problem B-Round 193 Div 2 is giving runtime error on Codeforces even though it works perfectly fine on my PC.

http://codeforces.me/submissions/devilsliveon

http://ideone.com/pgKga4

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

»
13 years ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

In function Absurd, variable j may be used uninitialized. Three lines below, you wanted to allocate n * sizeof(long long int) bytes, but you allocated only n * sizeof(int) bytes instead.