plz help me figure out where i am doing mistake,the submission queue is showing runtime error
problem code:COPS
https://www.codechef.com/viewsolution/28407439
The sample testcase causes an out-of-bounds write at line 27 (Update - or maybe not):
for(k=a-c-1;k<a+c;k++)
cop[k]=1;
Edit:
And also line 20 (Update - this is definitely causing a problem):
for(k=0;k<a+c;k++)
cop[k]=1;
1 Like
Got it thank u sir…
1 Like