迷惑行为大赏

· · 休闲·娱乐

迷惑行为大赏 -GD

让我们先祝贺(并跳过)以下参赛者: //freopen er,.ans er,.in","w" & .out","r" er.cpper

J

普遍现象:

1.I have only a stick

freopen("stick.in","r",stdin);
freopen("stick.out","w",stdout);

恭喜中奖选手(省略GD-J):

0056
0166
0290
0361
0584
0735
0852
0867
1000
1026
1087
1247
1369
1386
1701
1909
1952
2215
2257
2632
2643
2780
2847
2876
2985
2986
3082
3099
3196
3264
3413
3538

请以上选手前来领取 T3.score=0 的奖品

2.bits/stdc++.h + 全局变量y1 + no #define
恭喜中奖选手:

0007
0048
0436
0440
0507
0981
1019
1476
1478
1724
1820
1821
2260
2449
2809
2821
2972
3089
3170

请以上选手前来领取 T2.score=0 的奖品
3.114514er
不做列举

小部分选手

1.feropen
中奖选手:

0657
1665
1985

2.//ifstream
中奖选手:

0094
1046

3.,in/,out

中奖选手:

0094:chain,out
0249:poker,out
0255:sticks,in
0532:poker,out
1717:chain,out+sticks,out
2786:chain,out
3121:explore,in
3243:explore,out

独特选手

1.GD-J00315:I'm a joker

freopen("joker.in","r",stdin);
freopen("joker.out","w",stdout);
\times 2^2

2.GD-J00259:不会F**K CCF的

/*
如果我AFO了,我也不会F**K CCF的,所以球球你了CCF给我1= or 2= 吧(大哭 
*/ 

3.GD-J02073:Uider explore.cpp:

/*
原神 UID:234422593
崩铁 UID:117090976
*/

poker.cpp:

洛谷 UID 678175,欢迎壶关
We're no strangers to love
(好心的作者 oyoham 帮你们省略了一部分)
Never gonna tell a lie and hurt you

Attend:arena.cpp

/*
原神,启动!
Genshin Start!
*/

4.GD-J01271:definer explore.cpp:

#define Never signed
#define gonna int
#define give n=read(),m
#define let x=read(),y
#define you =read(),
#define up k=read()
#define down d=read()
...
Never gonna give you up;
Never gonna let you down;

5.GD-J02200:阴铀er

/*
else:phigros , Muse Dush , Aceare 
*/
\times 2^2

顺手说一句:Arc的正确拼写是Arcaea
6.GD-J02643:chein.in/out 顾名思义
7.GD-J03050:exploer.out 顾名思义
8.GD-J00785:stiks.out 顾名思义
9.GD-J01766:Railgun

const int MisakaMikoto = 0x3f3f3f3f; //I love Misaka Mikoto forever!

10.GD-J00156/0911:#pragma

#pragma -O2
#pragma -std=c++14 

11.GD-J02738:wssber

for(int wssb=1;wssb<=n;wssb++)

12.GD-J03363:Furina

// I love Furina forever
\times 2^2 +

(explore.cpp)一无所有+(sticks.cpp)或者+(chain.cpp)赢下所有
13.GD-J02817:itner

for(itn j=1;j<=len;j++)

注:没有#define

S

普遍现象:

1.114514er
不做列举

小部分选手

1.delect
中奖选手

0279
2657

2.f**k CCF 中奖选手

1224
1369
1775

3.,in/,out 中奖选手:

2165:arena,out
2538:arena,out
2699:detect,out
2727:color,out
2905:color,out

4.dule
中奖选手:

0312
0438 +.pas
1698
1734
3099
3446

独特选手

1.GD-S03246:Furina
struct Furina
2.GD-S02342:100ptser

//I love CCF best, please give me 100pts
\times 2^2

3.GD-S00369:nahida

void nahida(int p)

4.GD-S00438:duel.pas 上文已说(dule)

Ex

看到这么多人因freopen与文件名挂分,我十分高兴悲伤,为了拯救更多的人,我决定将我的方法分享给大家,供大家参考。

  1. 将样例连文件夹复制^{1}到自己的文件夹。

  2. 在每个文件夹内写 check.cpp,(拿 J-T1:poker 举例)如下:

    #include<bits/stdc++.h>
    using namespace std;
    #define check(x,i) \
    system("ren "#x#i".in "#x".in"),\
    system(#x".exe"),\
    system("fc "#x".out "#x#i".ans"),\
    system("ren "#x".in "#x#i".in"),\
    system("del "#x".out");
    signed main(){
    check(poker,1);
    check(poker,2);
    check(poker,3);
    }

解释:
#x/#i将传进去的参数变为字符串。
ren [drive:][path]filename1 filename2: 重命名文件,将[drive:][path]filename1重命名为filename2.(renrename 的缩写)
___.exe:运行可执行文件。
fc [drive1:][path1]filename1 [drive2:][path2]filename2:比较两个文件或两个文件集并显示它们之间的不同(fcfile compare 的缩写)
del name:删除文件。
以下拿 x=poker,i=1 做例子
"ren "#x#i".in "#x".in"\rightarrow"ren poker1.in poker.in":将 poker1.in 改为 poker.in.
#x".exe"\rightarrowpoker.exe运行 poker.exe
"fc "#x".out "#x#i".ans"\rightarrow"fc "#x".out poker1.ans":比较输出文件poker.out和答案文件poker1.ans并显示差异。
"ren "#x".in "#x#i".in"\rightarrow"ren poker.in poker1.in":将 poker.in 改为 poker1.in.
"del "#x".out"\rightarrowdel poker.out^{2}:删除poker.out

2-ex. 还可以优化一下:#define check(x,i) system("for /d %x in ("#x") do for /l %i in (1,1,"#i") do ren %x%i.in %x.in & %x.exe & fc %x.out %x%i.ans & ren %x.in %x%i.in & del %x.out")
使用cmd.exefor可以使得一次测所有大样例,原理请自行在cmd中使用help for语句来了解。

3.优点:
3-1: 采用复制文件夹,文件夹的命名不会有问题。
3-2: 采用#define(或cmd.exefor)保证程序名(在调用#x".exe"%x.exe)与输入(有问题就会找不到输入文件而卡住)输出(有问题则会在fc中找不到指定文件)均没有问题。
3-3: 测大样例迅速。
3-4:不会因为测试数据而出现xxx1.in//freopen

$^{2}$: `"del "#x".out"`可加可不加。 【updating?】