trivial_pasta's blog

By trivial_pasta, history, 4 days ago, In English,

Im getting a runtime error on this code https://ideone.com/B5fTsx when I submit it the problem. But there are no such errors on ideone and atom. Here's the submission link : https://codeforces.com/contest/1271/submission/68835183 Can someone tell me why?

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

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by trivial_pasta (previous revision, new revision, compare).

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it
  int n,x,i,ar[n-1];

n is unknow yet, so ar[n-1] has undefined size.