/ Vijos /

记录详情

Compile Error

foo.cc:6:129: error: stray '#' in program
  {      return 0;         }  } return 1;}int main(){ int n,m; int *a; while(scanf("%d%d",&n,&m)!=EOF) {  if(n==-1&&m==-1)   ... #include<stdio.h>#include<stdlib.h>int panduan(int *a,int m){    int i; for(i=0;i<m;i++)     {      if(a[i]==0)      {      return 0;         }  } return 1;}int main(){ int n,m; int *a; while(scanf("%d%d",&n,&m)!=EOF) {  if(n==-1&&m==-1)     break;  a=new int[n];  int i,j;  for(i=0;i<n;i++)     a[i]=0;  int t=0;  while(1)  {      if(a[t]==1)         break;      else a[t]=1;      if(m>n)         m=m%n;      if(t+m>n)         t=m-(n-t);      else         t=m+t;     }     if(panduan(a,m))         printf("YES\n");     else       printf("POOR Haha\n");     delete []a;  } return 0; }
                                                                                                                                 ^
foo.cc:6:146: error: stray '#' in program
  {      return 0;         }  } return 1;}int main(){ int n,m; int *a; while(scanf("%d%d",&n,&m)!=EOF) {  if(n==-1&&m==-1)   ... #include<stdio.h>#include<stdlib.h>int panduan(int *a,int m){    int i; for(i=0;i<m;i++)     {      if(a[i]==0)      {      return 0;         }  } return 1;}int main(){ int n,m; int *a; while(scanf("%d%d",&n,&m)!=EOF) {  if(n==-1&&m==-1)     break;  a=new int[n];  int i,j;  for(i=0;i<n;i++)     a[i]=0;  int t=0;  while(1)  {      if(a[t]==1)         break;      else a[t]=1;      if(m>n)         m=m%n;      if(t+m>n)         t=m-(n-t);      else         t=m+t;     }     if(panduan(a,m))         printf("YES\n");     else       printf("POOR Haha\n");     delete []a;  } return 0; }
                                                                                                                                                  ^
foo.cc: In function 'int main()':
foo.cc:6:125: error: expected primary-expression before '...' token
  {      return 0;         }  } return 1;}int main(){ int n,m; int *a; while(scanf("%d%d",&n,&m)!=EOF) {  if(n==-1&&m==-1)   ... #include<stdio.h>#include<stdlib.h>int panduan(int *a,int m){    int i; for(i=0;i<m;i++)     {      if(a[i]==0)      {      return 0;         }  } return 1;}int main(){ int n,m; int *a; while(scanf("%d%d",&n,&m)!=EOF) {  if(n==-1&&m==-1)     break;  a=new int[n];  int i,j;  for(i=0;i<n;i++)     a[i]=0;  int t=0;  while(1)  {      if(a[t]==1)         break;      else a[t]=1;      if(m>n)         m=m%n;      if(t+m>n)         t=m-(n-t);      else         t=m+t;     }     if(panduan(a,m))         printf("YES\n");     else       printf("POOR Haha\n");     delete []a;  } return 0; }
                                                                                                                             ^~~
foo.cc:8:40: error: a function-definition is not allowed here before '{' token
foo.cc:11:72: error: expected '}' at end of input
foo.cc:6:68: warning: unused variable 'a' [-Wunused-variable]
  {      return 0;         }  } return 1;}int main(){ int n,m; int *a; while(scanf("%d%d",&n,&m)!=EOF) {  if(n==-1&&m==-1)   ... #include<stdio.h>#include<stdlib.h>int panduan(int *a,int m){    int i; for(i=0;i<m;i++)     {      if(a[i]==0)      {      return 0;         }  } return 1;}int main(){ int n,m; int *a; while(scanf("%d%d",&n,&m)!=EOF) {  if(n==-1&&m==-1)     break;  a=new int[n];  int i,j;  for(i=0;i<n;i++)     a[i]=0;  int t=0;  while(1)  {      if(a[t]==1)         break;      else a[t]=1;      if(m>n)         m=m%n;      if(t+m>n)         t=m-(n-t);      else         t=m+t;     }     if(panduan(a,m))         printf("YES\n");     else       printf("POOR Haha\n");     delete []a;  } return 0; }
                                                                    ^
foo.cc:11:72: error: expected '}' at end of input

自豪的采用jd5进行评测(github.com/masnn/jd5)

信息

递交者
类型
递交
题目
P1888 Fine(Disillusioning)
语言
C++
递交时间
2020-03-01 15:13:24
评测时间
2020-03-01 15:13:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes