shadyman123's blog

By shadyman123, history, 7 months ago, In English,

Can someone please tell me why i am getting a runtime error in this code? Link : https://codeforces.com/contest/1141/submission/51500442 Problem link : https://codeforces.com/contest/1141/problem/C

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

»
7 months ago, # |
Rev. 3   Vote: I like it +3 Vote: I do not like it

ans[i] can be larger than n so RTE. Your code with modify: 51565447

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it