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_20613747_19676.cpp:2:5: error: expected unqualified-id before numeric constant
     1024)    temp-=1024;                    ans=ans>temp?ans:temp;                }                printf("%d\n",ans);                continue;            }        }        else        {            flag=0;            ans=0;            for(i=0;i<5;i++)            for(l=0;l<5;l++)            for(j=0;j<5;j++)            {                if(i!=l && i!=j && l!=j)                {                    temp=num[i]+num[l]+num[j];                    if(temp%1024==0)                    {                        temp=0;                        for(k=0;k<5;k++)    if(k!=i && k!=l && k!=j)    temp+=num[k];                        while(temp>1024)    temp-=1024;                        ans=ans>temp?ans:temp;                        flag=1;                    }                }            }            if(flag)    printf("%d\n",ans);            else        printf("0\n");        }    }    return 0;}
     ^
0_0_20613747_19676.cpp:2:45: error: 'ans' does not name a type
     1024)    temp-=1024;                    ans=ans>temp?ans:temp;                }                printf("%d\n",ans);                continue;            }        }        else        {            flag=0;            ans=0;            for(i=0;i<5;i++)            for(l=0;l<5;l++)            for(j=0;j<5;j++)            {                if(i!=l && i!=j && l!=j)                {                    temp=num[i]+num[l]+num[j];                    if(temp%1024==0)                    {                        temp=0;                        for(k=0;k<5;k++)    if(k!=i && k!=l && k!=j)    temp+=num[k];                        while(temp>1024)    temp-=1024;                        ans=ans>temp?ans:temp;                        flag=1;                    }                }            }            if(flag)    printf("%d\n",ans);            else        printf("0\n");        }    }    return 0;}
                                             ^
0_0_20613747_19676.cpp:2:83: error: expected declaration before '}' token
     1024)    temp-=1024;                    ans=ans>temp?ans:temp;                }                printf("%d\n",ans);                continue;            }        }        else        {            flag=0;            ans=0;            for(i=0;i<5;i++)            for(l=0;l<5;l++)            for(j=0;j<5;j++)            {                if(i!=l && i!=j && l!=j)                {                    temp=num[i]+num[l]+num[j];                    if(temp%1024==0)                    {                        temp=0;                        for(k=0;k<5;k++)    if(k!=i && k!=l && k!=j)    temp+=num[k];                        while(temp>1024)    temp-=1024;                        ans=ans>temp?ans:temp;                        flag=1;                    }                }            }            if(flag)    printf("%d\n",ans);            else        printf("0\n");        }    }    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-11-26 14:31:53, Gzip enabled