跳到正文

个人记录

CSP2023 GD J/S迷惑行为大赏

ran_qwq约 60 分钟
原文
文章信息与版本

文章信息

发布
2023年10月23日
收录
2026年3月2日
更新
2026年11月16日
篇幅
约 60 分钟

版本

  1. v2当前
  2. v1

Part 1:概况

本次 J 组共 21582158 人参赛,S 组共 22682268 人参赛。J 组共有 21452145 个人提交了文件夹,S 组共有 22582258 人提交了文件夹。J 组共有 81108110 个文件和 1047310473 个文件夹,S 组共有 82568256 个文件和 1087910879 个文件夹。

代码中 apple 出现 44574457 次,road 出现 46314631 次,uqe 出现 41544154 次,bus 出现 37603760 次,lock 出现 54285428 次,game 出现 44994499 次,struct出现 80588058 次,tree 出现 42904290 次。

#include 出现超过 2000020000 次,bits/stdc++.h 出现 1210512105 次,iostream 出现 34643464 次,cstdio 出现 27782778 次,/* 出现 19701970 次。

using namespace std; 出现 1583115831 次,main 出现 1662416624 次,return 0 出现 1901419014 次,#define 出现 62496249 次,if 和 for 均出现超过 2000020000 次,while 出现 1189511895 次。

freopen 出现超过 2000020000 次,stdin 出现 1782417824 次,stdout 出现 1772217722 次。

169169 个文件中有 333333 个 //freopen,6565 个文件中有 6767 个 "r",stdout,1010 个文件中有 1010 个 r,stdin 和 w,stdout,5757 个文件中有 6161 个 .in","w,6262 个文件中有 6666 个 .out","r,88 个文件中有 88 个 ,in",1515 个文件中有 1515 个 ,out",为以上选手默哀。

55 文件中有 77 个 fuck,6868 文件中有 316316 个 ccf,5353 文件中有 101101 个 love,66 文件中有 66 个某八位质数,187187 文件中有 315315 个 114514,2323 文件中有 3131 个 1919810,88 文件中有 1111 个 kkksc03,4444 文件中有 166166 个 ioi,1515 文件中有 5151 个 cxk。这次文明人相对减少,整活人较多。

8383 文件中有 339339 个 qwq,1010 文件中有 2222 个 qaq,1919 文件中有 112112 个 awa(全字匹配)。

Part 2:乐子

  1. 诈骗人
C++
	//freopen("never gonna give you up.mp4","r",stdin);
	freopen("bus.in","r",stdin);
	freopen("bus.out","w",stdout);
C++
//我想上洛谷迷惑行为大赏
//never gonna give you up
// T3 寄
  1. 膜拜人
C++
//orz pb AK NOI
//orz ntf AK NOI
//orz watermoon AK NOI
//orz lh AK IOI
//orz lzy AK IOI
//orz wlx AK IOI
//orz wrx AK APIO & love whq
//orz hwy AK NOIP & love 444
//orz hd AK CSP-S
//orz lbw AK CSP-J
  1. 要素过多人 + 文明人
C++
/*
高三了佛一是真的恶心两周一放一放一天来打csp都像是逃课一样根本没有时间上机这次进noip都有点悬t1>=30pts,t2>=35pts如果不是这样我直接AKIOI
又被鸟制裁了看着它那个b脸都觉得想吐还整天在我们班走来走去我上课睡觉怎么你啦又要写检讨我忘还球拍怎么你了又要处分我考试TLE怎么你了又要处分
是不是升职涨薪了清闲了想看检讨书fuckmmb我要一个完整的头骨原始人起洞我们是山里灵活的狗青春没有售价上课贴脸开大
佛一的机房真是烂mmb们根本不重视oi发展只想着收钱高三牲告诉你学io不要来佛一否则连cspj都ak不了
*/
  1. 追星人
C++
bool cxk(rod s,rod y)
{
	return s.u<y.u;
}
bool lbw(are s,are y)
{
	return s.d>y.d;
}
  1. 原批
C++
//There were a lot of words like "somebody AK IOI",but someone may be angry,so I delete it.

//Orz

//I am DengDuck,501947 QAQ.

//Genshin,Qi Dong!
C++
#include<bits/stdc++.h>//OMG i SUDDENLY know how to solve T4 XD
using namespace std;//Genshin Impact, Launched!
const int MAXN=100010;//Yuan shen, Qi Dong!
C++
//感觉不如原神
//Sound's not good as Genshin Impact
  1. 不可以总司令人,但是 CCF 用鼻子都造不出来这么水的数据吧
C++
	for(int i=0;i<n;i++) cout<<"ERR"<<endl;
C++
	cout<<"-1";
	//Minus 1,you are my god
  1. ???
C++
						pair<int,int> ran=make_pair<int,int>(i,ranges[ranges[i][j]+1][k]);
						if(vis3[ran]==true||vis[ran]==true) continue;
						ans++;
						newranges.push_back(ran);
						vis3[ran]=true;
  1. 手造数据人
C++
/*
20
2
long kkk
2
long cz
2
int xht
2
int xft
4
13

4
18

3
cz

2
long ltt
*/
  1. 被 jc 人
C++
namespace iakioi
  1. 考场心得人
C++
//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!!!
  1. rp 人 + 互关人
C++
/*
迷惑行为,启动!

T4 大样例 不开 -O2 720ms,开了 -O2 120ms
差了 6 倍,属实离谱

CSP-S RP=(__uint128_t)(-1);
CSP-S RP=(__uint128_t)(-1);
CSP-S RP=(__uint128_t)(-1);
CSP-S RP=(__uint128_t)(-1);
CSP-S RP=(__uint128_t)(-1);
CSP-S RP=(__uint128_t)(-1);
CSP-S RP=(__uint128_t)(-1);
CSP-S RP=(__uint128_t)(-1);
CSP-S RP=(__uint128_t)(-1);
CSP-S RP=(__uint128_t)(-1);

洛谷 UID 549499。欢迎互关。

S 组不搞迷惑行为了。
*/
  1. 整活过度人
C++
int main(){
	freopen("shabi.in","r",stdin);
	cin>>n>>d;
	for(int i=2;i<=n;i++){
		cin>>v[i];
		sum[i]=sum[i-1]+v[i];
	}
	for(int i=1;i<=n;i++){
		cin>>s[i];
	}
   ...
  1. ikun
C++
struct ikun{
	int fir,sec,min_time;
}a[114514];
bool cmd(ikun x,ikun y){
	return x.fir<y.fir;
}
  1. 洛谷人

C++
	//洛谷号:@Elysia_Tr(虽然整天不干正事,洛谷主页和博客很久没有翻新了)
	//bilibili:@吃苦瓜的德丽莎小姐
  1. 祝愿人 + 赞美洛谷人 + 歌词人 + 表白人
C++
#include<cstdio>//ccf祝我不挂分不要froepen不要搞反in和out不要写错文件名

...

/*
你说的对,但是洛谷luogu.com.cn是一个基于上海洛谷有限公司自主研发的开放编程学术讨论社区,
拥有上百万用户,在全国内家喻户晓,
是继codeforces和leetcode后第三个评测量超过一亿的OJ。
在洛谷中,你将扮演一名优秀的程序员,从零到有地学习OI知识,
从一只语法级别的蒟蒻学会差分约束,点分治等高级算法,最终成为无所不能的大佬。
第一次见到洛谷时,我的大脑仿佛停车场被龙卷风摧毁一般,过了好几分钟才缓过来。
洛谷是如此自由与优秀的一个编程学术社区啊!
精美的UI,自造的luogu空间,端庄的背景,开明的学习氛围,无限高质量的月赛与海量题库......
这一切都令我意识到,luogu是多么优秀的一个OJ。
就连世界上最优雅的艺术品也比不过FFT的优雅,蒙娜丽莎也要为莫比乌斯反演而动容。
拿破仑冲破了封建却冲不破lxl的卡常,孙中山分权制衡却没有cdq会分治。
那些喷luogu的人也只是在用luogu的自由讨论功能,激动地发表自己对于luogu的意见,帮助站长改善luogu。
对于那些极少数真正在无脑骂luogu的人,我只能说,好自为之。
没有使用过luogu的人只能度过一个相对失败的人生。
*/
C++
/*
Hey,once upon a younger year
when all our shadows disappear
the animals inside came out to play
when face to face with all our fears
learn our lessons through the tears
make memories we knew would never fade
one day my father he told me son don't let it slip away
he took me in his arm and I heard him say
when you get older your wild heart will live for younger days
think of me if ever you're afraid
he say one day you will leave the world behind
so live a life you will remember
my father told me when I was just a child
these are the nights will never die
my father told me
*/
C++
/*
普及怎么考图论啊?
我怎么不会卡常啊。。。在线表白lxl
*/
  1. 世末歌者人 + 倒序开题人
C++
//开题顺序:D, C, B, A。
//有人让我 10:00 写完,所以我就 10:00 整写完了。真好。用了半个小时对拍+检查,一个小时打小恐龙,半个小时默写。
//这次甚至没有去厕所。这很好,下午 CSPS 去厕所能获得的 RP 值就更多了。真好。
//希望不要 fst 捏。
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main()
{
	freopen("apple.in", "r", stdin);
	freopen("apple.out", "w", stdout);
	int n, ans = 0, pos = -1;
	cin >> n;
	while (n)
	{
		if (pos == -1 && n % 3 == 1) pos = ans + 1;
		n -= ceil(n / 3.0), ans++;
	}
	cout << ans << ' ' << pos;
	return 0;
}
//尝试默写世末歌者,但是发现自己技不如人,几段高潮的词都不是一模一样的,
//导致我后面几段全忘了。这不太好,但是可以让下午的 RP++,这就很好。
//update:太难默了,词大体都记得,但是每一个部分到底是哪一个真的好难记啊。
//		  为了避免掉 RP,中午要回去复习世末歌者。
//		  下午大抵是没时间的,所以只要求背诵不要求默写。

//【第一段】
//	蝉时雨 化成淡墨渲染暮色
//	渗透着 勾勒出足迹与车辙
//	欢笑声 与漂浮的水气泡和
//	隔着窗 同城市一并模糊了
//	拨弄着 旧吉他 哼着四拍子的歌
//	回音中 一个人 仿佛颇悠然自得
//	等凉雨 的温度 将不安燥热中和
//	寻觅着 风的波折
//【第一个高潮】
//	我仍然在 无人问津的阴雨霉湿之地
//	和着雨音 唱着没有听众的歌曲
//	人潮仍是 漫无目的地向目的地散去
//	忙碌着 无为着 继续
//	等待着谁 能够将我的心房轻轻抨击
//	即使是你 也仅仅驻足了片刻便离去
//	想着或许 下个路口会有谁与我相遇
//  忙碌着 无为着 继续
//【第二段】
//	夏夜空 出现在遥远的记忆
//	绽放的 璀璨花火拥着翻新
//	消失间 做出最温柔的给予
//	亦如那些 模糊身影的别离
//	困惑着 拘束着 如城市池中之鱼
//	或哽咽 或低泣 都融进了泡沫里
//	拖曳疲 惫身躯 沉入冰冷的池底
//	注视着 色彩褪去
//【第二段的高潮】
//	忘记了。这很不好。
//	我仍然在 无人问津的阴雨霉湿之地
//	和着雨音 唱着卖不出去的歌曲
//	......
//	想着或许 下个路口会有谁与我相遇
//	哭泣着 祈求着 继续
//【中间好像还有东西,但是我忘了】
//【第三个高潮】(?)
//	【低音】
//	我仍然在 无人问津的阴雨霉湿之地
//	和着雨音 唱着卖不出去的歌曲
//	人潮仍是 漫无目的地向目的地散去
//	忙碌着 无畏着 继续
//	【高音】
//	请别让我 独自匍匐于滂沱世末之地
//	和着雨音 唱着见证终结的歌曲
//	......
//
//【最后一个高潮】
//	请别让我 独自匍匐于滂沱世末之地
//	和着雨音 唱着见证终结的歌曲
//	人们终于 结束了寻觅呆滞伫立原地
//	哭泣着 祈求着 继续
//	用着双手 独自弹起染了锈迹的弦音
//	和着雨音 唱着见证终结的歌曲
//	人们终于 结束了寻觅呆滞伫立原地
//	将颤抖的双手牵起
//	迎来每个人的结局
  1. 考场作文人
C++
/*
今天天气好像突然就冷了下来。
往日一栋栋高楼大厦总是遥不可及,但经过细雪的洗礼,却如平日里普通的装饰品,只是为了衬托这高洁的雪而存在的——最后仍是映入这凡世间了。
街道里万籁俱寂,就连落叶,也只是悄悄的滑落下来,而不再向人们炫耀那无聊却往往被赞赏的舞姿了。
小鸟仍在安眠;太阳昏昏沉沉的;月亮抱着星星睡得正香。
这座城市也仍在睡着,各家各户的灯都灭了,黑暗席卷了整个天空。
所有的一切被抹除掉了,整个世界上,只有雪——雪在飘落着。
她在述说着什么?亦或者只是人类的痴心妄想呢?
雪不会回答——她只会笑着看着你,任你自己猜去。
我们却总能幻想出来所谓的回答……
她怎么会开口呢?
在这样一个清晨,一个沉默的清晨!
……在所有的一切都安眠着的时候,她又怎么会吵醒这个小小的世界呢?
一切的战争,烦恼,苦难,幸福,都与她无关。
她只是漫无止境地飘落着,直到春的到来……

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

她默默地退到幕后,观赏着这个世界,这样一场盛大的表演。
唯一的观众。
*/
  1. 注释人
C++
				if((long long)((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)!=((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)){
					ans=ans+((long long)((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)+1)*a[now];
					oil=(oil*1.0/*已有的油*/+((long long)((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)+1)-(v[i]-far*1.0)/d*1.0/*过去的油*/);
				}
				else{
					ans=ans+((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)*a[now];
					oil=(oil*1.0/*已有的油*/+((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)-(v[i]-far*1.0)/d*1.0/*过去的油*/);
				}
				far=v[i];
				now=i;
			}
		}
		if(f){
			int i=n;
			if((long long)((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)!=((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)){
				ans=ans+((long long)((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)+1)*a[now];
				oil=(oil*1.0/*已有的油*/+((long long)((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)+1)-(v[i]-far*1.0)/d*1.0/*过去的油*/);
			}
			else{
				ans=ans+((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)*a[now];
				oil=(oil*1.0/*已有的油*/+((v[i]-far*1.0)/d*1.0/*过去的油*/-oil*1.0/*已有的油*/)-(v[i]-far*1.0)/d*1.0/*过去的油*/);
  1. 大样例人
C++
	if(p==1){
		printf("-3+3*sqrt(3)\n");printf("30\n");printf("-4/5+2*sqrt(2)\n");printf("NO\n");printf("-10+sqrt(3)\n");printf("NO\n");printf("-10\n");printf("-5/2+2*sqrt(2)\n");printf("6+3*sqrt(7)\n");printf("NO\n");printf("NO\n");printf("-8+5*sqrt(7)\n");printf("3+9*sqrt(5)/4\n");printf("-3\n");printf("-9+sqrt(6)\n");printf("-3+7*sqrt(6)\n");printf("15\n");printf("NO\n");printf("3+3*sqrt(6)\n");printf("NO\n");printf("-4+2*sqrt(10)\n");printf("-8+8*sqrt(10)\n");printf("NO\n");printf("1+6*sqrt(7)\n");printf("NO\n");printf("-5/4+sqrt(97)/4\n");printf("1\n");printf("10+9*sqrt(5)\n");printf("-9+3*sqrt(6)\n");printf("3+7*sqrt(2)\n");printf("NO\n");printf("31/5\n");printf("3+sqrt(5)\n");printf("-2\n");printf("25/3\n");printf("NO\n");printf("-2\n");printf("-2\n");printf("1+2*sqrt(6)\n");printf("NO\n");printf("-1+6*sqrt(2)\n");
        ...
  1. 文言文人
C++
/*
ren xu zhi qiu,qi yue ji wang,su zi yu ke fan zhou you yu chi bi zhi xia,qing feng xu lai,shui bo bu xing,song ming yue zhi shi,ge yao tiao zhi zhang.
shao yan,yue chu yu dong shan zhi shang,pai huai yu dou niu zhi jian.kou xian er ge zhi,ge yue:gui zhao xi lan jiang,ji kong ming xi shuo liu guang,miao miao xi yv huai,wang mei ren xi tian yi fang.
ke you chui dong xiao zhe,yi ge er he zhi,qi sheng wu wu ran,ru yuan ru mu,ru qi ru su,wu you he zhi qian jiao,qi gu zhou zhi li fu.
su zi qiu ran,zheng jin wei zuo er wen ke yue:he wei qi ran ye?
ke yue:yue ming xing xi,wu que nan fei,ci fei cao meng de zhi shi hu?dong wang xia kou,xi wang wu chang,shan chuan xiang liao,yu yu chang chang,ci fei meng de zhi kun yu zhou liang zhe hu?
fang qi po jing zhou,xia jiang ling,shi jiu lin jiang,heng shuo fu shi,gu yi shi zhi xiong ye,er jin an zai zai?
kuang wu yu zi you yu jiang zhu zhi shang,lv yu xia er you mi lu,jv pao zun yi xiang shu,han fu you yu tian di,miao chang hai zhi yi su,ai wu sheng zhi xu yu,xian chang jiang zhi wu qiong,xie fei xian yi ao you,bao ming yue er chang zhong,zhi bu ke hu zhou de,tuo yi shang yu bei feng.
su zi yue:ke yi zhi fu shui yv yue hu?shi zhe ru si,er wei chang wang ye,ying xu zhe ru bi,er zu mo xiao zhang ye.
fu tian di zhi jian,wu ge you zhu,sui yi hao er mo qu,wei shan jian zhi qing feng,yu jiang shang zhi ming yue,er de zhi wei sheng,mu yu zhi cheng se,shi zao wu zhe zhi wu jing zhang ye,er you he xian hu?
ke xi er xiao,xi zhan geng zhuo,yao he ji jin,bei pan lang ji.xiang yu zhen jie hu zhou zhong,bu zhi dong fang zhi ji bai.
*/
C++
/*
qing li si nian chun,teng zi jing zhe shou ba ling jun,yue ming nian,zheng tong ren he,bai fei jv xing,nai chong xiu yue yang lou,zeng qi jiu zhi,ke tang xian jin ren shi fu yu qi shang,zhu yu zuo wen yi ji zhi.
yu guan fu ba ling sheng zhuang zai dong ting yi hu,xie yuan shan,tun chang jing,hao hao shang shang,heng wu ji ya,zhao hui xi yin,qi xiang wan qian,ci ze yue yang lou zhi da guan ye,qian ren zhi shu bei yi.ran ze bei tong wu xia,nian ji xiao xiang,qian ke sao ren,duo hui yu ci,lan wu zhi qing,de wu yi hu?
ruo fu yin yu fei fei,lian yue bu kai,yin feng nv hao,zhuo lang pai kong,ri xing ying yao,shan yue qian xing,shang lv bu xing,qiang qing ji cui.deng si lou ye,ze you qu guo huai xiang,you chan wei ji,man mu xiao ran,gan ji er bei zhe yi.
zhi ruo chun he jing ming,bo lan bu jing,shang xia tian guang,yi bi wan qing,sha ou xiang ji,jin lin you yong,an zhi ting lan,yu yu qing qing;er huo chang yan yi kong,hao yue qian li,fu guang yue jin,jin ying chen bi,yu ge hu da,ci le he ji!deng si lou ye,zhe xin kuang shen yi,chong ru jie wang,ba jiu lin feng,qi xi yang yang zhe yi.
jie fu,yu chang qiu gu ren ren zhi xin,huo yi er zhe zhi wei,he za?bu yi wu xi,bu yi ji bei,jv miao tang zhi gao ze you qi min,chu jiang hu zhi yuan ze you qi jun,shi jin yi you,tui yi you,ran ze he shi er le ye?qi bi yue:xian tian xia zhi you er you,hou tian xia zhi le er le.yi!wei si ren,wu shui yu gui.
shi liu nian jiu yue shi wu ri.
*/
  1. road1 人 + 暴戾人
C++
	freopen("road1.in","r",stdin);
//	freopen("road.out","w",stdout);
...

//		cout<<"sb\n";
  1. 暴戾人 2
C++
long long cnm;
string s;
int main(){
	freopen("game.in","r",stdin);
	freopen("game.out","w",stdout);
	cin>>n>>s;
	for(int i=1;i<n;i++){
		if(s[i-1]==s[i]){
			cnm++;
			Dis[++d]=i-1;
		}
	}
	for(int i=2;d!=0;i+=2){
		c=d;
		d=0;
		for(int j=1;j<=c;j++){
			if(Dis[j]-1>=0){
				if(s[Dis[j]-1]==s[Dis[j]+i]){
					cnm++;
					Dis[++d]=Dis[j]-1;
				}
			}
			if(j>1&&Dis[j]-1==Dis[j-1]+i+1){
				cnm++;
			}
		}
	}
	cout<<cnm;
	return 0;
}
  1. 表白人
C++
// I love WHQ!
  1. 打表人
C++
	if(n%3==1)return cout<<1,0;
	else if(n%9==2||n%9==6)return cout<<2,0;
	else if(n%27==3||n%27==9||n%27==17||n%27==23)return cout<<3,0;
	else if(n%81==5||n%81==14||n%81==26||n%81==35||n%81==45||n%81==54||n%81==66||n%81==75)return cout<<4,0;
	else if(n%243==8||n%243==21||n%243==39||n%243==53||n%243==68||n%243==81||n%243==99||n%243==113||n%243==129||n%243==143||n%243==161||n%243==174||n%243==189||n%243==203||n%243==221||n%243==234)return cout<<5,0;
	else if(n%729==12||n%729==32||n%729==59||n%729==80||n%729==102||n%729==122||n%729==149||n%729==170||n%729==194||n%729==215||n%729==242||n%729==261||n%729==284||n%729==305||n%729==332||n%729==351||n%729==377||n%729==396||n%729==423||n%729==444||n%729==467||n%729==486||n%729==513||n%729==534||n%729==558||n%729==579||n%729==606||n%729==626||n%729==648||n%729==669||n%729==696||n%729==716)return cout<<6,0;
  1. 高级打表人

  1. 考场感受人
C++
//我写过的最长的程序[笑]
  1. rp 人
C++
//-------------------------------RP++-------------------------------
C++
//骰子哥保佑
//rp++;
//小伟保佑
//一等来一个好不好,秋梨膏
C++
using namespace std;//CSP-J/S rp++
C++
		int rp=inf;
		printf("%lld",dis[n]>=rp?-1:dis[n]);
C++
//while(1)rp++;
C++
//rp++!比完赛我(边哭边)接着写大模拟
  1. QAQ__
C++
#include <bits/stdc++.h>
#define int long long
using namespace std;
char a[2000005]; unsigned long long Cubic[2000005], sc84bbs[2000005]; stack<char> s;
int TLEWA(int l, int r) {
if (l == r) return 0;
int mid = (l + r) / 2; while (!s.empty()) s.pop(); unsigned long long rzh = 0;
for (int i=mid+1; i-->l; ) if (s.empty() || s.top() != a[i]) {s.push(a[i]); Cubic[i] = (rzh += sc84bbs[s.size()] * a[i]);} else {Cubic[i] = (rzh -= sc84bbs[s.size()] * a[i]), s.pop();}
while (!s.empty()) s.pop(); rzh = 0;
for (int i=mid+1; i<=r; i++) if (s.empty() || s.top() != a[i]) {s.push(a[i]); Cubic[i] = (rzh += sc84bbs[s.size()] * a[i]);} else {Cubic[i] = (rzh -= sc84bbs[s.size()] * a[i]), s.pop();}
//for (int i=l; i<=r; i++) cout << Cubic[i] << ' ';
sort(Cubic+l, Cubic+mid+1); int summ=0; for (int i=mid+1; i<=r; i++) summ += upper_bound(Cubic+l, Cubic+mid+1, Cubic[i]) - lower_bound(Cubic+l, Cubic+mid+1, Cubic[i]); /*cout << l << ' ' << r << ' ' << summ << endl;*/ return summ + TLEWA(l, mid) + TLEWA(mid+1, r);
}
signed main() {
freopen("game.in", "r", stdin); freopen("game.out", "w", stdout); ios::sync_with_stdio(0);
int n; cin >> n; sc84bbs[0] = 1; for (int i=1; i<=n; i++) cin >> a[i], sc84bbs[i] = sc84bbs[i-1] * 131;
cout << TLEWA(1, n); return 0;
}

// 希望这题别挂。rp++

// 16:40
C++
// 宇宙射线好闪,拜谢宇宙射线
// 希望这题有分
// 17:50
  1. 故事人 + 字符画人
C++
/*
+--------+     +--+  +--+  IS Problem Too hard to solve.
|        |\    |  |  |  |
+--+  +--+ |   |  |  |  |
 \_|  |\__\|   |  |__|  |
   |  | |      |        |
   |  | |      |  +--+  |
   +--+ |      |  |  |  |
    \  \|      |  |  |  |
     ---+      +--+  +--+

...

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.
*/
  1. froepen & fropen & freeopen
C++
	freopen("struct.in","r",stdin);
	froepen("struct.out","w",stdout);
C++
	fropen("game.in","r",stdin);
	fropen("game.out","w",stdout);

  1. treee & stuct
C++
	freopen("tree.in","r",stdin);
	freopen("treee.out","w",stdout);
C++
	freopen("struct.in","r",stdin);
	freopen("stuct.out","w",stdout);
  1. 游记人
C++
//yyh~
//上午J-T2寄 这回S-T2直接立                        15:28:58
//T3 水了20pts 回来想T2                            16:20:09
//递归/dp?国庆做了一道类似的题是dp但是不确定 awa  16:24:15
//先写个爆搜吧                                     16:29:50
//写出了O(2^n)的弱鸡暴力 25pts                     16:39:52
//想出dp做法O(n^2)                                 16:43:15
//好吧区间dp其实是O(n^3) 25pts                     17:14:19
//大样例寄qwq -25pts                               17:29:28
//T4水了特殊性质 +10pts                            17:57:57
//T3又水了一个点 +15pts                            18:18:43
//估分 175pts~200pts (比普及分还高 我是蒟蒻)
//S 2=应该有了 ;  J 1=肯定有了
//还是不甘心啊 J-T2能切的没分配好时间啊
//看来我的技术比去年有很大提升 (S组题目太简单)
//准备就要中考了  祝我自己:
//           !!!   RP++  !!!                       18:23:30
  1. emotional damage
C++
/*
struct emotional{
	string name;
	long long emolen;
};
emotional damedane[125];
*/
C++
void emo(long long i,long long j){
	if(i < 1 or j > n)return;
	if(a[i] == a[j] && b[i] != true && b[j] != true){
		ans++;
		b[i] = true;
		b[j] = true;
		if(b[i - 1] != true)emo(i - 1,j + 1);
		else ans++;
	}
	emo(i + 1,j + 1);
	return;
}
  1. 拜谢人
C++
/*
	*					  *
	*		  *			  * 		 *
	*					  * 		 * 					 ****     *****
	*		  *	  ******  ******  ******* 				*    *       *
	*		  *   *	   *  *	   * 	 * 					* 	 * 		*
	*		  *	  *    *  *	   *	 * 					* 	 * 	   *
	********  *	  ******  *    * 	 ***    ********     **** **  *****
					   *
					   *
				  ******
	Light_az 好闪,拜谢 Light_az
*/
C++
/*
ZYL 好帅!
ZYL S 班太强了!
ZYL 好闪,拜谢ZYL!
*/
  1. 感谢人 + 膜拜人
C++
/*
thank you ccf

%%%%%% sto 		 orz %%%%%%
%%%%%% sto 		 orz %%%%%%
%%%%%% sto 	HZJ	 orz %%%%%%
%%%%%% sto 		 orz %%%%%%
%%%%%% sto 		 orz %%%%%%
*/
  1. 信心人
C++
// will AKCSPJ!
  1. 诈骗人
C++
/*
迷惑行为,启动!

We are not strangers to love
You know the rules and so do I
A full commitment what I am thinking of
You wouldn't get this from any other guy
I just wanna tell you how I am feeling
Gonna make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
*/
  1. 解密人 + 偷看人
C++
//10.7 每日解密答案当然是 `genshin impact 启 动`,不会有人看不出来吧


//刚刚考场让打开checker,看到坐旁边的居然只写了game.cpp?
  1. IOI 人
C++
/*
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
*/
  1. int mian

  1. 卡评测人

  1. cpp 人
C++
	freopen("apple.cpp","R",stdin);
	freopen("apple.cpp","W",stdout);
C++
	freopen("road.cpp","r",stdin);
	freopen("road.cpp","w",stdout);
  1. txt 人
C++
	freopen("struct.in.txt","r",stdin);
	freopen("struct.out.txt","w",stdout);
  1. 虚晃一枪
C++
//	freopen("bus1.in","r",stdin);
//	freopen("bus1.out","w",stdout);
//	freopen("bus2.in","r",stdin);
//	freopen("bus2.out","w",stdout);
//	freopen("bus.in","w",stdout);
//	freopen("bus.out","r",stdin);
//	freopen("bes.in","w",stdout);
//	freopen("bes.out","r",stdin);
//	freopen("bus.in","w",stdin);
//	freopen("bus.out","r",stdout);
//	freopen("bes.in","w",stdin);
//	freopen("bes.out","r",stdout);
//	freopen("bas.in","w",stdin);
//	freopen("bas.out","r",stdout);
	freopen("bus.in","r",stdin);
	freopen("bus.out","w",stdout);
  1. 没输入人 + 乱打人 + 启动人
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("lock.out","w",stdout);
	cout << "jdlasfja;sdkfjas;dkfjslajdfkaiejnkfajlkdjsfiaefjkdsfnklmndsalejfifjaslsdkojeiiejkjasfdasjdflajf;dalfjiaefjkdajsdncnkdsajflk adfiefjaskdfj";
	system("start cmd");
	system("start look.exe");
}
  1. 输出到 exe
C++
	freopen("lock.in","r",stdin);
	freopen("lock1.exe","w",stdout);
  1. upe + ans 人
C++
	freopen("upe.in", "r", stdin);
	freopen("upe.ans", "w", stdout);
  1. cout>> & cin<< 人
C++
	cout>>-1;
C++
	for(int i=1;1;i++){
		if(qy(num,i)==0){
			cout>>
		}
	}
C++
	cin<<t<<m<<a<<b<<c
C++
	string it[5]{,"byte","short","int","long"};
	cin>>n;
	for(int i=1;i<=n;i++){
	cin<<op;
  1. print 人
C++
		print("%d",ans);
  1. longlong 人
C++
			if((longlong)temp==temp){
C++
longlong high[N];
C++
	mp['int']=4,mp['short']=2,mp['longlong']=8,mp['byte']=1;
  1. 百越败的
C++
/*
The moon is very light, we need to thank her.
*/
  1. upe + 不可以总司令
C++
	freopen("upe.in","r",stdin);
	freopen("upe.out","w",stdout);
	int N,P;
	cin>>N>>P;
	for(int i=0;i<N;i++)
	{
		cout<<"NO"<<endl;
	}
  1. 大数组人
C++
const int N=2e4+100;
long long n,m,k,a[N],timm=0,tendd;
bool vis[N][N],mp[N][N];
  1. AKCSPJ 人 & CCF 人
C++
//happy ending (Hopefully)
//kind CCF

//        a       k   k        ccccccc   ssssssss  pppppppp               jjjjjjjjj
//       a a      k  k        c       c s        s p       p                  j
//      a   a     k k        c          s          p       p                  j
//     aaaaaaa    kk         c           ssssssss  pppppppp   -----------     j
//    a       a   k k        c                   s p                          j
//   a         a  k  k        c       c s        s p                      j   j
//  a           a k   k        ccccccc   ssssssss  p                       jjj
  1. 禁赛警告
C++
cout<<"I love CCF";
return 0;
  1. 膜拜 CCF + ccf 1-4
C++
int ccf, ccf2, ccf3, ccf4, cnt;
void sovle(){
	if(cnt > 2) cout << 0 << endl;
	cnt = 0;
	for(int i = 1; i <= 5; i++){
		if(a[1][i] != a[2][i]){
			cnt++;
			if(cnt == 1){
				ccf = a[1][i];
				ccf2 = a[2][i];
			}
			if(cnt == 2){
				ccf3 = a[1][i];
				ccf4 = a[2][i];
			}
		}
	}
	if(cnt == 1) printf("10"), exit;
	int ans = 0;
	if(ccf == ccf2 && ccf3 == ccf4) ans = 8;
	else ans = 4;
	printf("%d", ans);
}

...

/*
ccf give me the point, please!
sto ccf orz
sto ccf orz
sto ce_375 orz
sto wuruiheng orz
sto sutong2009 orz
sto GBX123 orz
sto Setp orz
sto lin2 orz
sto xiaosuan orz
AFO. at 2023/10/21/18:27:00 zsjz
*/
  1. 不会做
C++
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
	//不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做不会做
  1. 抽象人
C++
//文野赛高!每一个看迷惑代码的人都要接受我的安利!太中芥敦双首领yyds!
//安吾推也要学编程(头秃ing
//剧本组救救我。。。
//就是说,提高组会不了一点
//嗯,为了有人看到,打个rand
//I very very very very very love you,CCF.
//好好好除了样例一我还没找到对的答案(捂脸
//著名场景:知道哪里错了,但不会改:):):)
//激情澎湃,一班不败,斗志昂扬,一班最强(不是
C++
//用数组模拟存储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!
  1. 文化课不好
C++
/*

my first CSP-J , i think i can get 260pts, maybe 1=
i use too much time in B, it cause me didnt have much time to solve C
at all, its not a good mark, in the next year, i want to solve more problem

i am not good at whk(so maybe lots of grammar mistake haha), i need to work hard in whk before CSP-J

good luck.

*/

// 10pts
  1. 警钟长鸣 + cxk 人
C++
using namespace std;//Jing Zhong Chang Ming.
const int MAXN=2000010;//REMEMBER!!!!!!!!!!!!!!!!!!

...

	freopen("game.in","r",stdin);//omg it takes me 2.5 hour.
	freopen("game.out","w",stdout);//enough to learn basketball like cxk. XD
  1. 歌词人 2
C++
/*
we are one of kind inrreplacedable
how did I get so blind and so cynical
if there is love in this life there's no obstical
no,we can't be defeated
Monday left me broken
Tuesday I was through with hoping
Wedensday my empty arms were open
Thursday waiting for love,waiting for love
thanks the stars it's Friday
I'm burning like a fire gone wild on Saturday
guess I won't be comming to church on Sunday
I'll be waiting for love,waiting for love
*/
  1. 头文件人
C++
#ifndef _GLIBCXX_DEBUG_DEQUE
//#define _GLIBCXX_DEBUG_DEQUE 1
//
//#include <deque>
//#include <debug/safe_sequence.h>
//#include <debug/safe_iterator.h>
//
//namespace std _GLIBCXX_VISIBILITY(default)
//{
//namespace __debug
//{
//  /// Class std::deque with safety/checking/debug instrumentation.
//  template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
//    class deque
//    : public _GLIBCXX_STD_C::deque<_Tp, _Allocator>,
//      public __gnu_debug::_Safe_sequence<deque<_Tp, _Allocator> >
//    {
//      typedef  _GLIBCXX_STD_C::deque<_Tp, _Allocator> _Base;
//
//      typedef typename _Base::const_iterator _Base_const_iterator;
//      typedef typename _Base::iterator _Base_iterator;
//      typedef __gnu_debug::_Equal_to<_Base_const_iterator> _Equal;
//    public:
//      typedef typename _Base::reference             reference;
//      typedef typename _Base::const_reference       const_reference;
//
//      typedef __gnu_debug::_Safe_iterator<_Base_iterator,deque>
//						    iterator;
//      typedef __gnu_debug::_Safe_iterator<_Base_const_iterator,deque>
//						    const_iterator;
//
//      typedef typename _Base::size_type             size_type;
//      typedef typename _Base::difference_type       difference_type;
//
//      typedef _Tp				    value_type;
//      typedef _Allocator			    allocator_type;
//      typedef typename _Base::pointer               pointer;
//      typedef typename _Base::const_pointer         const_pointer;
//      typedef std::reverse_iterator<iterator>       reverse_iterator;
//      typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
//
  1. AKIOI 人
C++
const char base[10][100]={"I AK IOI","byte","short","int","long"};
C++
			string akioi;
			cin>>akioi;
			cout<<area[akioi].l;
  1. 注释 freopen 人 + AKIOI 人 + 留名人
C++
int main ()
{
	//freopen("lock.in","r",stdin);
	//freopen("lock.out","w",stdout);//qwq

	int a;
	qr3(a);

	cout << a << 114514;//in
	string q;
	q = "\nI will ak IOI !\n";
	cout << q;
	cout << "/`\nqwq";

	int n;
	cout << cin >> n;
	int cin>>n,n;
	cout << op << ysqd << cin >> n;

	return 0;
}



//ak 下面






//我我我…f…我要进奇葩代c码大赏qcwq by :_Error_And_Bug_ (k这个c蒟蒻实在u不会辣qfwq
  1. you will get 0 if:
C++
/*
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
怎么说呢,这次考得不怎么好
希望正在看这个代码的人能考好吧
*/
  1. 此生无悔入 OI,来世愿做 OI 人
C++
//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!
  1. feropen
C++
	freopen("uqe.in","r",stdin);
	feropen("uqe.out","w",stdout);
  1. 把 csp 当成 CF 打的……
C++
/*
《FSTream》
00:08:17  A  Wrong answer on test 7 [main tests] -> 1145141000
00:19:26  B  Wrong answer on test 69 [main tests] -> 1145141919
00:45:14  C  Time limit exceeded on test 24 [main tests] -> 1145144353
01:54:18  F  Pretests passed [pretests] -> 1145151919
02:33:33  D  Wrong answer on test 42 [main tests] -> 1145159982
02:36:11  A  has been locked
02:36:15  B  has been locked
02:36:21  C  has been locked
02:36:24  D  has been locked
02:36:29  F  has been locked
02:48:16  F  Hacked by tourist
02:59:59  F  Unsuccessful hacking attempt of tourist's solution
*/
原文
存档评论11 条抓取于