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_20613871_7937.cpp:15:26: error: stray '#' in program
     using namespace std; #define N  100010#define E  100010#define ll long longconst int INF   =0x3fffffff;const int PRIME =999983;const int MOD   =1000000007;const int MULTI =1000000007;const double EPS=1e-8; #define CUBE(x) ((x)*(x)*(x))#define SQ(x)     ((x)*(x))#define ALL(x)     x.begin(),x.end()#define CLR(x,a) memset(x,a,sizeof(x))#define maxAry(a,n) max_element(a,a+(n))#define minAry(a,n) min_element(a,a+(n))inline bool isodd(int x){return x&1;}inline bool isodd(ll x) {return x&1;} double dp[110];int vx[110],vy[110];int n,L; double gao(int x){    fill(dp,dp+L+1,-1);    dp[0]=0;    for(int i=0;i<n;i++){        if(i==x) continue;        for(int j=L;j>=0;j--){            for(int k=0;k<=100;k++){                if(j-vx[i]*k<0 || dp[j-vx[i]*k]==-1) continue;                if(dp[j]==-1) dp[j]=dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k);                else dp[j]=max(dp[j],dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k));            }        }    }    double ans=-INF;    for(int i=0;i<=L;i++){        if(dp[i]==-1) continue;        double t=1.0*(L-i)/vx[x];        ans=max(ans,dp[i]+vy[x]*t-0.5*9.8*SQ(t));    }    return ans;} int main(){    int re,Case=1;    double ans;    scanf("%d",&re);     while(re--){        scanf("%d%d",&n,&L);        for(int i=0;i<n;i++)            scanf("%d%d",&vx[i],&vy[i]);        ans=-INF;        for(int i=0;i<n;i++)            ans=max(ans,gao(i));        printf("Case %d: %.3lf\n",Case++,ans);    }     return 0;}
                          ^
0_0_20613871_7937.cpp:15:43: error: stray '#' in program
     using namespace std; #define N  100010#define E  100010#define ll long longconst int INF   =0x3fffffff;const int PRIME =999983;const int MOD   =1000000007;const int MULTI =1000000007;const double EPS=1e-8; #define CUBE(x) ((x)*(x)*(x))#define SQ(x)     ((x)*(x))#define ALL(x)     x.begin(),x.end()#define CLR(x,a) memset(x,a,sizeof(x))#define maxAry(a,n) max_element(a,a+(n))#define minAry(a,n) min_element(a,a+(n))inline bool isodd(int x){return x&1;}inline bool isodd(ll x) {return x&1;} double dp[110];int vx[110],vy[110];int n,L; double gao(int x){    fill(dp,dp+L+1,-1);    dp[0]=0;    for(int i=0;i<n;i++){        if(i==x) continue;        for(int j=L;j>=0;j--){            for(int k=0;k<=100;k++){                if(j-vx[i]*k<0 || dp[j-vx[i]*k]==-1) continue;                if(dp[j]==-1) dp[j]=dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k);                else dp[j]=max(dp[j],dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k));            }        }    }    double ans=-INF;    for(int i=0;i<=L;i++){        if(dp[i]==-1) continue;        double t=1.0*(L-i)/vx[x];        ans=max(ans,dp[i]+vy[x]*t-0.5*9.8*SQ(t));    }    return ans;} int main(){    int re,Case=1;    double ans;    scanf("%d",&re);     while(re--){        scanf("%d%d",&n,&L);        for(int i=0;i<n;i++)            scanf("%d%d",&vx[i],&vy[i]);        ans=-INF;        for(int i=0;i<n;i++)            ans=max(ans,gao(i));        printf("Case %d: %.3lf\n",Case++,ans);    }     return 0;}
                                           ^
0_0_20613871_7937.cpp:15:60: error: stray '#' in program
     using namespace std; #define N  100010#define E  100010#define ll long longconst int INF   =0x3fffffff;const int PRIME =999983;const int MOD   =1000000007;const int MULTI =1000000007;const double EPS=1e-8; #define CUBE(x) ((x)*(x)*(x))#define SQ(x)     ((x)*(x))#define ALL(x)     x.begin(),x.end()#define CLR(x,a) memset(x,a,sizeof(x))#define maxAry(a,n) max_element(a,a+(n))#define minAry(a,n) min_element(a,a+(n))inline bool isodd(int x){return x&1;}inline bool isodd(ll x) {return x&1;} double dp[110];int vx[110],vy[110];int n,L; double gao(int x){    fill(dp,dp+L+1,-1);    dp[0]=0;    for(int i=0;i<n;i++){        if(i==x) continue;        for(int j=L;j>=0;j--){            for(int k=0;k<=100;k++){                if(j-vx[i]*k<0 || dp[j-vx[i]*k]==-1) continue;                if(dp[j]==-1) dp[j]=dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k);                else dp[j]=max(dp[j],dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k));            }        }    }    double ans=-INF;    for(int i=0;i<=L;i++){        if(dp[i]==-1) continue;        double t=1.0*(L-i)/vx[x];        ans=max(ans,dp[i]+vy[x]*t-0.5*9.8*SQ(t));    }    return ans;} int main(){    int re,Case=1;    double ans;    scanf("%d",&re);     while(re--){        scanf("%d%d",&n,&L);        for(int i=0;i<n;i++)            scanf("%d%d",&vx[i],&vy[i]);        ans=-INF;        for(int i=0;i<n;i++)            ans=max(ans,gao(i));        printf("Case %d: %.3lf\n",Case++,ans);    }     return 0;}
                                                            ^
0_0_20613871_7937.cpp:15:211: error: stray '#' in program
     using namespace std; #define N  100010#define E  100010#define ll long longconst int INF   =0x3fffffff;const int PRIME =999983;const int MOD   =1000000007;const int MULTI =1000000007;const double EPS=1e-8; #define CUBE(x) ((x)*(x)*(x))#define SQ(x)     ((x)*(x))#define ALL(x)     x.begin(),x.end()#define CLR(x,a) memset(x,a,sizeof(x))#define maxAry(a,n) max_element(a,a+(n))#define minAry(a,n) min_element(a,a+(n))inline bool isodd(int x){return x&1;}inline bool isodd(ll x) {return x&1;} double dp[110];int vx[110],vy[110];int n,L; double gao(int x){    fill(dp,dp+L+1,-1);    dp[0]=0;    for(int i=0;i<n;i++){        if(i==x) continue;        for(int j=L;j>=0;j--){            for(int k=0;k<=100;k++){                if(j-vx[i]*k<0 || dp[j-vx[i]*k]==-1) continue;                if(dp[j]==-1) dp[j]=dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k);                else dp[j]=max(dp[j],dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k));            }        }    }    double ans=-INF;    for(int i=0;i<=L;i++){        if(dp[i]==-1) continue;        double t=1.0*(L-i)/vx[x];        ans=max(ans,dp[i]+vy[x]*t-0.5*9.8*SQ(t));    }    return ans;} int main(){    int re,Case=1;    double ans;    scanf("%d",&re);     while(re--){        scanf("%d%d",&n,&L);        for(int i=0;i<n;i++)            scanf("%d%d",&vx[i],&vy[i]);        ans=-INF;        for(int i=0;i<n;i++)            ans=max(ans,gao(i));        printf("Case %d: %.3lf\n",Case++,ans);    }     return 0;}
                                                                                                                                                                                                                   ^
0_0_20613871_7937.cpp:15:240: error: stray '#' in program
     using namespace std; #define N  100010#define E  100010#define ll long longconst int INF   =0x3fffffff;const int PRIME =999983;const int MOD   =1000000007;const int MULTI =1000000007;const double EPS=1e-8; #define CUBE(x) ((x)*(x)*(x))#define SQ(x)     ((x)*(x))#define ALL(x)     x.begin(),x.end()#define CLR(x,a) memset(x,a,sizeof(x))#define maxAry(a,n) max_element(a,a+(n))#define minAry(a,n) min_element(a,a+(n))inline bool isodd(int x){return x&1;}inline bool isodd(ll x) {return x&1;} double dp[110];int vx[110],vy[110];int n,L; double gao(int x){    fill(dp,dp+L+1,-1);    dp[0]=0;    for(int i=0;i<n;i++){        if(i==x) continue;        for(int j=L;j>=0;j--){            for(int k=0;k<=100;k++){                if(j-vx[i]*k<0 || dp[j-vx[i]*k]==-1) continue;                if(dp[j]==-1) dp[j]=dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k);                else dp[j]=max(dp[j],dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k));            }        }    }    double ans=-INF;    for(int i=0;i<=L;i++){        if(dp[i]==-1) continue;        double t=1.0*(L-i)/vx[x];        ans=max(ans,dp[i]+vy[x]*t-0.5*9.8*SQ(t));    }    return ans;} int main(){    int re,Case=1;    double ans;    scanf("%d",&re);     while(re--){        scanf("%d%d",&n,&L);        for(int i=0;i<n;i++)            scanf("%d%d",&vx[i],&vy[i]);        ans=-INF;        for(int i=0;i<n;i++)            ans=max(ans,gao(i));        printf("Case %d: %.3lf\n",Case++,ans);    }     return 0;}
                                                                                                                                                                                                                                                ^
0_0_20613871_7937.cpp:15:267: error: stray '#' in program
     using namespace std; #define N  100010#define E  100010#define ll long longconst int INF   =0x3fffffff;const int PRIME =999983;const int MOD   =1000000007;const int MULTI =1000000007;const double EPS=1e-8; #define CUBE(x) ((x)*(x)*(x))#define SQ(x)     ((x)*(x))#define ALL(x)     x.begin(),x.end()#define CLR(x,a) memset(x,a,sizeof(x))#define maxAry(a,n) max_element(a,a+(n))#define minAry(a,n) min_element(a,a+(n))inline bool isodd(int x){return x&1;}inline bool isodd(ll x) {return x&1;} double dp[110];int vx[110],vy[110];int n,L; double gao(int x){    fill(dp,dp+L+1,-1);    dp[0]=0;    for(int i=0;i<n;i++){        if(i==x) continue;        for(int j=L;j>=0;j--){            for(int k=0;k<=100;k++){                if(j-vx[i]*k<0 || dp[j-vx[i]*k]==-1) continue;                if(dp[j]==-1) dp[j]=dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k);                else dp[j]=max(dp[j],dp[j-vx[i]*k]+vy[i]*k-0.5*9.8*SQ(k));            }        }    }    double ans=-INF;    for(int i=0;i<=L;i++){        if(dp[i]==-1) continue;        double t=1.0*(L-i)/vx[x];        ans=max(ans,dp[i]+vy[x]*t-0.5*9.8*SQ(t));    }    return ans;} int main(){    int re,Case=1;    double ans;    scanf("%d",&re);     while(re--){        scanf("%d%d",&n,&L);        for(int i=0;i<n;i++)            scanf("%d%d",&vx[i],&vy[i]);        ans=-INF;        for(int i=0;i<n;i++)            ans=max(ans,gao(i));        printf("Case %d: %.3lf\n",Case++,ans);    }     return 0;}
                                                                                                                                                                                                                                                                           ^
0_0_20613871_7937.cpp:15:303: error: stray '#' in program
     using namespace std; #define N  100010#define E  100010#define ll long longconst int INF   =0x3fffffff;const int PRIME =999983;const int MOD   =1000000007;const int MULTI =1000000007;const double EPS=1e-8; #define CU


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 02:45:35, Gzip enabled