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
|