0_0_19230758_146.cpp: In function 'int main()':
0_0_19230758_146.cpp:28:186: error: 's' was not declared in this scope
int cc=1; while(scanf("%d",&n)!=EOF) { if(n == 0) break; lld sum=0; bool zero=true; for(int i=0;i<n;i++) { scanf("%I64d",&s[i]); s[i+n]=s[i]; sum+=s[i]; if(s[i] != 0) zero=false; } if(sum < 0) { printf("Case %d: -1\n",cc++); continue; } if(sum == 0 && !zero) { printf("Case %d: -1\n",cc++); continue; } lld ans=0; for(int i=0;i<n;i++) { lld now=0; for(int j=0;j<n;j++) { now+=s[i+j]; if(now < 0) { lld x=-now/sum; if(x*sum != -now) x++; ans+=x; } } } printf("Case %d: %I64d\n",cc++,ans); } return 0;}
^
0_0_19230758_146.cpp:28:650: error: 's' was not declared in this scope
int cc=1; while(scanf("%d",&n)!=EOF) { if(n == 0) break; lld sum=0; bool zero=true; for(int i=0;i<n;i++) { scanf("%I64d",&s[i]); s[i+n]=s[i]; sum+=s[i]; if(s[i] != 0) zero=false; } if(sum < 0) { printf("Case %d: -1\n",cc++); continue; } if(sum == 0 && !zero) { printf("Case %d: -1\n",cc++); continue; } lld ans=0; for(int i=0;i<n;i++) { lld now=0; for(int j=0;j<n;j++) { now+=s[i+j]; if(now < 0) { lld x=-now/sum; if(x*sum != -now) x++; ans+=x; } } } printf("Case %d: %I64d\n",cc++,ans); } return 0;}
^
|