CSP2023-S GD 迷惑行为大赏

发布时间 2023-10-22 01:49:59作者: caijianhong

CSP2023-S GD 迷惑行为大赏

我也来()

首先不难写出一个 python 将所有人的代码输出到文件:

点击查看代码
import os
import chardet
import codecs

def convert_file_to_utf8(filename):
    # !!! does not backup the origin file
    content = codecs.open(filename, 'rb').read()
    source_encoding = chardet.detect(content)['encoding']
    if source_encoding == None:
#       print "??",filename
        return
#   print "  ",source_encoding, filename
    if source_encoding != 'utf-8' and source_encoding != 'UTF-8-SIG':
        content = content.decode(source_encoding, 'ignore') #.encode(source_encoding)
        codecs.open(filename, 'w', encoding='UTF-8-SIG').write(content)


ouf = open("answers-all.md", "w")
path = "./GD-Senior/answers"

for person in os.listdir(path):
    for problem in ["lock", "game", "struct", "tree"]:
#       print(f"reading {path}/{person}/{problem}/{problem}.cpp...")
        try:
            convert_file_to_utf8(f"{path}/{person}/{problem}/{problem}.cpp")
            with open(f"{path}/{person}/{problem}/{problem}.cpp", "r") as file:
                print(f"选手 {person} 成功提交题目 {problem}。", file=ouf)
                code = file.read()
                print(f"{path}/{person}/{problem}/{problem}.cpp size = {len(code)}", file=ouf)
                if len(code) < 5000:
                    print("```", file=ouf)
                    print(code, file=ouf)
                    print("```", file=ouf)
                else:
                    print("```", file=ouf)
                    print(code[:5000], file=ouf)
                    print("```", file=ouf)
        except FileNotFoundError:
            print(f"选手 {person} 未提交题目 {problem}。", file=ouf)

ouf.close()

因为一共有 2000 多人考,有人粘贴大样例所以要取前 5000 个字符,跑的很慢,还要换编码,最后 typora 都开不了了,不得不换用高贵的 vim。

关键词

本次比赛的考号最大值为 GD-S02298,实际上交了 2289 个文件夹和 8246 个文件。

必备单词

  • freopen 共出现 15863 次。

  • include 共出现 13041 次。

    • bits/stdc++ 共出现 6034 次。
  • namespace 共出现 8294 次。

  • std 共出现 35707 次。

    • std; 共出现 7952 次。
    • std:: 共出现 798 次。
    • 剩下的是怎么来的呢?还有 stdin, stdout, bits/stdc++.h, ios::sync_with_stdio。
  • true 共出现 3274 次。

  • false 共出现 3237 次。怎么 true 比 false 要多呢?

  • for 共 37344 次。

  • while 共 5679 次。怎么差了一个数量级。

  • void 共 4450 次。

  • return 共 20795 次。

  • 悲报://freopen 共出现 143 次。

  • gd 比较特殊:

    • 发现很多打表含有 gd 字串。
    • 有一位同学的 game 的变量名全部有 gd。
    • 有很多同学的 struct 的变量名含有 gd。

struct 专场

  • int 共出现 92998 次,其中有 1581 个 "int",说明有很多人没写 T3。

  • long 共出现 16793 次,其中有 1534 个 "long",说明有很多人没写 T3。

  • short 共出现 1971 次,其中有 1599 个 "short",说明有很多人没写 T3。

  • byte 共出现 1712 次,其中有 1530 个 "byte",说明有很多人没写 T3。

    • 不是吧,难道有人用 byte 的时候没加双引号?原来是有注释和 _bytebyte_type 之类的东西。
  • type 共出现 4803 次是没有想到的。

  • element 376 次。

  • offset 165 次。

    • off 248 次。
    • 有一个样例人打表 game 的字符串中打到 off 了。
  • align 283 次。

  • size 14230 次。其中有 8246 是 python 输出,剩下 5984 次。

    • sizeof 704 次。
    • .size 3706 次。
  • string 共 11436 次。

单词

  • CCF 出现 70 次。

  • love 出现 54 次。

    • 其中有 slove 是没有想到的。

    • 还有一位同学写了 // I love WHQ!

    • cout << "i love ccf" << endl;

    • //have no time , love ccf , let me AC

    • // I love you CCF
      // give me CSP-S 1=  
      // plz
      
    • 		if(op==1){
      			cout<<"I love CCF";
      			return 0;
      		}
      
    • Man always remember love because of romance only!

    • I love CCF.
      Please don't make me waste so much time on no score.
      

作文鉴赏

//用数组模拟存储s队列现在的状态然后就不会了 
//快乐afo
//字符串 中的 每个字符 独立等概率地 从 字符集 中 选择......
//什么意思??? 
//输出0吗?
//有可能 
//never mind!!!!!
//hwh you are just so cute QAQ
//aaa you are so good in computer but I am just rubbish
//you can play tetris well too......
//you intracted me so――much
//you are really cool, and have great ideas about things......
//i am so lucky to meet you, you aren't like other ......e, boys who have strange interests?
//oh...... i have said too much......
//you, of course, can not see it
//but it's such a great thing to write these words
//bye for now!

//彻底afo 
//can I get 15 points qwq?
//I love ccf! I love OI!
//偷偷在这里表白hwh应该没人发现吧(bushi 
//我劝你不要――(指换一个程序写) 

//......
//不想做了www
//csp-s rp++!
//这题有分我倒立
//但是我爱ccf所以能给点分嘛QAQ
//(开玩笑的别让我禁赛三年awa,不过我真爱ccf) 

出自同一人之手。

//文野赛高!每一个看迷惑代码的人都要接受我的安利!太中芥敦双首领yyds! 
//安吾推也要学编程(头秃ing 
//剧本组救救我。。。 
//就是说,提高组会不了一点
//嗯,为了有人看到,打个rand 
//I very very very very very love you,CCF. 
//好好好除了样例一我还没找到对的答案(捂脸
//著名场景:知道哪里错了,但不会改:):):) 
//激情澎湃,一班不败,斗志昂扬,一班最强(不是 

/*
今天天气好像突然就冷了下来。
往日一栋栋高楼大厦总是遥不可及,但经过细雪的洗礼,却如平日里普通的装饰品,只是为了衬托这高洁的雪而存在的――最后仍是映入这凡世间了。
街道里万籁俱寂,就连落叶,也只是悄悄的滑落下来,而不再向人们炫耀那无聊却往往被赞赏的舞姿了。
小鸟仍在安眠;太阳昏昏沉沉的;月亮抱着星星睡得正香。
这座城市也仍在睡着,各家各户的灯都灭了,黑暗席卷了整个天空。  
所有的一切被抹除掉了,整个世界上,只有雪――雪在飘落着。
她在述说着什么?亦或者只是人类的痴心妄想呢?
雪不会回答――她只会笑着看着你,任你自己猜去。
我们却总能幻想出来所谓的回答……
她怎么会开口呢? 
在这样一个清晨,一个沉默的清晨!
……在所有的一切都安眠着的时候,她又怎么会吵醒这个小小的世界呢?
一切的战争,烦恼,苦难,幸福,都与她无关。
她只是漫无止境地飘落着,直到春的到来……

直到……在这样的一个落雪的清晨,城市又一次醒来。 

她默默地退到幕后,观赏着这个世界,这样一场盛大的表演。
唯一的观众。 
*/

也是同一人之手。烦死了 wsl.vim 粘贴出来编码会爆炸。

//csp-j < csp-s(hao xiang,ying gai ba),what should i do?
//why write hash with my hand????? wei shen me yao shou xie ha xi
//mi huo xing wei da shang hello
//i love ccf and csp and noi very much!!!

是没有中文输入法可用吗?

#define I using
#define love namespace
#define Elaina std
I love Elaina;

所以你知道谁是 Elaina 吗?

GD-S00242 struct 未找到选手程序
    
GD-S00242 tree 成功提交程序
./GD-Senior/answers/GD-S00242/tree/tree.cpp size = 192
    
#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std; 
int main(int argc, char** argv) {
	return 0;
}

我本来想搜索 you 的。出来好多这个,还有打表的。

			cout<<"Error: sorry, but this computer is too old for you to make a struct."<<endl; 
			cout<<"Truth: You can also say that the builder of this programme is too stupid."<<endl;

The builder of this programme is too stupid!

	cout << "Although I couldn't get a high score, I still want to say, thank you.";

You're welcome!

		else if(op==4){
			long long ad;
			scanf("%lld",&ad);
			printf("sorry, i can't tell you the answers.\n");
		}

No problem.

okay, i think i cant get any one pt in this problem

i dont know dp, ds, Graph even %you i cant solve, too. i need to learn more knowleage
but recently, i came.

See you next year!

	Chtholly<pair<string,Type*>>layout;

Chtholly!

//I'm Exp10re, Luogu UID is 403069, subscribe me :).
//Wait, how do you know segtree is cute.

才不会关注呢。

//zhi wo de zui hou yi ci CSP-S
//wu lun cheng gong yu fou
//dou mei you gu fu wo zhe ji nian de fen fou
//xue OI de ri zi li sui ran you hen duo yi han
//dan shi ren shi le hen duo peng you
//xue xi le hen duo zhi shi
//hai gan wu dao mei you guo de jue xin he yong qi
//thank you OI!
//ci sheng wu hui ru OI
//lai shi yuan zuo OI ren! 

不懂这是个啥,有人能标注声调吗?

/*
    you will get 0 if:
//  freopen("lock.in","r",stdin);
//	freopen("lock.in","r",stdin);
//	freopen("lock.in","r",stdin);
//	freopen("lock.out","w",stdin);
//	freopen("lock.in","r",stdout);
//	freopen("lock.in","r",stdin);
kkksc03 ak ioi
chen_zhe ak ioi
怎么说呢,这次考得不怎么好
希望正在看这个代码的人能考好吧 
*/

是的,我考的挺好的。

//dear zhonghaotian please give your PE and whk grades to make me get Au in CSP-J and get at least Ag in CSP-S Thank You Very Much!!!!!!
//rp++ rp++ rp++

zhonghaotian 受到暴击。

AK IOI is a dream.
In fact,CSP-S can AK me.
If I can't win of the CSP,
that what I can code in NOIP.
The way is long.
Come on, oier.
Coding hard for myself(the unvisity,the dream or for your school)
Don't be afraid of CSP-S,
the IOI will very difficult.
When you AK IOI,
you will find the CSP is so easy.
Hold on,oier.
Fight for your future.
by M&G

The same to you!

//Dear Eaho-JR, I'm sorry that I didn't do well in this exam.
//Don't let it makes you unhappy, this is not important to you.
//I wish you did a good job in the sports meeting.

想知道谁是 Eaho-JR。

//编者注:tree/tree.cpp
// I AK CSPS.
// I wish.
// can log^3 pass 1e5
// sqrt can pass
// log^3 how you
// oh no it cant
// no AK
// jijijijibaibaibaibai
// 300 iz pts
// oh i can log^2
// eeeeeeeeeeeeeeeeez
// wait
// zhebushi zhijeibaoli juntan On ma
// woshi *baoliyuyan*

但是这题能 1log。

//It been a long day,without you my friend

And I’ll tell you all about it when I see you again~

/*
+--------+     +--+  +--+  IS Problem Too hard to solve.
|        |\    |  |  |  |
+--+  +--+ |   |  |  |  |
 \_|  |\__\|   |  |__|  |
   |  | |      |        |
   |  | |      |  +--+  |
   +--+ |      |  |  |  |
    \  \|      |  |  |  |
     ---+      +--+  +--+
     
     also i was too lazy to finish the pattern.
     any way its too hard.
     
long long time ago there was a frog made of NaOH.
it lived happily in the woods until it met the god.
the god says, you are talented and now i give you the chance to fight on csp for the glory of your family.
and the frogs went.
it was not able to solve the first problem because it was not properly trained.
it went home sadly and found the god, asking him the reason why he asked it to go to csp.
"becuz its there." the god replied. "its there and you have to fight. try harder. its your responsibility to do that."
the frog was confused but he trusted the god and trained itself.
although the 2nd and 3rd year wasnt successful, it never gave up with the god's words deeply in its heart.
older frogs left and younger frogs came, finally in the 4th year it achieved a Cu medal.
it took the medal back to the god proudly but the god was not satisfied.
"you should try harder", the god says, "theres still one year for you before you are too old to compete."
and now its the fifth year of the frog, we dont know how the competition goes so wish it good luck.

i wrote this story because i want to see it on the 'strange code collection' after competition.
hope it can come true.
i dont wanna solve this problem and i cant solve this problem.
also i cant solve C.
its still too hard for me.
its the last time i would be here so just enjoy making fun.
points? no one cares, at least i dont care.
this is not where it started but this is where it ends.
it did not bring me fortune nor wealth but i appreaciate it.
bruteforce A&B wrong answer C
vegetable. 

然后写了一堆 froepen,95 KB。

高三了佛一是真的恶心两周一放一放一天来打csp都像是逃课一样根本没有时间上机这次进noip都有点悬t1>=30pts,t2>=35pts如果不是这样我直接AKIOI
又被鸟制裁了看着它那个b脸都觉得想吐还整天在我们班走来走去我上课睡觉怎么你啦又要写检讨我忘还球拍怎么你了又要处分我考试TLE怎么你了又要处分
是不是升职涨薪了清闲了想看检讨书fuckmmb我要一个完整的头骨原始人起洞我们是山里灵活的狗青春没有售价上课贴脸开大
佛一的机房真是烂mmb们根本不重视oi发展只想着收钱高三牲告诉你学io不要来佛一否则连cspj都ak不了

不予评价,我只是转录代码。

/*
选手 GD-S02059 成功提交题目 tree。
./GD-Senior/answers/GD-S02059/tree/tree.cpp size = 1037
*/
#include<bits/stdc++.h>
using namespace std;
//n<=20
int a[114514],b[114514],c[114514],u[114514],v[114514],h[114514];
int main(){
	ios::sync_with_stdio(0);//不要用scanf,printf
	cin.tie(0);
	//freopen("记得删注释.in","r",stdin);
	//freopen("迷惑行为.out","w",stdout);
	//本题需要ll(我认为即使是998244353年后都不会有树能长这么高) 
	int n;cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i]>>b[i]>>c[i];
		//解方程:b+cx<=1
		//当 c<0 时,x>=(1-b)/c
		
		//c>0时,种 i 天长 (b*i+(i*(i+1))/2*c) m
		//c<0,当 i <= (1-b)/c,长 (b*i+(i*(i+1))/2*c) m
		//c<0,当 i >= (1-b)/c,长 ((b*(1-b)/c+((1-b)/c*((1-b)/c+1))/2*c) + i-(1-b)/c) m
		
		//c>0时,需 b*i+(i*(i+1))/2*c>=a,b*i + (i*(i+1))/2*c>=a,b*i + c/2*i*i + c/2*i >= a,c/2i^2 + (b+c/2)i - a >= 0,开口朝上
		//i>=(-(b+c/2) + sqrt( (b+c/2)^2) + 2*a*c )/(c)
		//c>0时第 i 棵树要至少种够 (-(b+c/2) + sqrt( (b+c/2)^2) + 2*a*c )/(c) 天
		
		//c<0时,不想算了 
	}
	int s_b=0;//针对特殊性质B的计算
	int s_d=0; 
	for(int i=0;i<n-1;i++){
		cin>>u[i]>>v[i];
		s_b+=abs(v[i]-u[i]);
		s_d+=v[i];
	}
	if(s_b==n-1){
		//满足特殊B
		
	}if(s_d==n-1){
		//满足特殊D
		
	}
	//cout<< 
	return 0;
}

//这次S线应该挺高的吧

你会不定积分吗?

I WILL BE BACK!
				-Alan hu

下次再来。

我考了四年,
从没有过J的线。 
今年阴差阳错地蒙进了S复赛。
现在是17:33,
还有不到一个小时,
我感到迷茫、不知所措。 
我知道我并没有AC任何一道题的实力, 
只是我感到抱歉,
我辜负了许多的人。 
我怕被人笑话,
我也怕我将一事无成, 
但我只能是,
成为一个打随机数骗分的,
无能的青年。 

再见。