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_20612466_24680.cpp:17:26: error: stray '#' in program
     using namespace std; #define LL long long#define PI acos(-1.0)#define Max INT_MAX#define Min INT_MIN#define eps 1e-8#define N 1001priority_queue<int , vector<int> ,greater<int> > p[701];int s[51];int n,m;bool vis[51];int live,die;void gao(){    int i,j,k;    live=0,die=0;    int t=1;    while(live+die<m){        i=0;        while(i<n && !p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x>=s[i]){                die++;                i++;            }            else            if(x-1>=s[0]){                x--;                p[t+1].push(x);            }            else            live++;        }        while(!p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x-1>=s[0]){            x--;            p[t+1].push(x);            }            else            live++;        }        t++;    }    printf("%d\n",die);} int main(){    while(scanf("%d%d",&n,&m)!=EOF){        int i,j;        for(i=0;i<n;i++)scanf("%d",&s[i]);        sort(s,s+n);        for(i=0;i<=700;i++)        while(!p[i].empty())        p[i].pop();        for(i=0;i<m;i++){            int a,b;            scanf("%d%d",&a,&b);            p[a].push(b);        }        gao();    }    return 0;}
                          ^
0_0_20612466_24680.cpp:17:46: error: stray '#' in program
     using namespace std; #define LL long long#define PI acos(-1.0)#define Max INT_MAX#define Min INT_MIN#define eps 1e-8#define N 1001priority_queue<int , vector<int> ,greater<int> > p[701];int s[51];int n,m;bool vis[51];int live,die;void gao(){    int i,j,k;    live=0,die=0;    int t=1;    while(live+die<m){        i=0;        while(i<n && !p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x>=s[i]){                die++;                i++;            }            else            if(x-1>=s[0]){                x--;                p[t+1].push(x);            }            else            live++;        }        while(!p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x-1>=s[0]){            x--;            p[t+1].push(x);            }            else            live++;        }        t++;    }    printf("%d\n",die);} int main(){    while(scanf("%d%d",&n,&m)!=EOF){        int i,j;        for(i=0;i<n;i++)scanf("%d",&s[i]);        sort(s,s+n);        for(i=0;i<=700;i++)        while(!p[i].empty())        p[i].pop();        for(i=0;i<m;i++){            int a,b;            scanf("%d%d",&a,&b);            p[a].push(b);        }        gao();    }    return 0;}
                                              ^
0_0_20612466_24680.cpp:17:67: error: stray '#' in program
     using namespace std; #define LL long long#define PI acos(-1.0)#define Max INT_MAX#define Min INT_MIN#define eps 1e-8#define N 1001priority_queue<int , vector<int> ,greater<int> > p[701];int s[51];int n,m;bool vis[51];int live,die;void gao(){    int i,j,k;    live=0,die=0;    int t=1;    while(live+die<m){        i=0;        while(i<n && !p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x>=s[i]){                die++;                i++;            }            else            if(x-1>=s[0]){                x--;                p[t+1].push(x);            }            else            live++;        }        while(!p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x-1>=s[0]){            x--;            p[t+1].push(x);            }            else            live++;        }        t++;    }    printf("%d\n",die);} int main(){    while(scanf("%d%d",&n,&m)!=EOF){        int i,j;        for(i=0;i<n;i++)scanf("%d",&s[i]);        sort(s,s+n);        for(i=0;i<=700;i++)        while(!p[i].empty())        p[i].pop();        for(i=0;i<m;i++){            int a,b;            scanf("%d%d",&a,&b);            p[a].push(b);        }        gao();    }    return 0;}
                                                                   ^
0_0_20612466_24680.cpp:17:86: error: stray '#' in program
     using namespace std; #define LL long long#define PI acos(-1.0)#define Max INT_MAX#define Min INT_MIN#define eps 1e-8#define N 1001priority_queue<int , vector<int> ,greater<int> > p[701];int s[51];int n,m;bool vis[51];int live,die;void gao(){    int i,j,k;    live=0,die=0;    int t=1;    while(live+die<m){        i=0;        while(i<n && !p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x>=s[i]){                die++;                i++;            }            else            if(x-1>=s[0]){                x--;                p[t+1].push(x);            }            else            live++;        }        while(!p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x-1>=s[0]){            x--;            p[t+1].push(x);            }            else            live++;        }        t++;    }    printf("%d\n",die);} int main(){    while(scanf("%d%d",&n,&m)!=EOF){        int i,j;        for(i=0;i<n;i++)scanf("%d",&s[i]);        sort(s,s+n);        for(i=0;i<=700;i++)        while(!p[i].empty())        p[i].pop();        for(i=0;i<m;i++){            int a,b;            scanf("%d%d",&a,&b);            p[a].push(b);        }        gao();    }    return 0;}
                                                                                      ^
0_0_20612466_24680.cpp:17:105: error: stray '#' in program
     using namespace std; #define LL long long#define PI acos(-1.0)#define Max INT_MAX#define Min INT_MIN#define eps 1e-8#define N 1001priority_queue<int , vector<int> ,greater<int> > p[701];int s[51];int n,m;bool vis[51];int live,die;void gao(){    int i,j,k;    live=0,die=0;    int t=1;    while(live+die<m){        i=0;        while(i<n && !p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x>=s[i]){                die++;                i++;            }            else            if(x-1>=s[0]){                x--;                p[t+1].push(x);            }            else            live++;        }        while(!p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x-1>=s[0]){            x--;            p[t+1].push(x);            }            else            live++;        }        t++;    }    printf("%d\n",die);} int main(){    while(scanf("%d%d",&n,&m)!=EOF){        int i,j;        for(i=0;i<n;i++)scanf("%d",&s[i]);        sort(s,s+n);        for(i=0;i<=700;i++)        while(!p[i].empty())        p[i].pop();        for(i=0;i<m;i++){            int a,b;            scanf("%d%d",&a,&b);            p[a].push(b);        }        gao();    }    return 0;}
                                                                                                         ^
0_0_20612466_24680.cpp:17:121: error: stray '#' in program
     using namespace std; #define LL long long#define PI acos(-1.0)#define Max INT_MAX#define Min INT_MIN#define eps 1e-8#define N 1001priority_queue<int , vector<int> ,greater<int> > p[701];int s[51];int n,m;bool vis[51];int live,die;void gao(){    int i,j,k;    live=0,die=0;    int t=1;    while(live+die<m){        i=0;        while(i<n && !p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x>=s[i]){                die++;                i++;            }            else            if(x-1>=s[0]){                x--;                p[t+1].push(x);            }            else            live++;        }        while(!p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x-1>=s[0]){            x--;            p[t+1].push(x);            }            else            live++;        }        t++;    }    printf("%d\n",die);} int main(){    while(scanf("%d%d",&n,&m)!=EOF){        int i,j;        for(i=0;i<n;i++)scanf("%d",&s[i]);        sort(s,s+n);        for(i=0;i<=700;i++)        while(!p[i].empty())        p[i].pop();        for(i=0;i<m;i++){            int a,b;            scanf("%d%d",&a,&b);            p[a].push(b);        }        gao();    }    return 0;}
                                                                                                                         ^
0_0_20612466_24680.cpp:17:27: error: 'define' does not name a type
     using namespace std; #define LL long long#define PI acos(-1.0)#define Max INT_MAX#define Min INT_MIN#define eps 1e-8#define N 1001priority_queue<int , vector<int> ,greater<int> > p[701];int s[51];int n,m;bool vis[51];int live,die;void gao(){    int i,j,k;    live=0,die=0;    int t=1;    while(live+die<m){        i=0;        while(i<n && !p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x>=s[i]){                die++;                i++;            }            else            if(x-1>=s[0]){                x--;                p[t+1].push(x);            }            else            live++;        }        while(!p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x-1>=s[0]){            x--;            p[t+1].push(x);            }            else            live++;        }        t++;    }    printf("%d\n",die);} int main(){    while(scanf("%d%d",&n,&m)!=EOF){        int i,j;        for(i=0;i<n;i++)scanf("%d",&s[i]);        sort(s,s+n);        for(i=0;i<=700;i++)        while(!p[i].empty())        p[i].pop();        for(i=0;i<m;i++){            int a,b;            scanf("%d%d",&a,&b);            p[a].push(b);        }        gao();    }    return 0;}
                           ^
0_0_20612466_24680.cpp: In function 'void gao()':
0_0_20612466_24680.cpp:17:345: error: 'p' was not declared in this scope
     using namespace std; #define LL long long#define PI acos(-1.0)#define Max INT_MAX#define Min INT_MIN#define eps 1e-8#define N 1001priority_queue<int , vector<int> ,greater<int> > p[701];int s[51];int n,m;bool vis[51];int live,die;void gao(){    int i,j,k;    live=0,die=0;    int t=1;    while(live+die<m){        i=0;        while(i<n && !p[t].empty()){            int x=p[t].top();            p[t].pop();            if(x>=s[i]){                die++;                i++;     


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-30 10:30:36, Gzip enabled