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_36695724_617.cpp:17:1: error: expected declaration before '}' token
 }cd[181];bool cmp(cube a,cube b){    if(a.l==b.l)    return a.w<b.w;    else    return a.l<b.l;}int dp[181];int main(){    int n,num=1,l,w,h;    while(~scanf("%d",&n)&&n){        int len=0;        for(int i=0;i<n;i++){            scanf("%d %d %d",&l,&w,&h);            cd[len++]=cube(l,w,h);            cd[len++]=cube(l,h,w);            cd[len++]=cube(h,l,w);            cd[len++]=cube(h,w,l);            cd[len++]=cube(w,l,h);            cd[len++]=cube(w,h,l);        }        sort(cd,cd+len,cmp);        dp[0]=cd[0].h;        int max_h;        for(int i=1;i<len;i++){            max_h=0;            for(int k=0;k<i;k++){                if(cd[k].l<cd[i].l&&cd[k].w<cd[i].w)                    max_h=max_h>dp[k]?max_h:dp[k];            }            dp[i]=max_h+cd[i].h;        }        max_h=0;        for(int i=0;i<len;i++){            if(max_h<dp[i])                max_h=dp[i];        }        printf("Case %d: maximum height = %d\n",num++,max_h);    }    return 0;}hdu
 ^


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 11:42:57, Gzip enabled