F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_19231137_2403.cpp: In function 'int main()':
0_0_19231137_2403.cpp:33:53: error: 's' was not declared in this scope
 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(
                                                     ^
0_0_19231137_2403.cpp:35:51: error: 's' was not declared in this scope
 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;}
                                                   ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-22 21:17:23, Gzip enabled