You are viewing a single comment's thread. Return to all comments →
Didn't need to do it.
for( int i = 0 ; i < n ; i++)
{ scanf("%d", &a[i]); rc += a[i]; } for( int i = 0 ; i < n ; i++) { lc += a[i-1]; rc -= a[i]; if(lc == rc) { flag = 1; break; } } if(flag == 1) printf("YES\n"); else printf("NO\n"); }
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Array
You are viewing a single comment's thread. Return to all comments →
Didn't need to do it.
for( int i = 0 ; i < n ; i++)