记录详情

Compile Error

foo.cc:67:2: error: stray '#' in program
   67 | }#include <iostream>
      |  ^
foo.cc:133:2: error: stray '#' in program
  133 | }#include <iostream>
      |  ^
foo.cc:199:2: error: stray '#' in program
  199 | }#include <iostream>
      |  ^
foo.cc:67:3: error: 'include' does not name a type
   67 | }#include <iostream>
      |   ^~~~~~~
foo.cc:73:11: error: redefinition of 'const int MAXN'
   73 | const int MAXN=105;
      |           ^~~~
foo.cc:7:11: note: 'const int MAXN' previously defined here
    7 | const int MAXN=105;
      |           ^~~~
foo.cc:74:11: error: redefinition of 'const int MAXW'
   74 | const int MAXW=100005;
      |           ^~~~
foo.cc:8:11: note: 'const int MAXW' previously defined here
    8 | const int MAXW=100005;
      |           ^~~~
foo.cc:75:5: error: redefinition of 'int f [100005]'
   75 | int f[MAXW],pre[MAXW];
      |     ^
foo.cc:9:5: note: 'int f [100005]' previously declared here
    9 | int f[MAXW],pre[MAXW];
      |     ^
foo.cc:75:13: error: redefinition of 'int pre [100005]'
   75 | int f[MAXW],pre[MAXW];
      |             ^~~
foo.cc:9:13: note: 'int pre [100005]' previously declared here
    9 | int f[MAXW],pre[MAXW];
      |             ^~~
foo.cc:76:5: error: redefinition of 'int ans [105]'
   76 | int ans[MAXN];
      |     ^~~
foo.cc:10:5: note: 'int ans [105]' previously declared here
   10 | int ans[MAXN];
      |     ^~~
foo.cc:77:5: error: redefinition of 'int a [105]'
   77 | int a[MAXN];
      |     ^
foo.cc:11:5: note: 'int a [105]' previously declared here
   11 | int a[MAXN];
      |     ^
foo.cc:78:5: error: redefinition of 'int n'
   78 | int n,w,sumw;
      |     ^
foo.cc:12:5: note: 'int n' previously declared here
   12 | int n,w,sumw;
      |     ^
foo.cc:78:7: error: redefinition of 'int w'
   78 | int n,w,sumw;
      |       ^
foo.cc:12:7: note: 'int w' previously declared here
   12 | int n,w,sumw;
      |       ^
foo.cc:78:9: error: redefinition of 'int sumw'
   78 | int n,w,sumw;
      |         ^~~~
foo.cc:12:9: note: 'int sumw' previously declared here
   12 | int n,w,sumw;
      |         ^~~~
foo.cc:80:6: error: redefinition of 'void init()'
   80 | void init()
      |      ^~~~
foo.cc:14:6: note: 'void init()' previously defined here
   14 | void init()
      |      ^~~~
foo.cc:91:6: error: redefinition of 'void DP()'
   91 | void DP()
      |      ^~
foo.cc:25:6: note: 'void DP()' previously defined here
   25 | void DP()
      |      ^~
foo.cc:109:6: error: redefinition of 'void print_ans()'
  109 | void print_ans()
      |      ^~~~~~~~~
foo.cc:43:6: note: 'void print_ans()' previously defined here
   43 | void print_ans()
      |      ^~~~~~~~~
foo.cc:128:5: error: redefinition of 'int main()'
  128 | int main()
      |     ^~~~
foo.cc:62:5: note: 'int main()' previously defined here
   62 | int main()
      |     ^~~~
foo.cc:133:3: error: 'include' does not name a type
  133 | }#include <iostream>
      |   ^~~~~~~
foo.cc:139:11: error: redefinition of 'const int MAXN'
  139 | const int MAXN=105;
      |           ^~~~
foo.cc:7:11: note: 'const int MAXN' previously defined here
    7 | const int MAXN=105;
      |           ^~~~
foo.cc:140:11: error: redefinition of 'const int MAXW'
  140 | const int MAXW=100005;
      |           ^~~~
foo.cc:8:11: note: 'const int MAXW' previously defined here
    8 | const int MAXW=100005;
      |           ^~~~
foo.cc:141:5: error: redefinition of 'int f [100005]'
  141 | int f[MAXW],pre[MAXW];
      |     ^
foo.cc:9:5: note: 'int f [100005]' previously declared here
    9 | int f[MAXW],pre[MAXW];
      |     ^
foo.cc:141:13: error: redefinition of 'int pre [100005]'
  141 | int f[MAXW],pre[MAXW];
      |             ^~~
foo.cc:9:13: note: 'int pre [100005]' previously declared here
    9 | int f[MAXW],pre[MAXW];
      |             ^~~
foo.cc:142:5: error: redefinition of 'int ans [105]'
  142 | int ans[MAXN];
      |     ^~~
foo.cc:10:5: note: 'int ans [105]' previously declared here
   10 | int ans[MAXN];
      |     ^~~
foo.cc:143:5: error: redefinition of 'int a [105]'
  143 | int a[MAXN];
      |     ^
foo.cc:11:5: note: 'int a [105]' previously declared here
   11 | int a[MAXN];
      |     ^
foo.cc:144:5: error: redefinition of 'int n'
  144 | int n,w,sumw;
      |     ^
foo.cc:12:5: note: 'int n' previously declared here
   12 | int n,w,sumw;
      |     ^
foo.cc:144:7: error: redefinition of 'int w'
  144 | int n,w,sumw;
      |       ^
foo.cc:12:7: note: 'int w' previously declared here
   12 | int n,w,sumw;
      |       ^
foo.cc:144:9: error: redefinition of 'int sumw'
  144 | int n,w,sumw;
      |         ^~~~
foo.cc:12:9: note: 'int sumw' previously declared here
   12 | int n,w,sumw;
      |         ^~~~
foo.cc:146:6: error: redefinition of 'void init()'
  146 | void init()
      |      ^~~~
foo.cc:14:6: note: 'void init()' previously defined here
   14 | void init()
      |      ^~~~
foo.cc:157:6: error: redefinition of 'void DP()'
  157 | void DP()
      |      ^~
foo.cc:25:6: note: 'void DP()' previously defined here
   25 | void DP()
      |      ^~
foo.cc:175:6: error: redefinition of 'void print_ans()'
  175 | void print_ans()
      |      ^~~~~~~~~
foo.cc:43:6: note: 'void print_ans()' previously defined here
   43 | void print_ans()
      |      ^~~~~~~~~
foo.cc:194:5: error: redefinition of 'int main()'
  194 | int main()
      |     ^~~~
foo.cc:62:5: note: 'int main()' previously defined here
   62 | int main()
      |     ^~~~
foo.cc:199:3: error: 'include' does not name a type
  199 | }#include <iostream>
      |   ^~~~~~~
foo.cc:205:11: error: redefinition of 'const int MAXN'
  205 | const int MAXN=105;
      |           ^~~~
foo.cc:7:11: note: 'const int MAXN' previously defined here
    7 | const int MAXN=105;
      |           ^~~~
foo.cc:206:11: error: redefinition of 'const int MAXW'
  206 | const int MAXW=100005;
      |           ^~~~
foo.cc:8:11: note: 'const int MAXW' previously defined here
    8 | const int MAXW=100005;
      |           ^~~~
foo.cc:207:5: error: redefinition of 'int f [100005]'
  207 | int f[MAXW],pre[MAXW];
      |     ^
foo.cc:9:5: note: 'int f [100005]' previously declared here
    9 | int f[MAXW],pre[MAXW];
      |     ^
foo.cc:207:13: error: redefinition of 'int pre [100005]'
  207 | int f[MAXW],pre[MAXW];
      |             ^~~
foo.cc:9:13: note: 'int pre [100005]' previously declared here
    9 | int f[MAXW],pre[MAXW];
      |             ^~~
foo.cc:208:5: error: redefinition of 'int ans [105]'
  208 | int ans[MAXN];
      |     ^~~
foo.cc:10:5: note: 'int ans [105]' previously declared here
   10 | int ans[MAXN];
      |     ^~~
foo.cc:209:5: error: redefinition of 'int a [105]'
  209 | int a[MAXN];
      |     ^
foo.cc:11:5: note: 'int a [105]' previously declared here
   11 | int a[MAXN];
      |     ^
foo.cc:210:5: error: redefinition of 'int n'
  210 | int n,w,sumw;
      |     ^
foo.cc:12:5: note: 'int n' previously declared here
   12 | int n,w,sumw;
      |     ^
foo.cc:210:7: error: redefinition of 'int w'
  210 | int n,w,sumw;
      |       ^
foo.cc:12:7: note: 'int w' previously declared here
   12 | int n,w,sumw;
      |       ^
foo.cc:210:9: error: redefinition of 'int sumw'
  210 | int n,w,sumw;
      |         ^~~~
foo.cc:12:9: note: 'int sumw' previously declared here
   12 | int n,w,sumw;
      |         ^~~~
foo.cc:212:6: error: redefinition of 'void init()'
  212 | void init()
      |      ^~~~
foo.cc:14:6: note: 'void init()' previously defined here
   14 | void init()
      |      ^~~~
foo.cc:223:6: error: redefinition of 'void DP()'
  223 | void DP()
      |      ^~
foo.cc:25:6: note: 'void DP()' previously defined here
   25 | void DP()
      |      ^~
foo.cc:241:6: error: redefinition of 'void print_ans()'
  241 | void print_ans()
      |      ^~~~~~~~~
foo.cc:43:6: note: 'void print_ans()' previously defined here
   43 | void print_ans()
      |      ^~~~~~~~~
foo.cc:260:5: error: redefinition of 'int main()'
  260 | int main()
      |     ^~~~
foo.cc:62:5: note: 'int main()' previously defined here
   62 | int main()
      |     ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1018 打牌
语言
C++
递交时间
2023-12-13 16:41:35
评测时间
2023-12-13 16:41:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes