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_20614399_13495.cpp: In function 'int main()':
0_0_20614399_13495.cpp:9:599: error: expected statement at end of input
     using namespace std;long long n,w,h;long long sums[300600];long long sumout[350560];long long mins=50000*50000;int main(){    while(~scanf("%I64d%I64d%I64d",&n,&w,&h))    {        int aa;        long long sum=0;        long long sout=0;        for(int i=0;i<=n+w+w+1;i++)        {            sums[i]=sumout[i]=0;        }         mins=1234567891234;        for(int i=w;i<w+n;i++)         {             scanf("%d",&aa);             if(aa>h)                sout=sout+aa-h;             sumout[i]=sout;             sum=sum+aa;             sums[i]=sum;         }         for(int i=n+w;i<=n+w+w+1;i++)  //娉ㄦ涓涓㈢sum涔瑕存         {             sums[i]=sums[i-1];             sumout[i]=sumout[i-1];         }         if(sum<w*h)         {             printf("-1\n");             continue;         }         for(int i=1;i<=n+w-1;i++)         {              int tt=i+w-1;             int ss=i-1;            long long allout=sumout[tt]-sumout[ss];             long long allsum=sums[tt]-sums[ss];             if(allsum>=w*h)             {                 if(allout<mins)mins=allout;             }             else             {                 if(allout+w*h-allsum<mins)mins=allout+w*h-allsum;             }         }        printf("%I64d\n",mins);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
0_0_20614399_13495.cpp:9:599: error: expected '}' at end of input
0_0_20614399_13495.cpp:9:599: error: expected '}' at end of input


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-11-23 01:01:17, Gzip enabled