CSP2024-S GD 迷惑行为大赏:编译错误(版本一)

如果觉得太长了想看分好类的:https://www.cnblogs.com/caijianhong/p/18527160

编译错误

answers/GD-S00002/duel/duel.cpp: In function ‘int main()’:
answers/GD-S00002/duel/duel.cpp:13:13: error: request for member ‘sort’ in ‘num’, which is of non-class type ‘int [n]’
   13 |         num.sort(0,n);
      |             ^~~~

典型 python 玩家

answers/GD-S00004/arena/arena.cpp: In function ‘int main()’:
answers/GD-S00004/arena/arena.cpp:11:16: error: ‘srdout’ was not declared in this scope; did you mean ‘stdout’?
   11 |         fclose(srdout);
      |                ^~~~~~
      |                stdout

我不用过编译

complie: answers/GD-S00070/arena/arena.cpp
answers/GD-S00070/arena/arena.cpp:1:9: fatal error: iostram: 没有那个文件或目录
    1 | #include<iostram>
      |         ^~~~~~~~~
compilation terminated.

我也不用

answers/GD-S00016/color/color.cpp:7:25: error: ‘long long int index [200005]’ redeclared as different kind of entity
    7 | int n,a[MAXN],index[MAXN];
      |                         ^
In file included from /usr/include/string.h:432,
                 from /usr/include/c++/9/cstring:42,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:48,
                 from answers/GD-S00016/color/color.cpp:1:
/usr/include/strings.h:61:1: note: previous declaration ‘const char* index(const char*, int)’
   61 | index (const char *__s, int __c) __THROW
      | ^~~~~

文件名字典序最小的悲报产生了

complie: answers/GD-S00045/arena/arena.cpp
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status

荣获全广东第一个(文件名字典序最小)的无 main 函数代码称号,在 \(147\) 份无 main 代码中脱颖而出!

answers/GD-S00103/detect/detect.cpp: In function ‘int main()’:
answers/GD-S00103/detect/detect.cpp:39:15: error: ‘qurt’ was not declared in this scope
   39 |     double vt=qurt(ans[j].v*ans[j].v+2*ans[j].a*(num-ans[j].d))
      |               ^~~~

我相信这是一场意外,意外救一下啊啊啊!!

vector<int> flag[N]
double f(double v1,double v0,double a){ // 戮脿脌毛 
	return (v1*v1-v0*v0)/(2*a);
}
answers/GD-S00111/detect/detect.cpp:11:1: error: expected initializer before ‘double’

诶,编辑器,怎么帮我删了个分号

complie: answers/GD-S00133/arena/arena.cpp
answers/GD-S00133/arena/arena.cpp: In function ‘int main()’:
answers/GD-S00133/arena/arena.cpp:4:31: error: ‘strin’ was not declared in this scope; did you mean ‘stdin’?
    4 |         freopen("road.in","r",strin);
      |                               ^~~~~
      |                               stdin
answers/GD-S00133/arena/arena.cpp:5:32: error: ‘strout’ was not declared in this scope; did you mean ‘stdout’?
    5 |         freopen("road.out","w",strout);
      |                                ^~~~~~
      |                                stdout

亮点是在 arena 一题的代码中读取 road.in

complie: answers/GD-S00164/duel/duel.cpp
answers/GD-S00164/duel/duel.cpp: In function ‘int main()’:
answers/GD-S00164/duel/duel.cpp:4:34: error: expected primary-expression before ‘)’ token
    4 |         freopen("duel.in","r",std);
      |                                  ^
answers/GD-S00164/duel/duel.cpp:5:35: error: expected primary-expression before ‘)’ token
    5 |         freopen("duel.out","w",std);
      |                                   ^
answers/GD-S00164/duel/duel.cpp:13:16: error: cannot convert ‘const char*’ to ‘FILE*’
   13 |         fclose("duel.in");
      |                ^~~~~~~~~
      |                |
      |                const char*

取消注释后也可以编译代码哦

answers/GD-S00157/color/color.cpp:22:6: error: conflicting declaration ‘int a’
   22 |  int a=bl(x-1,f);
      |      ^
answers/GD-S00157/color/color.cpp:3:5: note: previous declaration as ‘int a [200005]’
    3 | int a[200005],score[200005];
      |     ^

我特意翻了代码,发现是少了个花括号,诶编辑器

answers/GD-S00164/duel/duel.cpp: In function ‘int main()’:
answers/GD-S00164/duel/duel.cpp:4:27: error: expected primary-expression before ‘)’ token
    4 |  freopen("duel.in","r",std);
      |                           ^
answers/GD-S00164/duel/duel.cpp:5:28: error: expected primary-expression before ‘)’ token
    5 |  freopen("duel.out","w",std);
      |                            ^
answers/GD-S00164/duel/duel.cpp:13:9: error: cannot convert ‘const char*’ to ‘FILE*’ {aka ‘_IO_FILE*’}
   13 |  fclose("duel.in");
      |         ^~~~~~~~~
      |         |
      |         const char*

再也不会写 freopen 了呜呜呜

answers/GD-S00193/detect/detect.cpp: In function ‘int main()’:
answers/GD-S00193/detect/detect.cpp:151:5: error: reference to ‘rend’ is ambiguous
  151 |     rend[rulecar].st=need[i].st;
      |     ^~~~

给同学开个 c++11 吧,诶编译器

answers/GD-S00203/arena/arena.cpp:4:7: error: expected identifier before ‘*’ token
    4 | class *|* {
      |       ^
answers/GD-S00203/arena/arena.cpp:4:8: error: expected unqualified-id before ‘|’ token
    4 | class *|* {
      |        ^
complie: answers/GD-S00203/color/color.cpp
answers/GD-S00203/color/color.cpp:1:1: error: ‘LRESULT’ does not name a type
    1 | LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
      | ^~~~~~~
complie: answers/GD-S00203/detect/detect.cpp
answers/GD-S00203/detect/detect.cpp:1:12: error: expected initializer before ‘WinMain’
    1 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
      |            ^~~~~~~
complie: answers/GD-S00203/duel/duel.cpp
answers/GD-S00203/duel/duel.cpp:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.

你参加的是什么考试啊

complie: answers/GD-S00213/arena/arena.cpp
/tmp/ccCBQ6dz.o: in function `main':
arena.cpp:(.text.startup+0x9): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccCBQ6dz.o

编译错误,内存超出限制!!!这是第一份代码,后面还有

answers/GD-S00213/arena/arena.cpp
answers/GD-S00263/detect/detect.cpp
answers/GD-S00294/detect/detect.cpp
answers/GD-S00469/detect/detect.cpp
answers/GD-S00521/color/color.cpp
answers/GD-S00902/color/color.cpp
answers/GD-S00932/detect/detect.cpp
answers/GD-S01036/color/color.cpp
answers/GD-S01070/detect/detect.cpp
answers/GD-S01287/arena/arena.cpp
answers/GD-S01394/color/color.cpp
answers/GD-S01459/color/color.cpp
answers/GD-S01790/color/color.cpp
answers/GD-S01923/detect/detect.cpp
answers/GD-S01950/color/color.cpp
answers/GD-S01950/detect/detect.cpp
answers/GD-S01977/color/color.cpp
answers/GD-S02007/arena/arena.cpp
answers/GD-S02106/detect/detect.cpp
answers/GD-S02196/arena/arena.cpp
answers/GD-S02287/arena/arena.cpp
answers/GD-S02741/color/color.cpp
answers/GD-S02931/detect/detect.cpp

等选手

answers/GD-S00229/detect/detect.cpp:75:60: error: no matching function for call to ‘max(long long int&, long int)’
   75 |     endd[p]=max(endd[p],lower_bound(test+1,test+1+m,d)-test);
      |                                                            ^

真该死啊!!!两个指针相减返回了 long int!!!这个在本机真的能过编,该死啊!!!

answers/GD-S00230/detect/detect.cpp:9:12: error: ISO C++ forbids declaration of ‘st1’ with no type [-fpermissive]
    9 | inline st1(){
      |            ^

这个已经是常驻嘉宾了,让我们请出 -fno-ms-extensions

answers/GD-S00240/color/color.cpp: In function ‘int main()’:
answers/GD-S00240/color/color.cpp:6:33: error: expected ‘;’ before ‘cin’
    6 |  freopen("color.out","w",stdout)
      |                                 ^
      |                                 ;
    7 |  cin>>t;
      |  ~~~      

这个就不是意外了,纯粹是自己没打分号啊

answers/GD-S00293/arena/arena.cpp: In function ‘int main()’:
answers/GD-S00293/arena/arena.cpp:5:25: error: cannot convert ‘const char*’ to ‘FILE*’ {aka ‘_IO_FILE*’}
    5 |  freopen ("duel.in","r","stdin");
      |                         ^~~~~~~
      |                         |
      |                         const char*

这位四题全错

answers/GD-S00354/duel/duel.cpp: In function ‘int main()’:
answers/GD-S00354/duel/duel.cpp:18:24: error: no matching function for call to ‘max(long long int, int)’
   18 |    ans=max(ans-cnt[i],0);
      |                        ^

写为 0ll,话说这种东西是什么编译器在接受啊

answers/GD-S00371/duel/duel.cpp:4:34: error: ‘int kill’ redeclared as different kind of entity
    4 | int n,a[N],x,minx=2147483647,ans,kill;
      |                                  ^~~~
In file included from /usr/include/c++/9/csignal:42,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:43,
                 from answers/GD-S00371/duel/duel.cpp:1:
/usr/include/signal.h:112:12: note: previous declaration ‘int kill(__pid_t, int)’
  112 | extern int kill (__pid_t __pid, int __sig) __THROW;
      |            ^~~~

第二个悲报

answers/GD-S00377/color/color.cpp: In function ‘int main()’:
answers/GD-S00377/color/color.cpp:6:24: error: ‘in’ was not declared in this scope; did you mean ‘n’?
    6 |  printf("color.in","r",in);
      |                        ^~
      |                        n
answers/GD-S00377/color/color.cpp:7:24: error: ‘out’ was not declared in this scope
    7 |  scanf("color.out","w",out);
      |                        ^~~

恍然大悟,我终于会重定向文件输入输出了!

answers/GD-S00407/arena/arena.cpp: In function ‘int main()’:
answers/GD-S00407/arena/arena.cpp:11:2: error: ‘whlie’ was not declared in this scope
   11 |  whlie(t--){
      |  ^~~~~

whlie

answers/GD-S00442/duel/duel.cpp: In function ‘int main()’:
answers/GD-S00442/duel/duel.cpp:4:2: error: ‘feopen’ was not declared in this scope; did you mean ‘fdopen’?
    4 |  feopen("duel.in","r",stdin);
      |  ^~~~~~
      |  fdopen

铁开

answers/GD-S00505/duel/duel.cpp:9:2: error: invalid preprocessing directive #freopen
    9 | #freopen("duel.in","r",stdin);
      |  ^~~~~~~
answers/GD-S00505/duel/duel.cpp:10:2: error: invalid preprocessing directive #freopen
   10 | #freopen("duel.out","w",stdout);
      |  ^~~~~~~

我注释了 freopen

    4 | int n,r[100005],ans,vis[100005],kill[100005];
      |                                            ^
In file included from /usr/include/c++/9/csignal:42,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:43,
                 from answers/GD-S00549/duel/duel.cpp:1:
/usr/include/signal.h:112:12: note: previous declaration ‘int kill(__pid_t, int)’
  112 | extern int kill (__pid_t __pid, int __sig) __THROW;
      |            ^~~~

为啥还能有重复的

answers/GD-S00579/detect/detect.cpp: In function ‘int main()’:
answers/GD-S00579/detect/detect.cpp:77:56: error: no matching function for call to ‘max(long long int&, long int)’
   77 |      l = max(l, lower_bound(p + 1, p + n + 1, d[i]) - p);
      |                                            

同上

answers/GD-S00643/color/color.cpp: In function ‘int main()’:
answers/GD-S00643/color/color.cpp:25:2: error: ‘freoprn’ was not declared in this scope; did you mean ‘freopen’?
   25 |  freoprn("color.out","w",stdout);
      |  ^~~~~~~
      |  freopen

第不知道多少个 freopen

answers/GD-S00651/arena/arena.cpp: In function ‘int main()’:
answers/GD-S00651/arena/arena.cpp:43:5: error: ‘memcpy’ was not declared in this scope
   43 |     memcpy(ta, tmp, sizeof(ta));
      |     ^~~~~~
answers/GD-S00651/arena/arena.cpp:4:1: note: ‘memcpy’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
    3 | #include <cmath>
  +++ |+#include <cstring>
    4 | 

Dev-C++ 特色

answers/GD-S00709/detect/detect.cpp: In function ‘int main()’:
answers/GD-S00709/detect/detect.cpp:125:138: error: no matching function for call to ‘min(long long int, long int)’
  125 |      const int pos1 = lower_bound(p + 1, p + m + 1, d[i]) - p, pos2 = min((long long)m, upper_bound(p + 1, p + m + 1, d[i] + mov) - p - 1);
      |                                                                                                                                          ^

同上

answers/GD-S00731/detect/detect.cpp: In member function ‘std::pair<int, int> node::toint() const’:
answers/GD-S00731/detect/detect.cpp:30:24: error: ‘ceil’ was not declared in this scope
   30 |   if (sti) res.first = ceil(st);
      |                        ^~~~
answers/GD-S00731/detect/detect.cpp:32:20: error: ‘ceil’ was not declared in this scope
   32 |   else res.first = ceil(st);
      |                    ^~~~
answers/GD-S00731/detect/detect.cpp:33:25: error: ‘floor’ was not declared in this scope
   33 |   if (ndi) res.second = floor(nd);
      |                         ^~~~~
answers/GD-S00731/detect/detect.cpp:35:21: error: ‘floor’ was not declared in this scope
   35 |   else res.second = floor(nd);
      |                     ^~~~~

传说中的编译器自动补全

answers/GD-S00834/detect/detect.cpp:12:18: error: ISO C++ forbids declaration of ‘check’ with no type [-fpermissive]
   12 | check(int x,int y){
      |                  ^

-fno-ms-extensions

complie: answers/GD-S00840/duel/duel.cpp
answers/GD-S00840/duel/duel.cpp:1:9: fatal error: bit/stdc++.h: No such file or directory
    1 | #include<bit/stdc++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.

四题全部写的这个

answers/GD-S00991/color/color.cpp:3:2: error: invalid preprocessing directive #definescscore
    3 | #definescscore
      |  ^~~~~~~~~~~~~
answers/GD-S00991/color/color.cpp:2:1: error: ‘usingnamespacestd’ does not name a type
    2 | usingnamespacestd;
      | ^~~~~~~~~~~~~~~~~
answers/GD-S00991/color/color.cpp:4:1: error: ‘intscore’ does not name a type
    4 | intscore[100000];
      | ^~~~~~~~
answers/GD-S00991/color/color.cpp:5:9: error: ISO C++ forbids declaration of ‘intmain’ with no type [-fpermissive]
    5 | intmain()
      |         ^

他就这题代码的所有空格消失了

answers/GD-S01039/duel/duel.cpp:3:29: error: ISO C++ forbids declaration of ‘cmp’ with no type [-fpermissive]
    3 |  cmp(long long a,long long b){
      |                             ^

同上上上,但像是意外,因为他行首有个空格。

answers/GD-S01041/arena/arena.cpp: In function ‘int main()’:
answers/GD-S01041/arena/arena.cpp:5:10: error: cannot convert ‘FILE*’ {aka ‘_IO_FILE*’} to ‘const char*’
    5 |  freopen(stdin,'w',"detect1.in");
      |          ^~~~~
      |          |
      |          FILE* {aka _IO_FILE*}

新奇

$ view answers/GD-S01048/duel/duel.cpp
#include<bits/stdc++.h>
using namespace std;



const int N = 10010;
int n,r[N]=0,c[N]=0,s[N]=0;
int m=0;

void (int a,int b){

}

int main(){
    freopen("duel.in","r","stdin");
    freopen("duel.out","w","stdout");
    cin>> n;
    for(int i = 0;i<=n;i++){
        cin >> r[i];}
    for(int i = 0;i<=n;i++){
        m = min(r[i]);

        c[i] = m;
    }
    for(int i = 0;i<=n;i++){
        m = r[0];
        if(r[i]>m) {m=r[i]}

        c[i] = m;
    }
    if(n==5&&r=[1,2,3,2,1]) cout<<2;
    fclose("duel.in");
    fclose("duel.out");
    return 0;}

这位不知道写的是什么语言

answers/GD-S01093/duel/duel.cpp:4:8: error: expected constructor, destructor, or type conversion before ‘(’ token
    4 | freopen("duel.in","r",stdin);
      |        ^

freopen 不在 main 里在全局

answers/GD-S01189/duel/duel.cpp: In function ‘int main()’:
answers/GD-S01189/duel/duel.cpp:22:9: error: ‘INT_MAX’ was not declared in this scope
   22 |  ll ans=INT_MAX;
      |         ^~~~~~~
answers/GD-S01189/duel/duel.cpp:3:1: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
    2 | #include<algorithm>
  +++ |+#include <climits>
    3 | #define ll long long

自动补全好啊

answers/GD-S01193/duel/duel.cpp:1:10: fatal error: Bits/stdc++.h: No such file or directory
    1 | #include <Bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.

大小写不分,是 windows

cc1plus: error: ‘::main’ must return ‘int’

翻了发现是 #define int long long 然后 int main

answers/GD-S01224/color/color.cpp:42:1: error: ‘f’ does not name a type
   42 | f**k you ccf
      | ^

精神状态良好

answers/GD-S01384/detect/detect.cpp:78:14: error: stray ‘#’ in program
   78 |     return 0;#include <bits/stdc++.h>
      |              ^

翻了发现这份代码被写了两次,是意外

$ view answers/GD-S01394/detect/detect.cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
	ofstream fin("detect.in");
	ifstream fout("detect.out");
	fout<<1<<endl<<1;
	fin.close();
	fout.close();
} 

名称与工作相反

answers/GD-S01468/color/color.cpp:18:29: error: ISO C++ forbids declaration of ‘writech’ with no type [-fpermissive]
   18 | inline writech(int x,char ch){write(x),putchar(ch);}
      |                             ^

同上上上上上上上上上上

answers/GD-S01522/color/color.cpp: In function ‘void Solve()’:
answers/GD-S01522/color/color.cpp:33:32: error: ‘max’ was not declared in this scope; did you mean ‘fmax’?
   33 |                     f[i][a][b]=max(f[i][a][b],f[i-1][b][c]);
      |                                ^~~
      |                                fmax

自动补全

answers/GD-S01539/detect/detect.cpp: In function ‘int main()’:
answers/GD-S01539/detect/detect.cpp:42:9: error: ‘sqrt’ was not declared in this scope
   42 |     if (sqrt(v[i] * v[i] + 2 * a[i] * s) > V) {
      |         ^~~~

自动补全

answers/GD-S01640/color/color.cpp: In function ‘int main()’:
answers/GD-S01640/color/color.cpp:11:9: error: reference to ‘next’ is ambiguous
   11 |  memset(next,0,sizeof next);
      |         ^~~~

悲报

answers/GD-S01683/detect/detect.cpp:31:49: error: invalid type argument of unary ‘*’ (have ‘int’)
   31 |      D[i].x+=D[i].v*timeout+0.5*D[i].a*timeout**2;
      |                                                 ^

\(timeout^2\)

answers/GD-S01701/detect/detect.cpp:1:10: fatal error: bits/https.h++: No such file or directory
    1 | #include <bits/https.h++>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

神秘啊

answers/GD-S01825/detect/detect.cpp:3:9: fatal error: bits\stdc++.h: No such file or directory
    3 | #include<bits\stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.

duel 一题的万能头对了,但是另外三题都错了

answers/GD-S01898/arena/arena.cpp: In function ‘int main()’:
answers/GD-S01898/arena/arena.cpp:112:3: error: reference to ‘function’ is ambiguous
  112 |   function();
      |   ^~~~~~~~

君英语本当上手

answers/GD-S02001/arena/arena.cpp:2:9: fatal error: windows.h: No such file or directory
    2 | #include<windows.h>
      |         ^~~~~~~~~~~
compilation terminated.

终于出现了


截止到 准考证号 2000,先下班


answers/GD-S02018/duel/duel.cpp:1:9: fatal error: dit/stdc++.h: No such file or directory
    1 | #include<dit/stdc++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.

dit

answers/GD-S02035/detect/detect.cpp: In function ‘int sum(int, int)’:
answers/GD-S02035/detect/detect.cpp:31:33: error: reference to ‘get’ is ambiguous
   31 |   if(p[i] >= l && p[i] <= r && !get[i]) {
      |                                 ^~~

悲报啊

answers/GD-S02073/duel/duel.cpp: In function ‘void dayu20(ll*, ll)’:
answers/GD-S02073/duel/duel.cpp:31:3: error: reference to ‘hash’ is ambiguous
   31 |   hash[cards[i]]++;
      |   ^~~~

悲报第 \(n\)

answers/GD-S02102/arena/arena.cpp:1:1: error: ‘LAO’ does not name a type
    1 | LAO ZI BU HUI
      | ^~~
complie: answers/GD-S02102/color/color.cpp
answers/GD-S02102/color/color.cpp:1:10: fatal error: bits\stdc++.h: No such file or directory
    1 | #include <bits\stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
complie: answers/GD-S02102/detect/detect.cpp
answers/GD-S02102/detect/detect.cpp:1:10: fatal error: bits\stdc++.h: No such file or directory
    1 | #include <bits\stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
complie: answers/GD-S02102/duel/duel.cpp
answers/GD-S02102/duel/duel.cpp:1:10: fatal error: bits\stdc++.h: No such file or directory
    1 | #include <bits\stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.

摆烂人

complie: answers/GD-S02197/arena/arena.cpp
answers/GD-S02197/arena/arena.cpp:1:9: fatal error: bits/stdc++.h : No such file or directory
    1 | #include<bits/stdc++.h >
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
complie: answers/GD-S02197/color/color.cpp
answers/GD-S02197/color/color.cpp:1:9: fatal error: bits/stdc++.h : No such file or directory
    1 | #include<bits/stdc++.h >
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
complie: answers/GD-S02197/detect/detect.cpp
answers/GD-S02197/detect/detect.cpp:1:9: fatal error: bits/stdc++.h : No such file or directory
    1 | #include<bits/stdc++.h >
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
complie: answers/GD-S02197/duel/duel.cpp
answers/GD-S02197/duel/duel.cpp:1:9: fatal error: bits/stdc++.h : No such file or directory
    1 | #include<bits/stdc++.h >
      |         ^~~~~~~~~~~~~~~~
compilation terminated.

空格人

answers/GD-S02229/duel/duel.cpp:9:46: error: ISO C++ forbids declaration of ‘operator<’ with no type [-fpermissive]
    9 |  friend operator<(const Type &a,const Type &b)
      |                                              ^
answers/GD-S02229/duel/duel.cpp:11:47: error: ISO C++ forbids declaration of ‘operator==’ with no type [-fpermissive]
   11 |  friend operator==(const Type &a,const Type &b)
      |                                               ^

没有返回类型

answers/GD-S02314/arena/arena.cpp: In function ‘int main()’:
answers/GD-S02314/arena/arena.cpp:37:12: error: reference to ‘rank’ is ambiguous
   37 |     if(i<n)rank[0][i]=a[i];
      |            ^~~~

悲报第 \(n+1\)

answers/GD-S02343/duel/duel.cpp:18:16: error: variable or field ‘print_vec’ declared void
   18 | void print_vec(vector<card> v) {
      |                ^~~~~~
answers/GD-S02343/duel/duel.cpp:18:16: error: ‘vector’ was not declared in this scope

这也是自动补全

answers/GD-S02377/arena/arena.cpp:8:6: error: no match for ‘operator<<’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘long long int’)
    8 |   cin<<n;
      |   ~~~^~~
      |   |    |
      |   |    long long int
      |   std::istream {aka std::basic_istream<char>}

反向输入

answers/GD-S02408/detect/detect.cpp:11:1: error: ‘vector’ does not name a type
   11 | vector<int> s[111111];
      | ^~~~~~

第好多个自动补全了

complie: answers/GD-S02417/arena/arena.cpp
answers/GD-S02417/arena/arena.cpp:2:8: error: expected constructor, destructor, or type conversion before ‘(’ token
    2 | freopen("arena.in""r", stdin);
      |        ^
answers/GD-S02417/arena/arena.cpp:3:8: error: expected constructor, destructor, or type conversion before ‘(’ token
    3 | freopen("arena.out""w", stdout);
      |        ^
complie: answers/GD-S02417/color/color.cpp
answers/GD-S02417/color/color.cpp:2:8: error: expected constructor, destructor, or type conversion before ‘(’ token
    2 | freopen("color.in""r", stdin);
      |        ^
answers/GD-S02417/color/color.cpp:3:8: error: expected constructor, destructor, or type conversion before ‘(’ token
    3 | freopen("color.out""w", stdout);
      |        ^
complie: answers/GD-S02417/detect/detect.cpp
answers/GD-S02417/detect/detect.cpp:2:8: error: expected constructor, destructor, or type conversion before ‘(’ token
    2 | freopen("detect.in""r", stdin);
      |        ^
answers/GD-S02417/detect/detect.cpp:3:8: error: expected constructor, destructor, or type conversion before ‘(’ token
    3 | freopen("detect.out""w", stdout);
      |        ^
complie: answers/GD-S02417/duel/duel.cpp
answers/GD-S02417/duel/duel.cpp:2:8: error: expected constructor, destructor, or type conversion before ‘(’ token
    2 | freopen("duel.in""r",stdin);
      |        ^
answers/GD-S02417/duel/duel.cpp:3:8: error: expected constructor, destructor, or type conversion before ‘(’ token
    3 | freopen("duel.out""w",stdout);
      |        ^

""""

answers/GD-S02430/arena/arena.cpp: In function ‘int arena_contest(int, int, int, int*)’:
answers/GD-S02430/arena/arena.cpp:36:22: error: ‘pow’ was not declared in this scope
   36 |  int final=s[k-ci][r/pow(2,ci)];
      |                      ^~~

自动补全俱乐部

answers/GD-S02430/duel/duel.cpp:5:1: error: ‘map’ does not name a type
    5 | map<int,int> a;
      | ^~~

成员 +1

answers/GD-S02441/detect/detect.cpp: In function ‘void solve()’:
answers/GD-S02441/detect/detect.cpp:29:43: error: ‘ceil’ was not declared in this scope
   29 |    q[i].r=is[i]?lower_bound(p+1,p+1+m,int(ceil((V-v[i])/2.0/a[i]))+d[i])-p-1:0;
      |                                           ^~~~

+2

answers/GD-S02534/duel/duel.cpp: In function ‘int main()’:
answers/GD-S02534/duel/duel.cpp:18:2: error: ‘vector’ was not declared in this scope
   18 |  vector<pair<int, int>> a;
      |  ^~~~~~

+3

answers/GD-S02536/detect/detect.cpp:98:75: error: no matching function for call to ‘max(ll&, long int)’
   98 |   for(int i=1;i<=m;i++)maxp=max(maxp,lower_bound(lsh+1,lsh+con+1,p[i])-lsh);
      |    

第不知道多少个

answers/GD-S02554/color/color.cpp:1:9: fatal error: ibts/stdc++.h: No such file or directory
    1 | #include<ibts/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.

ibts

complie: answers/GD-S02605/color/color.cpp
answers/GD-S02605/color/color.cpp:3:1: error: ‘freeopen’ does not name a type; did you mean ‘freopen’?
    3 | freeopen.in(color.in);
      | ^~~~~~~~
      | freopen
answers/GD-S02605/color/color.cpp:4:1: error: ‘freeopen’ does not name a type; did you mean ‘freopen’?
    4 | freeopen.out(color.ans);
      | ^~~~~~~~
      | freopen
answers/GD-S02605/color/color.cpp:5:1: error: ‘ifstream’ does not name a type
    5 | ifstream.fin;
      | ^~~~~~~~
answers/GD-S02605/color/color.cpp:6:1: error: ‘ofstream’ does not name a type
    6 | ofstream.fout;
      | ^~~~~~~~

胡言乱语

answers/GD-S02656/color/color.cpp:1:10: fatal error: bits./stdc++.h: No such file or directory
    1 | #include <bits./stdc++.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

GD-S02693 也犯了同样错误,师出同门

answers/GD-S02785/detect/detect.cpp:1:2: error: invalid preprocessing directive #intrsrpeast
    1 | #intrsrpeast<ioctsere>
      |  ^~~~~~~~~~~
answers/GD-S02785/detect/detect.cpp:2:7: error: expected nested-name-specifier before ‘namespeaifier’
    2 | using namespeaifier std;
      |       ^~~~~~~~~~~~~

这个应该是输入法背锅

typedef struct {
	int d, v, a, invalid;
	std::vector< std::pair<int,int> > ranges;
	car_object() {}
} car_object;

answers/GD-S02789/detect/detect.cpp:9:13: error: ISO C++ forbids declaration of ‘car_object’ with no type [-fpermissive]
    9 |  car_object() {}
      |             ^

g++.exe (tdm64-1) 4.9.2 背锅

answers/GD-S03306/detect/detect.cpp:12:21: error: ‘bool bzero’ redeclared as different kind of entity
   12 | bool zero=1,uzero=1,bzero=1;
      |                     ^~~~~

新的悲报

answers/GD-S03363/duel/duel.cpp:1:10: fatal error: bits/stdc++.H: No such file or directory
    1 | #include <bits/stdc++.H>
      |          ^~~~~~~~~~~~~~~
compilation terminated.

背锅

answers/GD-S03421/detect/detect.cpp:12:36: error: ‘int yn [1000005]’ redeclared as different kind of entity
   12 | int num[5],eyes[1000005],yn[1000005],s;
      |                                    ^

子弹正中眉心

answers/GD-S03432/color/color.cpp:4:14: error: ‘getchar’ was not declared in this scope
    4 |   x=0;char c=getchar();bool k=0;
      |              ^~~~~~~
answers/GD-S03432/color/color.cpp:1:1: note: ‘getchar’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
  +++ |+#include <cstdio>
    1 | #incldue<bits/stdc++.h>

自动补全

posted @ 2024-11-04 20:25  caijianhong  阅读(362)  评论(2编辑  收藏  举报