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_20614390_15092.cpp:4:5: error: 'y' does not name a type
     y.c;}int main(){    int n;    while(cin>>n)    {        for(int i=0;i<n;i++)        {            cin>>mapp[i].a>>mapp[i].b;            mapp[i].c=mapp[i].a-mapp[i].b;            mapp[i].id=i;        }        sort(mapp,mapp+n,cmp);        cout<<mapp[0].id;        for(int i=1;i<n;i++) cout<<" "<<mapp[i].id;        cout<<endl;    }    return 0;}
     ^
0_0_20614390_15092.cpp:4:9: error: expected declaration before '}' token
     y.c;}int main(){    int n;    while(cin>>n)    {        for(int i=0;i<n;i++)        {            cin>>mapp[i].a>>mapp[i].b;            mapp[i].c=mapp[i].a-mapp[i].b;            mapp[i].id=i;        }        sort(mapp,mapp+n,cmp);        cout<<mapp[0].id;        for(int i=1;i<n;i++) cout<<" "<<mapp[i].id;        cout<<endl;    }    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-28 21:27:19, Gzip enabled