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_38998244_9703\Main.java:1: 错误: 非法字符: '#'
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
         ^
0_0_38998244_9703\Main.java:1: 错误: 非法字符: '#'
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                    ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                                                           ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                                                                                 ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                                                                                                   ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                                                                                                                                         ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                                                                                                                                                                    ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                                                                                                                                                                                                              ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                                                                                                                                                                                                                                       ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                                                                                                                                                                                                                                                ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                                                                                                                                                                                                                                                            ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);i++) { ans = max(ans, dp[n][i]); } printf("%d\n",ans); } return 0; }
                                                                                                                                                                                                                                                                ^
0_0_38998244_9703\Main.java:1: 错误: 需要class, interface或enum
#include <iostream> #include <cstdio> using namespace std; const int maxn=1<<17; int dp[17][maxn]; int max(int a,int b){ return a>b?a:b; } int main(){ int n,m,i,j; while(scanf("%d",&n)&&n){ scanf("%d",&m); memset(dp,0,sizeof(dp)); int s,e; for(int i=0;i<m;i++){ scanf("%d%d",&s,&e); dp[0][s]=e; } for(i=1;i<=n;i++){ for(j=0;j<maxn;j++){ if(j&(1<<(i-1))){ dp[i][j]=dp[i-1][j]+dp[i-1][j-(1<<(i-1))]; }else { dp[i][j]=dp[i-1][j]; } } } int ans=-1<<30; for(i=0; i<(1<<n);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-22 18:27:56, Gzip enabled