You are viewing a single comment's thread. Return to all comments →
Pretty good, but one test case failed. Changing
if((q+1)<=N) a[q+1]-=sum;
to
if((q+1)<=N + 1) a[q+1]-=sum;
gets passed test case 1.
Seems like cookies are disabled on this browser, please enable them to open this website
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
Pretty good, but one test case failed. Changing
to
gets passed test case 1.