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_23051436_16998.cpp: In function 'long long int solve()':
0_0_23051436_16998.cpp:30:126: error: expected statement at end of input
         while(tail-1 >= head && (s[tail].x - s[tail-1].x)*(p.y - s[tail].y) - (s[tail].y - s[tail-1].y) *(p.x - s[tail].x) <0)//while (tail >= head...            tail --;        s[++tail] = p;        while (head <= tail && (temp = s[head].y - 2*a[i]*s[head].x+a[i]*a[i] + C,temp < f[i]||f[i] == -1))//while(temp = s[head].y - 2*a[i]*s[head].x+a[i]*a[i] + C,temp < f[i]||f[i] == -1)        {            f[i] = temp;            head++;        }        head--;    }    return f[N];}int main(){    //freopen("test.txt","r",stdin);    while(scanf("%d%d",&N,&C),N+C)    {        a[0] = 0;//a[0] = f[0] = 0;        for(int i = 1;i <= N;i++)            scanf("%d",&a[i]);        memset(f,-1,sizeof(f));        f[0] = 0;        printf("%I64d\n",solve());    }    return 0;}
                                                                                                                              ^
0_0_23051436_16998.cpp:30:126: error: expected '}' at end of input
0_0_23051436_16998.cpp:30:126: 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-26 14:17:08, Gzip enabled