### habib036's blog

By habib036, history, 2 months ago, ,

when run my code in my codeblocks ide,it gives perfect ans.. but when I submit it it gives 'uninitiaized value usage' and wrong answere..

my submition:75769281

how can i solve this problem??

• -12

 » 2 months ago, # |   -8 Here,I fixed it. https://codeforces.com/contest/1005/submission/75775687You were doing a[k+1] so the upper bound should be k
 » 2 months ago, # |   0 for(int k=0;k= a[k+1]). a[n] will show a garbage value unless you initialize it.