CSP2023-S GD 迷惑行为大赏

CSP2023-S GD 迷惑行为大赏

友情链接:游记

撤下私信 luogu@yukimianyan

首先不难写出一个 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。
  • #define int long long 585 次。我仍然坚持 #define int long long 是坏文明这一观点。

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.
      

编译错误

GD-S*****/lock/lock.cpp: In function ‘int main()’:
GD-S*****/lock/lock.cpp:7:63: error: reference to ‘lock’ is ambiguous
    7 |         for(int i=1;i<=n;i++)for(int j=1;j<=5;j++)scanf("%d",&lock[i][j]);
      |                                                               ^~~~
In file included from /usr/include/c++/11/future:38,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:105,
                 from GD-S*****/lock/lock.cpp:1:
/usr/include/c++/11/mutex:591:5: note: candidates are: ‘template<class _L1, class _L2, class ... _L3> void std::lock(_L1&, _L2&, _L3& ...)’
  591 |     lock(_L1& __l1, _L2& __l2, _L3&... __l3)
      |     ^~~~

https://zh.cppreference.com/w/cpp/thread/lock

const int N=8e4+5;
char ch[N];
int n,f[N][N]={0};
bool s[N][N]={0};

debuff 叠满,编译器我今天跟你爆了!!!

GD-S*****/lock/lock.cpp:2:10: fatal error: windows.h: No such file or directory
    2 | #include <windows.h>
      |          ^~~~~~~~~~~
compilation terminated.

啊?

GD-S*****/struct/struct.cpp:1:6: fatal error: bis/stdc++.h: No such file or directory
    1 | #include<bis/stdc++.h>
      |      ^~~~~~~~~~~~~~
compilation terminated.

啊?

GD-S*****/tree/tree.cpp:13:29: error: invalid operands of types ‘int’ and ‘double’ to binary ‘operator%’
   13 |         printf("%lld",rand()%1e9+1);
      |                       ~~~~~~^~~~
      |                           |  |
      |                           |  double
      |                           int

各位不用过编译的吗?

GD-S*****/game/game.cpp:6:1: error: ISO C++ forbids declaration of ‘checkd’ with no type [-fpermissive]
    6 | checkd(int i,int j){
      | ^~~~~~

-fno-ms-extensions

GD-S*****/game/game.cpp:8:8: error: ISO C++ forbids declaration of ‘ck’ with no type [-fpermissive]
    8 | inline ck(int x,int y){
      |        ^~
GD-S*****/game/game.cpp:17:8: error: ISO C++ forbids declaration of ‘nck’ with no type [-fpermissive]
   17 | inline nck(int x,int y){
      |        ^~~

-fno-ms-extensions

GD-S*****/struct/struct.cpp:14:8: error: ISO C++ forbids declaration of ‘val’ with no type [-fpermissive]
   14 | inline val(string x) {
      |        ^~~

-fno-ms-extensions

./GD-Senior/answers/GD-S*****/lock/lock.cpp:9:19: error: ‘int brk’ redeclared as different kind of entity
    9 | int n,m,ans=0,x,y,brk;
      |                   ^~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
                 from /usr/include/signal.h:328,
                 from /usr/include/c++/11/csignal:42,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:43,
                 from ./GD-Senior/answers/GD-S*****/lock/lock.cpp:1:
/usr/include/unistd.h:1070:12: note: previous declaration ‘int brk(void*)’
 1070 | extern int brk (void *__addr) __THROW __wur;
      |            ^~~

啊???

const int N=1e8+10;
struct node{
	ll lens;
	string s;
}c[N];

MLE

选手 GD-S***** 成功提交题目 lock。
./GD-Senior/answers/GD-S*****/lock/lock.cpp size = 228
#include<bits/stdc++.h>
using namespace std;

int main(){
	freopen("look.in","r",stdin);
	freopen("look.out","w",stdout);
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>b[i];
	}
	cout<<8;
	fclose(stdin);
	fclose(stdout);
	return 0;
}

别太离谱了

作文鉴赏

//用数组模拟存储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 吗?

/*
1
100000000000000000 10 100000
// dou guai ni, hai de wo mei xie wan C ti!!!!!!!!!
*/

!!!

GD-S***** struct 未找到选手程序
    
GD-S***** tree 成功提交程序
./GD-Senior/answers/GD-S*****/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 的。出来好多这个,还有打表的也有好多 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!

//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
怎么说呢,这次考得不怎么好
希望正在看这个代码的人能考好吧 
*/

是的,我考的挺好的。

当事人注:请忽略我在考场上的若智发言,也祝贺你能在NOIP2023获得好成绩,谢谢!——w**34

//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。来诈骗我的?好像写了,“strange code collection”。

/*
选手 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线应该挺高的吧

计算,无尽的计算……

/*
int CSP_J_RP=100,CSP_S_RP=100;
CSP_S_RP+=CSP_J_RP,CSP_J_RP=0;
*/

什么弃 J 保 S。

	//The Code prints ERR.
	//Just like my brain.
	//It ERRed 3 hour.
	//XD.

//I gotta do T4.
//T4 is ez :)

确实。

选手 GD-S***** 成功提交题目 struct。
./GD-Senior/answers/GD-S01001/struct/struct.cpp size = 712
#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("struct.in","r",stdin);
	freopen("struct.out","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	return 0;
}
/*
	每年都有一场重要的比赛在四月和十二月的踏春日召开――是属于我们小孩自己的纸飞机大赛。自从上次我
在冬季纸飞机大赛败于8强晋级之时,我就开始准备下场春季纸飞机大赛。 
	一月,寒风凛冽。我站在家院前试飞我的飞机。我用着冰凉颤抖的右手将我的纸飞机甩出。飞机微微抖动他
的翅膀,迎接的风对他的招唤,与峰共同完成了一只华丽的舞蹈。只是可惜,我的飞机再一次因重心不稳,摔倒
于地。我急促地跑过去,想保护我的飞机,不遭受坠机的苦难。但是可惜……我捡起飞机将他再次带回家中。
反复如此,太阳在一月落下了…… 
	二月,春暖花开,我的飞机再次起航,这次飞机没有早早坠落,而是欢喜得像只蝴蝶一样在空中转了一
圈又一圈。“明明是万物复苏的季节,怎么飞机依然没有‘复苏’“。这个月仍然如此,我怀着复苏梦迈入了
三月的大门。
	春季,从未让我失望,我的纸飞机终于试飞成功了,我的复苏梦得以实现。成功试飞之后,我瘫倒在草
地上,拥抱着春天,长舒一口气,用着仅剩的力气抬起手臂欢呼。鲜花野草簇拥着我这个胜利者。目前离大赛
虽然已经不远了,但是我已经丝毫不慌张,悬着的心已经落下。我趁着还有些时间,用春天的颜色将飞机装饰
,将飞机归属于春天,想必这一定是最好的作品吧。 
*/

纸飞机是什么东西的象征?

/*
2023
我开始写下
我喜 
一直藏在
准确来说 
不上她的博学
真的会有
别了吧我在发 
851814113591912911472698114
*/

/*
1021
这些东西
欢她很久了
心里从不
应该是钦
她的优雅
9班的人
电这样多 
912151951325851182020152698114
*/

/*
1806
实话说
大概是从初二
敢说出口,因为
慕吧,感觉我配
与气质 
看到这些吗
社死啊
238120116518653207918121985919 
*/

可以输入逗号。

/*
关注B站 
@滴锥
谢谢喵 
*/

快去关注

/*
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
保佑我S1=
luogu uid = 341036 
*/

快去保佑他

/*
unbelieveable
how i do it
i hope i can get 2=
*/

难以置信!

/*
I can't do it !!!
Can anyone help me?
Oh no :-(
poor GD-S***** will be died
Only this way can help me...
rand() come out!!
all of this
was decided by my RP
......
*/

随机数真的有分吗?

/*
The moon is very light, we need to thank her.
*/
/*
I know I can't get any score, 
but it is a realy fantastic thing to have a strong wish 
on whether I can get 1=, isn't it?

Oh, ohhh. My English is so "FANTASTIC"~
*/

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

月亮好闪,拜谢月亮

/*
我期待
有一天我会回来
回到我最初的爱
回到童真的神采

我期待
有一天我会明白
明白人世的挚爱
明白原始的情怀

我情愿
分合的无奈
能换来
春夜的天籁

我情愿
现在与未来
能充满
秋凉的爽快

Say Goodbye
Say Goodbye

前前后后 迂迂回回地
试探

Say Goodbye
Say Goodbye

昂首阔步 不留一丝
遗憾
*/

/*
喜欢宝哥,常听常新,常唱常新
*/

我就说广东怎么没有人写歌词,原来在这。

游记与 AFO

/*
csp-s rp++

最后一次CSP了,我的OI生涯,也随之走向终点。千言万语汇成一句话:此生无悔入OI!
*/

来世愿做____人!

/*Lorem ipsum dolor sit amet*/

代码就只有这一句。

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

不予评价。

I WILL BE BACK!
				-Alan hu

下次再来。

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

再见。

//14:41 start A.
//14:46 solving A.
//15:01 passed 2 samples.
//15:07 assumed that A is solved.

真的过了云斗数据。

//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 (比普及分还高 我是Xm) 
//S 2=应该有了 ;  J 1=肯定有了
//还是不甘心啊 J-T2能切的没分配好时间啊
//看来我的技术比去年有很大提升 (S组题目太简单)
//准备就要中考了  祝我自己:
//           !!!   RP++  !!!                       18:23:30

RP++

// 宇宙射线好闪,拜谢宇宙射线
// 希望这题有分
// 17:50

拜谢宇宙射线。

选手 GD-S***** 成功提交题目 struct。
./GD-Senior/answers/GD-S*****/struct/struct.cpp size = 1628

    /*
17:30
这是大模拟吗?这是大模拟吗?这是大模拟吗?
还有一小时 可以随便做。
我来定义一棵树
用什么起名呢
就用我老婆吧(
就叫做 NoaTree! 
生盐诺亚我好喜欢你你快保佑我 1 小时写完大模拟
o ne ga i shi ma su 


Update On 17:56
这玩意真的写不动!!
暴力也打不动
算了去写 T4 
go men 我写不出来了 noa老婆对不起对不起对不起 

Update On 18:12
我超我 T2 对拍出锅了!完了完了

Update On 18:17
fixed. 

Update On 18:23
我想在 7 分钟内骗 5 分

Update On 18:27
muri desu  
*/
#include<bits/stdc++.h>
using namespace std;
int n, k;
struct MisonoMika{ //未花树存储结构体 
	int siz; //大小
	int modd; //对齐方式
	int n; //儿子节点数量
	int son[105]; //儿子节点编号 
	string nam[105];
} st[2005];
struct NoaTree{ //诺亚树存储地址 
	int son[105]; //儿子节点编号
	int s[105]; //儿节点大小的前缀和
	int n; //儿子节点数量
	int typ; //自己的类型
	string name; //自己的名字 
} tr[2005];
map<string, int> id; //对每个名字存下自己的编号
int rt = 1;
int tot = 0, tot1 = 0;
int insertSonMika(string typ, string nm){
	cin >> typ >> nm;
	int Id = id[typ];
	st[tot1].n ++;
	st[tot1].son[st[tot1].n];
	
	return 1;
}
int DefineStruct(){
	string nam;
	int k;
	cin >> nam >> k;
	tot1 ++;
	id[nam] = tot1;
	int modd = 0;
	string typ[105], nm[105];
	for(int i = 1; i <= k; i ++){
		cin >> typ[i] >> nm[i];
		int Id = id[typ[i]];
		int x = st[Id].modd;
		modd = min(modd, x);
	}
	return 0;
} 
int main(){
	freopen("struct.in", "r", stdin);
	freopen("struct.out", "w", stdout);
	id["short"] = 2;
	id["byte"] = 1;
	id["int"] = 3;
	id["long"] = 4;
	st[1].n = 0, st[1].siz = 1, st[1].modd = 1;
	st[2].n = 0, st[2].siz = 2, st[2].modd = 2;
	st[3].n = 0, st[3].siz = 4, st[3].modd = 4;
	st[4].n = 0, st[4].siz = 8, st[4].modd = 8; 
	//我不管了
	//我认为全是ERR
	//我认为全是ERR!! 
	int n;
	cin >> n;
	for(int i = 1; i <= n; i ++){
		cout << "It's Too Hard To Solve The Problem";
	}
	return 0;
} 


云斗数据爆零。嘲笑了。

finishing at 18:08, i have worked on it for at least 2.5 hours.
Might ERR.

他写了 struct 足足 2.5h。云斗数据 20 分。

/*
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
*/

好奇是什么学校。

//I'm in vim of the ternimal of noi linux. I cannot type Chinese charaters.
//The time is 2023/10/21 18:02, 
//and I have passed all the samples.
// --caijianhong, GD-S*****, in Foshan Shimen School

本人亲自出场。

/*
于2023.10.21 18:05 写下CSP-S2023最后一行代码

愿我提高一分不挂! 
*/

云斗 150 分。

工程师

使用正则表达式 /size = \d\?\d\d\d\d\d/gni 查询到 27 份超过 10 KB 的代码。

使用正则表达式 /size = \d\d\d\d\d\d/gni 查询到 19 份超过 100 KB 的代码。全部是 game/game.cpp。怎么交上去的?

其中有一位选手,粘贴了 deque 头文件的内容。

程序员下场指导
#include<unordered_map>
#include<type_traits>
#include<algorithm>
#include<utility>
#include<string>
#include<vector>
#include<list>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnarrowing"
using std::uint64_t;
using addr_t = uint64_t;
#include<iostream>
#include<fstream>
std::ifstream ins{"struct.in",std::ios_base::in};
std::ofstream ots{"struct.out",std::ios_base::out|std::ios_base::trunc};
constexpr addr_t operator ""_z(unsigned long long int p){
    return static_cast<addr_t>(p);
}
template<typename T>
class basic_string_view{
    const T* mem;
    addr_t len;
    public:
        using stdstr_t = std::basic_string<T>;
        template<addr_t L>
        constexpr basic_string_view(T const(&arr)[L]) : mem(arr), len(L){}
        constexpr basic_string_view(const T* mem,addr_t len) : mem(mem), len(len){}
        constexpr basic_string_view(stdstr_t const& st) : mem(st.data()), len(st.length()){}
        basic_string_view<T> substr(addr_t bgn,addr_t tln=std::basic_string<T>::npos){
            if(bgn>len)return {mem,0_z};
            return {mem+bgn,std::min(len-bgn,tln)};
        }
        operator stdstr_t(){
            return {mem,len};
        }
};
using sv = basic_string_view<char>;
#include<limits>
constexpr addr_t npos{std::numeric_limits<addr_t>::max()};
struct nullopt_t{};
constexpr nullopt_t nullopt;
template<typename ...R>
struct first{
};
template<typename F,typename ...R>
struct first<F,R...>{
    using type = F;
};
template<typename ...T>
using first_t = typename first<T...>::type;
template<typename T>
class alignas(T) optional{
    unsigned char mem[sizeof(T)];
    bool hasv;
    T& M_cast(){
        #pragma GCC diagnostic push
        #pragma GCC diagnostic ignored "-Wstrict-aliasing"
        return *reinterpret_cast<T*>(mem);
    }
    const T& M_cast() const{
        return *reinterpret_cast<const T*>(mem);
        #pragma GCC diagnostic pop
    }
    void M_delete() noexcept{
        if(hasv){
            M_cast().~T();
            hasv = false;
        }
    }
    struct dummy_t{};
    public:
        template<typename... Ca>
        void emplace(Ca&& ...ca){
            M_delete();
            new(mem) T(std::forward<Ca>(ca)...);
            hasv = true;
        }
        using value_type = T;
        optional() : mem(), hasv(false){}
        optional(const nullopt_t&) : mem(), hasv(false){}
        template<typename ...Ca>
        static optional<T> construct(Ca&& ...ca){
            optional<T> v;
            v.emplace<Ca...>(std::forward<Ca>(ca)...);
            return v;
        }
        operator bool() const{
            return hasv;
        }
        T& operator*(){
            return M_cast();
        }
        const T& operator*() const{
            return M_cast();
        }
        T* operator->(){
            return &M_cast();
        }
        const T* operator->() const{
            return &M_cast();
        }
        ~optional(){
            M_delete();
        }
};
class Type;
struct M_node{
    addr_t offset;
    const Type* type;
    std::string name;
    M_node(addr_t o,const Type* t,sv name) : offset(o), type(t), name(name){}
    bool operator<(const M_node& other) const{
        return offset<other.offset;
    }
    bool operator<(const addr_t& other) const{
        return offset<other;
    }
};
bool operator<(const addr_t& that,const M_node& node){
    return that<node.offset;
}
typedef optional<std::pair<addr_t,const Type*>> mart;
typedef optional<const M_node*> maat;
class Type{
    public:
        virtual addr_t M_get_size() const = 0;
        virtual addr_t M_get_align() const = 0;
        virtual mart M_member_access(sv member) const = 0;
        virtual maat M_access_address(addr_t offset_into) const = 0;
        virtual ~Type(){}
};
class PrimitiveType : public Type{
    addr_t M_size;
    addr_t M_align;
    public:
        PrimitiveType(addr_t s,addr_t a) : M_size(s), M_align(a){}
        addr_t M_get_size() const override{
            return M_size;
        }
        addr_t M_get_align() const override{
            return M_align;
        }
        mart M_member_access(sv) const override{
            return nullopt;
        }
        maat M_access_address(addr_t) const override{
            return maat::construct(nullptr);
        }
};
addr_t M_alignto(addr_t addr,addr_t align){
    if(addr_t rem=addr%align){
        addr += (align-rem);
    }
    return addr;
}
class MemoryBlock{
    std::unordered_map<std::string,addr_t> ffs;
    std::vector<M_node> nodes;
    public:
//        void debug() const{
//            ots << "Nodes:\n";
//            for(const auto& n : nodes){
//                ots << n.name << '@' << n.offset << '\n';
//            }
//        }
        addr_t M_end() const{
            if(nodes.empty())return 0_z;
            return nodes.back().offset+nodes.back().type->M_get_size();
        }
        const M_node* M_seek(addr_t offset) const{
//            debug();
//            ots << "---- M_seek: " << offset << '\n';
            if(nodes.empty()){
                return nullptr;
            }
            auto iter = std::upper_bound(nodes.cbegin(),nodes.cend(),offset);
            if(iter==nodes.cbegin()){
                return nullptr;
            }
            return &*--iter;
        }
        const M_node* M_seek(sv name) const{
//            debug();
            decltype(ffs)::const_iterator iter;
            if((iter=ffs.find(std::string(name)))!=ffs.cend()){
                return &nodes[iter->second];
            }
            return nullptr;
        }
        addr_t add_member(const Type* t,sv name){
            addr_t back{M_alignto(M_end(),t->M_get_align())};
            ffs.emplace(name,nodes.size());
            nodes.emplace_back(back,t,name);
            return back;
        }
};
class StructuralType : public Type{
    MemoryBlock members;
    addr_t M_max_align;
    public:
        StructuralType() : members(), M_max_align(0_z){}
        void add_member(const Type* t,sv name){
            members.add_member(t,name);
            M_max_align = std::max(M_max_align,t->M_get_align());
        }
        addr_t M_get_size() const override{
            return M_alignto(members.M_end(),M_max_align);
        }
        addr_t M_get_align() const override{
            return M_max_align;
        }
        mart M_member_access(sv member) const override{
            if(const M_node* node = members.M_seek(member)){
                return mart::construct(node->offset,node->type);
            }
            return nullopt;
        }
        maat M_access_address(addr_t offset_into) const override{
            if(const M_node* node = members.M_seek(offset_into)){
                return maat::construct(node);
            }
            return nullopt;
        }
};
template<typename T,typename... Ea>
T& make_static(Ea&& ...ea){
    static std::list<T> mem;
    return mem.emplace_back(std::forward<Ea>(ea)...),mem.back();
}
int main(){
    MemoryBlock global_scope;
    std::unordered_map<std::string,const Type*> types;
    types.emplace("byte",&make_static<PrimitiveType>(1_z,1_z));
    types.emplace("short",&make_static<PrimitiveType>(2_z,2_z));
    types.emplace("int",&make_static<PrimitiveType>(4_z,4_z));
    types.emplace("long",&make_static<PrimitiveType>(8_z,8_z));
    addr_t ops;
    ins >> ops;
    addr_t op;
    std::string sbuf,dbuf,rbuf;
    addr_t ibuf;
    for(addr_t i=0_z;i<ops;++i){
        ins >> op;
        switch(op){
            case 1_z:{
                ins >> sbuf >> ibuf;
                StructuralType st;
                for(addr_t j=0_z;j<ibuf;++j){
                    ins >> dbuf >> rbuf;
                    st.add_member(types.at(dbuf),rbuf);
                }
                const Type& t = *((types.emplace(sbuf,&make_static<StructuralType>(std::move(st))).first)->second);
                ots << t.M_get_size() << ' ' << t.M_get_align() << '\n';
                break;
            }
            case 2_z:{
                ins >> sbuf >> dbuf;
                ots << global_scope.add_member(types.at(sbuf),dbuf) << '\n';
                break;
            }
            case 3_z:{
                ins >> sbuf;
                const Type* type = nullptr;
                sv access{sbuf};
                addr_t last = 0_z;
                addr_t lnth = 0_z;
                addr_t off = 0_z;
                for(const char& c : sbuf+'.'){
                    if(c=='.'){
                        if(type){
                            mart acc = type->M_member_access(access.substr(last,lnth));
                            off += acc->first;
                            type = acc->second;
                        }else{
                            const M_node* node = global_scope.M_seek(sbuf.substr(last,lnth));
                            off += node->offset;
                            type = node->type;
                        }
                        last += lnth;
                        ++last;
                        lnth = 0_z;
                    }else{
                        ++lnth;
                    }
                }
                ots << off << '\n';
                break;
            }
            case 4_z:{
                ins >> ibuf;
                const M_node* node = global_scope.M_seek(ibuf);
                if(node){
                    std::string path{node->name};
                    ibuf -= node->offset;
                    const Type* type = node->type;
                    while(ibuf){
                        if(ibuf>=type->M_get_size()){
                            path = "ERR";
                            break;
                        }
                        maat acc = type->M_access_address(ibuf);
                        if(!acc){
                            path = "ERR";
                            break;
                        }
                        if(!*acc)break;
                        if(!((*acc)->name).empty()){
                            path.push_back('.');
                            path.append((*acc)->name);
                        }
                        type = (*acc)->type;
                        ibuf -= (*acc)->offset;
                    }
                    ots << path << '\n';
                }else{
                    ots << "ERR\n";
                }
                break;
            }
        }
    }
	return 0;
}
#pragma GCC diagnostic pop

好厉害。一看就是专业的。让我们看看他的云斗估分?

密码锁 消消乐 结构体 种树
0 50 100 0

怎么会是呢?

#include<bits/stdc++.h>
using namespace std;
const int N=1e7+114514;
long long n,ans,num;
char a[N];
int main(){
	freopen("game.in","r",stdin);
	freopen("game.out","w",stdout);
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	//下面开始均为丑陋的代码。
	for(int i=1;i<=n;i++){
		if(a[i]==a[i+1]){
			ans++;
			a[i]-=32;
			a[i+1]-=32;
		}
		else if(a[i]==a[i+3]){
			ans++;
			a[i]-=32;
			a[i+3]-=32;
		}
		else if(...

他写了 14KB。

出题人

/*
T1 思路
设随机生成的解为(a b c d e)
则(a b c d e)合法前提为至少有三个数与原任何限制相等
若只有2个数相等,则至少要两次转动才能成立
若只有1个数相等同理 
若有4个相等,则解一定合法 
*/
/*
T2
思路,对于35分n<=800,考虑dp
设f[i,j]为[i,j]合并结果
如果f[i,j]能完全合并,则f[i,j]=' '
如果f[i,j]不能完全合并
	1.[i,j]剩下1个字符c,f[i,j] = c
	2.[i,j]剩下多个字符,f[i,j] = '-' 
*/
选手 GD-S***** 未提交题目 struct。
//fzy保佑我这次2=
//你怎么知道fzy把她的小皮筋给我了
//by GDSYZX LZX
/*
T4 
思路:模拟退火
对于每一个点,随机选择进入的下一个点,得到一个访问顺序 
对于这个访问顺序进行分配,计算总代价 
计算代价
对于每一个点,计算出何时取bi+x*ci,何时取1
O(1)计算每个点是否满足条件 
天数一定大于等于n,可以倍增+二分求出最小天数
每次计算时间复杂度=n log (x-n)
*/

想必您就是出题人,不对,他不会 T3

/*
i~j可消
i与last同, 且i+1~last-1消, 
baccabaabccb
331002201100
1.
baccab
baccabaa
baccabaabccb
 acca
 accabaab
 accabaabcc
  cc
     baab
     baabcc
      aa
      aabccb
        bccb
         cc

baccabaabccb
2.
ba  ab  b  b+3
b          b+3+(3+3)
            +3+6+7
            
vis[j]表示 i-1~j有解 
i~j
*/

好厉害,画图模拟

	/*
	随机生成,只检查所有长度<=14 的子串,此时出现可消除串的概率极小 (<=1e-11) 
	*/

原来是这么玩的

//事实上,我们可以认为最后所有的元素都是装在一个结构体内的,所以我们可以类似的计算它们的地址偏移量,这个值就是它们的起始地址 

/*
类型分为两种:基本类型和struct类型
基本类型即 byte short int long
struct 类型用 structType 储存

每一种类型用一个 pair<bool,int> 表示:
first =0/1 表示是/不是 基本类型
second=... 表示编号
first=0 时, second 取值在 [1,4] 对应四种基本类型
first=1 时,second 表示这种 struct 类型的编号 

mp 用来检索某种类型 

*/

思路清晰啊

选手 GD-S***** 未提交题目 lock。
选手 GD-S***** 未提交题目 game。
选手 GD-S***** 成功提交题目 struct。
./GD-Senior/answers/GD-S*****/struct/struct.cpp size = 2992

#include<bits/stdc++.h>
using namespace std;


{/*
结构体(struct)
【题目背景】
在C++ 等高级语言中,除了int 和float 等基本类型外,通常还可以自定义结
构体类型。在本题当中,你需要模拟一种类似C++ 的高级语言的结构体定义方式,并
计算出相应的内存占用等信息。
【题目描述】
在这种语言中,基本类型共有4 种:byte,short,int,long,分别占据1, 2, 4, 8
字节的空间。
定义一个结构体类. 型. 时,需要给出类. 型. 名. 和成. 员. ,其中每个成员需要按顺序给出类.
型. 和名. 称. 。类型可以为基本类型,也可以为先. 前. 定. 义. 过. 的结构体类型。注意,定义结构
体类. 型. 时不会定义具体元素,即不占用内存。
定义一个元. 素. 时,需要给出元素的类. 型. 和名. 称. 。元素将按照以下规则占据内存:
. 元素内的所有成员将按照定. 义. 时. 给. 出. 的. 顺. 序. 在内存中排布,对于类型为结构体的
成员同理。
. 为了保证内存访问的效率,元素的地址占用需要满足对. 齐. 规. 则. ,即任何类型的大.
小. 和该类型元素在内存中的起. 始. 地. 址. 均应对齐到该类型对齐要求的整. 数. 倍. 。具体
而言:
C 对于基本类型:对齐要求等于其占据空间大小,如int 类型需要对齐到4
字节,其余同理。
C 对于结构体类型:对齐要求等于其成员的对齐要求的最. 大. 值. ,如一个含有
int 和short 的结构体类型需要对齐到4 字节。
以下是一个例子(以C++ 语言的格式书写):
1 struct d {
2 short a;
3 int b;
4 short c;
5 };
6 d e;
该代码定义了结构体类型d 与元素e。元素e 包含三个成员e.a, e.b, e.c,分
别占据第0 ~ 1,4 ~ 7,8 ~ 9 字节的地址。由于类型d 需要对齐到4 字节,因此e 占
据了第0 ~ 11 字节的地址,大小为12 字节。
你需要处理n 次操作,每次操作为以下四种之一:
1. 定义一个结构体类型。具体而言,给定正整数k 与字符串s, t1, n1, . . . , tk, nk,其
中k 表示该类型的成员数量,s 表示该类型的类型名,t1, t2, . . . , tk 按顺序分别表
示每个成员的类型,n1, n2, . . . , nk 按顺序分别表示每个成员的名称。你需要输出
该结构体类型的大小和对齐要求,用一个空格分隔。
2. 定义一个元素,具体而言,给定字符串t,n 分别表示该元素的类型与名称。所
有被定义的元素将按顺序,从内存地址为0 开始依次排开,并需要满足地址对齐
规则。你需要输出新定义的元素的起始地址。
3. 访问某个元素。具体而言,给定字符串s,表示所访问的元素。与C++ 等语言
相同,采用. 来访问结构体类型的成员。如a.b.c,表示a 是一个已定义的元
素,它是一个结构体类型,有一个名称为b 的成员,它也是一个结构体类型,有
一个名称为 c 的成员。你需要输出如上被访问的最. 内. 层. 元素的起始地址。
4. 访问某个内存地址。具体而言,给定非负整数addr,表示所访问的地址,你需要
判断是否存在一个基. 本. 类. 型. 的元素占据了该地址。若是,则按操作 3 中的访问元
素格式输出该元素;否则输出ERR。
【输入格式】
从文件struct.in 中读入数据。
第1 行:一个正整数n,表示操作的数量。
接下来若干行,依次描述每个操作,每行第一个正整数op 表示操作类型:
. 若op = 1,首先输入一个字符串s 与一个正整数k,表示类型名与成员数量,接
下来k 行每行输入两个字符串ti,ni,依次表示每个成员的类型与名称。
. 若op = 2,输入两个字符串t,n,表示该元素的类型与名称。
. 若op = 3,输入一个字符串s,表示所访问的元素。
. 若op = 4,输入一个非负整数addr,表示所访问的地址。
【输出格式】
输出到文件struct.out 中。
输出n 行,依次表示每个操作的输出结果,输出要求如题目描述中所述。
【样例1 输入】
5
1 a 2
short aa
int ab
1 b 2
a ba
long bb
2 b x
3 x.ba.ab
4 10
【样例1 输出】
//8 4
16 8
0
4
x.bb
【样例1 解释】
结构体类型a 中,short 类型的成员aa 占据第0 ~ 1 字节地址,int 类型的成员
ab 占据第4 ~ 7 字节地址。又由于其对齐要求为4 字节,可得其大小为8 字节。由此
可同理计算出结构体类型b 的大小为16 字节,对齐要求为8 字节。
【数据范围】
对于全部数据,满足1 ≤ n ≤ 100,1 ≤ k ≤ 100,0 ≤ addr ≤ 1018。
所有定义的结构体类型名、成员名称和定义的元素名称均由不超过10 个字符的小
写字母组成,且都不是byte,short,int,long(即不与基本类型重名)。
所有定义的结构体类型名和元素名称互不相同,同一结构体内成员名称互不相同。
但不同的结构体可能有相同的成员名称,某结构体内的成员名称也可能与定义的结构体
或元素名称相同。
保证所有操作均符合题目所述的规范和要求,即结构体的定义不会包含不存在的类
型、不会访问不存在的元素或成员等。
保证任意结构体大小及定义的元素占据的最高内存地址均不超过1018。
测试点编号特殊性质
1 A、D
2 ~ 3 A
4 ~ 5 B、D
6 ~ 8 B
9 ~ 10 C、D
11 ~ 13 C
14 ~ 16 D
17 ~ 20 无
特殊性质A:没有操作1;
特殊性质B:只有一个操作1;
特殊性质C:所有操作1 中给出的成员类型均为基本类型;
特殊性质D:基本类型只有long。
【提示】
对于结构体类型的对齐要求和大小,形式化的定义方式如下:
. 设该结构体内有k 个成员,其大小分别为s1, ..., sk,对齐要求分别为a1, ..., ak;
. 则该结构体的对齐要求为a = max{a1, ..., ak};
. 再设这些成员排布时的地. 址. 偏. 移. 量. 分别为 o1, ..., ok,则:
C o1 = 0;
C 对于i = 2, ..., k,oi 为满足oi.1 + si.1 ≤ oi 且ai 整除oi 的最小值;
C 则该结构体的大小s 为满足ok + sk ≤ s 且a 整除s 的最小值;
对于定义元素时的内存排布,形式化的定义方式如下:
. 设第i 个被定义的元素大小为si,对齐要求为ai,起始地址为bi;
. 则b1 = 0,对于2 ≤ i,bi 为满足bi.1 + si.1 ≤ bi 且ai 整除bi 的最小值。
*/}
struct bt{
	string name;
	int bt;
};
int main(){
	freopen("struct.in",'r',stdin)
	freopen("struct.out",'r',stdout)
	
}

选手 GD-S***** 未提交题目 tree。

这下真爆零了

posted @ 2023-10-22 01:09  caijianhong  阅读(1454)  评论(5编辑  收藏  举报