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_20614695_7228.cpp:19:12: error: stray '#' in program
     =a;i--)#define MEM1(a) memset(a,0,sizeof(a))#define MEM2(a) memset(a,-1,sizeof(a))#define ll long longconst double PI=acos(-1.0);template<class T> T gcd(T a,T b){return b?gcd(b,a%b):a;}template<class T> T lcm(T a,T b){return a/gcd(a,b)*b;}template<class T> inline T Min(T a,T b){return a<b?a:b;}template<class T> inline T Max(T a,T b){return a>b?a:b;}using namespace std;int n,m,L;#define N 50005#define M 1000100#define Mod 1000000007#define p(x,y) make_pair(x,y)int dp[5010];struct Node{    int a,b,c;    bool operator <(const Node &x) const{        return (ll)b*x.c>(ll)x.b*c;    }}e[1010];int main(){    int T;    sf(T);    while(T--){        int t;        sfd(n,t);        for(int i=1;i<=n;i++){            scanf("%d%d%d",&e[i].a,&e[i].b,&e[i].c);        }        sort(e+1,e+n+1);        memset(dp,0,sizeof dp);        for(int i=1;i<=n;i++){            for(int j=t;j>=e[i].c;j--){                dp[j] = Max(dp[j],dp[j-e[i].c]+Max(0,e[i].a-j*e[i].b));            }        }        int ans=-INF;        for(int i=0;i<=t;i++)            ans = Max(ans,dp[i]);        pf(ans);    }    return 0;}
            ^
0_0_20614695_7228.cpp:19:49: error: stray '#' in program
     =a;i--)#define MEM1(a) memset(a,0,sizeof(a))#define MEM2(a) memset(a,-1,sizeof(a))#define ll long longconst double PI=acos(-1.0);template<class T> T gcd(T a,T b){return b?gcd(b,a%b):a;}template<class T> T lcm(T a,T b){return a/gcd(a,b)*b;}template<class T> inline T Min(T a,T b){return a<b?a:b;}template<class T> inline T Max(T a,T b){return a>b?a:b;}using namespace std;int n,m,L;#define N 50005#define M 1000100#define Mod 1000000007#define p(x,y) make_pair(x,y)int dp[5010];struct Node{    int a,b,c;    bool operator <(const Node &x) const{        return (ll)b*x.c>(ll)x.b*c;    }}e[1010];int main(){    int T;    sf(T);    while(T--){        int t;        sfd(n,t);        for(int i=1;i<=n;i++){            scanf("%d%d%d",&e[i].a,&e[i].b,&e[i].c);        }        sort(e+1,e+n+1);        memset(dp,0,sizeof dp);        for(int i=1;i<=n;i++){            for(int j=t;j>=e[i].c;j--){                dp[j] = Max(dp[j],dp[j-e[i].c]+Max(0,e[i].a-j*e[i].b));            }        }        int ans=-INF;        for(int i=0;i<=t;i++)            ans = Max(ans,dp[i]);        pf(ans);    }    return 0;}
                                                 ^
0_0_20614695_7228.cpp:19:87: error: stray '#' in program
     =a;i--)#define MEM1(a) memset(a,0,sizeof(a))#define MEM2(a) memset(a,-1,sizeof(a))#define ll long longconst double PI=acos(-1.0);template<class T> T gcd(T a,T b){return b?gcd(b,a%b):a;}template<class T> T lcm(T a,T b){return a/gcd(a,b)*b;}template<class T> inline T Min(T a,T b){return a<b?a:b;}template<class T> inline T Max(T a,T b){return a>b?a:b;}using namespace std;int n,m,L;#define N 50005#define M 1000100#define Mod 1000000007#define p(x,y) make_pair(x,y)int dp[5010];struct Node{    int a,b,c;    bool operator <(const Node &x) const{        return (ll)b*x.c>(ll)x.b*c;    }}e[1010];int main(){    int T;    sf(T);    while(T--){        int t;        sfd(n,t);        for(int i=1;i<=n;i++){            scanf("%d%d%d",&e[i].a,&e[i].b,&e[i].c);        }        sort(e+1,e+n+1);        memset(dp,0,sizeof dp);        for(int i=1;i<=n;i++){            for(int j=t;j>=e[i].c;j--){                dp[j] = Max(dp[j],dp[j-e[i].c]+Max(0,e[i].a-j*e[i].b));            }        }        int ans=-INF;        for(int i=0;i<=t;i++)            ans = Max(ans,dp[i]);        pf(ans);    }    return 0;}
                                                                                       ^
0_0_20614695_7228.cpp:19:386: error: stray '#' in program
     =a;i--)#define MEM1(a) memset(a,0,sizeof(a))#define MEM2(a) memset(a,-1,sizeof(a))#define ll long longconst double PI=acos(-1.0);template<class T> T gcd(T a,T b){return b?gcd(b,a%b):a;}template<class T> T lcm(T a,T b){return a/gcd(a,b)*b;}template<class T> inline T Min(T a,T b){return a<b?a:b;}template<class T> inline T Max(T a,T b){return a>b?a:b;}using namespace std;int n,m,L;#define N 50005#define M 1000100#define Mod 1000000007#define p(x,y) make_pair(x,y)int dp[5010];struct Node{    int a,b,c;    bool operator <(const Node &x) const{        return (ll)b*x.c>(ll)x.b*c;    }}e[1010];int main(){    int T;    sf(T);    while(T--){        int t;        sfd(n,t);        for(int i=1;i<=n;i++){            scanf("%d%d%d",&e[i].a,&e[i].b,&e[i].c);        }        sort(e+1,e+n+1);        memset(dp,0,sizeof dp);        for(int i=1;i<=n;i++){            for(int j=t;j>=e[i].c;j--){                dp[j] = Max(dp[j],dp[j-e[i].c]+Max(0,e[i].a-j*e[i].b));            }        }        int ans=-INF;        for(int i=0;i<=t;i++)            ans = Max(ans,dp[i]);        pf(ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                  ^
0_0_20614695_7228.cpp:19:401: error: stray '#' in program
     =a;i--)#define MEM1(a) memset(a,0,sizeof(a))#define MEM2(a) memset(a,-1,sizeof(a))#define ll long longconst double PI=acos(-1.0);template<class T> T gcd(T a,T b){return b?gcd(b,a%b):a;}template<class T> T lcm(T a,T b){return a/gcd(a,b)*b;}template<class T> inline T Min(T a,T b){return a<b?a:b;}template<class T> inline T Max(T a,T b){return a>b?a:b;}using namespace std;int n,m,L;#define N 50005#define M 1000100#define Mod 1000000007#define p(x,y) make_pair(x,y)int dp[5010];struct Node{    int a,b,c;    bool operator <(const Node &x) const{        return (ll)b*x.c>(ll)x.b*c;    }}e[1010];int main(){    int T;    sf(T);    while(T--){        int t;        sfd(n,t);        for(int i=1;i<=n;i++){            scanf("%d%d%d",&e[i].a,&e[i].b,&e[i].c);        }        sort(e+1,e+n+1);        memset(dp,0,sizeof dp);        for(int i=1;i<=n;i++){            for(int j=t;j>=e[i].c;j--){                dp[j] = Max(dp[j],dp[j-e[i].c]+Max(0,e[i].a-j*e[i].b));            }        }        int ans=-INF;        for(int i=0;i<=t;i++)            ans = Max(ans,dp[i]);        pf(ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                 ^
0_0_20614695_7228.cpp:19:418: error: stray '#' in program
     =a;i--)#define MEM1(a) memset(a,0,sizeof(a))#define MEM2(a) memset(a,-1,sizeof(a))#define ll long longconst double PI=acos(-1.0);template<class T> T gcd(T a,T b){return b?gcd(b,a%b):a;}template<class T> T lcm(T a,T b){return a/gcd(a,b)*b;}template<class T> inline T Min(T a,T b){return a<b?a:b;}template<class T> inline T Max(T a,T b){return a>b?a:b;}using namespace std;int n,m,L;#define N 50005#define M 1000100#define Mod 1000000007#define p(x,y) make_pair(x,y)int dp[5010];struct Node{    int a,b,c;    bool operator <(const Node &x) const{        return (ll)b*x.c>(ll)x.b*c;    }}e[1010];int main(){    int T;    sf(T);    while(T--){        int t;        sfd(n,t);        for(int i=1;i<=n;i++){            scanf("%d%d%d",&e[i].a,&e[i].b,&e[i].c);        }        sort(e+1,e+n+1);        memset(dp,0,sizeof dp);        for(int i=1;i<=n;i++){            for(int j=t;j>=e[i].c;j--){                dp[j] = Max(dp[j],dp[j-e[i].c]+Max(0,e[i].a-j*e[i].b));            }        }        int ans=-INF;        for(int i=0;i<=t;i++)            ans = Max(ans,dp[i]);        pf(ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                  ^
0_0_20614695_7228.cpp:19:440: error: stray '#' in program
     =a;i--)#define MEM1(a) memset(a,0,sizeof(a))#define MEM2(a) memset(a,-1,sizeof(a))#define ll long longconst double PI=acos(-1.0);template<class T> T gcd(T a,T b){return b?gcd(b,a%b):a;}template<class T> T lcm(T a,T b){return a/gcd(a,b)*b;}template<class T> inline T Min(T a,T b){return a<b?a:b;}template<class T> inline T Max(T a,T b){return a>b?a:b;}using namespace std;int n,m,L;#define N 50005#define M 1000100#define Mod 1000000007#define p(x,y) make_pair(x,y)int dp[5010];struct Node{    int a,b,c;    bool operator <(const Node &x) const{        return (ll)b*x.c>(ll)x.b*c;    }}e[1010];int main(){    int T;    sf(T);    while(T--){        int t;        sfd(n,t);        for(int i=1;i<=n;i++){            scanf("%d%d%d",&e[i].a,&e[i].b,&e[i].c);        }        sort(e+1,e+n+1);        memset(dp,0,sizeof dp);        for(int i=1;i<=n;i++){            for(int j=t;j>=e[i].c;j--){                dp[j] = Max(dp[j],dp[j-e[i].c]+Max(0,e[i].a-j*e[i].b));            }        }        int ans=-INF;        for(int i=0;i<=t;i++)            ans = Max(ans,dp[i]);        pf(ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^
0_0_20614695_7228.cpp:19:5: error: expected unqualified-id before '=' token
     =a;i--)#define MEM1(a) memset(a,0,sizeof(a))#define MEM2(a) memset(a,-1,sizeof(a))#define ll long longconst double PI=acos(-1.0);template<class T> T 


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-12-05 03:29:55, Gzip enabled