标题
增加 1 行删除 1 行
12025 CSP-S SD 迷惑行为大赏12025 CSP-S SD 迷惑行为统计
正文
增加 1502 行删除 16 行
12345678182 行未改动全部展开19119219319419519619719819920020120220334 行未改动23823924024124224324424524627 行未改动274275276277278279280281282123 行未改动全部展开40640740840941041141241341441541641741841928 行未改动44844945045145245345445545624 行未改动48148248348448548648748848924 行未改动5145155165175185195205215223 行未改动52652752852953053153253353453553653753853954054154254354454521 行未改动56756856957057157257357457524 行未改动60060160260360460560660760815 行未改动6246256266276286296306316326 行未改动639640641642由于个人保存不当,代码中中文注释全没了……。可能等官方的程序包出来后再去修改(前提是那时我还在役)。## 默哀区在代码中搜索 `//freopen`,共在 $89$ 个文件中找到了 $218$ 个结果。182 行未改动全部展开while(1){x=q.top(),q.pop();if(find(x.x)!=find(x.y) && !usd[x.tp]) break;}fa[find(x.x)]=find(x.y);// printf("%lld %lld %lld %lld\n",x.x,x.y,x.v,x.tp);res+=x.v;if(x.tp){usd[x.tp]=1;_for(i,1,n) if(i!=d[x.tp]){q.push({d[x.tp],i,p[x.tp][i],0});34 行未改动$92$ (梦熊数据) -> $0$ 。**祝好**。@[undefined_behavior](luogu://user/780262) 。---搜索 `#incldue<windows.h>`,共 $1$ 个结果。**且不是诈骗,并导致挂分。**27 行未改动return f[x];}void mg(int x,int y){if(siz[x] > siz[y]) swap(x,y);f[x] = y,siz[y] += siz[x];}}b;inline void check(){sm = 0;b.init();123 行未改动全部展开lena=maxn-minn+1;for(int j=1;j<=n;j++)for(int g=1;g<=s[i][0].length();g++){}*/cout<<0<<endl;}return 0;}28 行未改动if(A>0){A--; happy+=a[stu][0]; club(stu+1); A++; happy-=a[stu][0];}if(B>0){B--; happy+=a[stu][1]; club(stu+1); B++; happy-=a[stu][1];}if(C>0){C--; happy+=a[stu][2]; club(stu+1); C++; happy-=a[stu][2];}}}int main(){freopen("club.in","r",stdin);freopen("club.ans","w",stdout);24 行未改动{A=B=n/2;for(int j=1;j<=n;j++){maxn+=max(a[j][0],a[j][1]);b[abs(a[j][0]-a[j][1])]++;if(a[j][0]>a[j][1]) {A--;c[abs(a[j][0]-a[j][1])]++;}else {B--;b[abs(a[j][0]-a[j][1])]++;}}24 行未改动{for(int j=1;j<=n;j++)maxn+=max(a[j][0],max(a[j][1],a[j][2]));cout<<maxn<<endl; continue;}}A=B=C=n/2;club(1);cout<<maxn<<endl;3 行未改动``````cpp#include<bits/stdc++.h>using namespace std;long long n,m,c[501],b[501],sum,ans;//c���� b��Ŀbool p[501],lu[501],flag;//¼Ϊ1string a;const int mo=998244353;//998244353long long jc(int x){int u=1;for(int i=x;i>=1;i--) u=(u*i)%mo;return u;}void pailie(int x,int y)//��ǰ���� ��¼ȡ{if(x>n) return;int temp,s; s=y;for(int i=1;i<=n;i++)21 行未改动for(int i=1;i<=n;i++){cin>>c[i];b[i]=a[i-1]-'0';sum+=b[i];if(c[i]==0) flag=1;}if(m==n){if(sum!=n||flag!=0) cout<<0; else cout<<jc(n); return 0;}if(m>sum){cout<<0; return 0;}24 行未改动`road2.in/out/ans` 在 `freopen` 里出现了 $2$ 次,有 $2$ 个是诈骗。`road3.in/out/ans` 在 `freopen` 里出现了 $8$ 次,有 $5$ 个是诈骗。`road4.in/out/ans` 在 `freopen` 里出现了 $10$ 次,有 $10$ 个是诈骗。---`replace1.in/out/ans `在 `freopen` 里出现了 $7$ 次,有 $5$ 次是诈骗。15 行未改动`club4.in/out/ans `在 `freopen` 里出现了 $8$ 次,有 $8$ 次是诈骗。`club5.in/out/ans `在 `freopen` 里出现了 $13$ 次,有 $13$ 次是诈骗。---`employ1.in/out/ans `在 `freopen` 里出现了 $8$ 次,有 $7$ 次是诈骗。`employ2.in/out/ans `在 `freopen` 里出现了 $4$ 次,有 $2$ 次是诈骗。6 行未改动---`fuck` 出现了 $10$ 次,并且 `fuck ccf` 出现了 $6$ 次。禁赛三年警告。12345678910111213182 行未改动全部展开19619719819920020120220320420520620720834 行未改动24324424524624724824925027 行未改动278279280281282283284285286123 行未改动全部展开41041141241341441541641741841942042142242328 行未改动45245345445545645745845946024 行未改动48548648748848949049149249324 行未改动5185195205215225235245255263 行未改动53053153253353453553653753853954054154254354454554654754854921 行未改动57157257357457557657757857924 行未改动60460560660760860961061161215 行未改动6286296306316326336346356366 行未改动6436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128~~由于个人保存不当,代码中中文注释全没了……。~~可能等官方的程序包出来后再去修改(前提是那时我还在役)。**UPD on 11.7** 感谢 @[Lament_Rain](luogu://user/1157620) 提供的代码包,现在有中文注释了。并对原文进行整理。## 默哀区在代码中搜索 `//freopen`,共在 $89$ 个文件中找到了 $218$ 个结果。182 行未改动全部展开while(1){x=q.top(),q.pop();if(find(x.x)!=find(x.y) && !usd[x.tp]) break;}fa[find(x.x)]=find(x.y);// printf("%lld %lld %lld %lld\n",x.x,x.y,x.v,x.tp);res+=x.v;if(x.tp){usd[x.tp]=1;_for(i,1,n) if(i!=d[x.tp]){q.push({d[x.tp],i,p[x.tp][i],0});34 行未改动$92$ (梦熊数据) -> $0$ 。**祝好**。---搜索 `#incldue<windows.h>`,共 $1$ 个结果。**且不是诈骗,并导致挂分。**27 行未改动return f[x];}void mg(int x,int y){if(siz[x] > siz[y]) swap(x,y);f[x] = y,siz[y] += siz[x];}}b;inline void check(){sm = 0;b.init();123 行未改动全部展开lena=maxn-minn+1;for(int j=1;j<=n;j++)for(int g=1;g<=s[i][0].length();g++){}*/cout<<0<<endl;}return 0;}28 行未改动if(A>0){A--; happy+=a[stu][0]; club(stu+1); A++; happy-=a[stu][0];}if(B>0){B--; happy+=a[stu][1]; club(stu+1); B++; happy-=a[stu][1];}if(C>0){C--; happy+=a[stu][2]; club(stu+1); C++; happy-=a[stu][2];}}}int main(){freopen("club.in","r",stdin);freopen("club.ans","w",stdout);24 行未改动{A=B=n/2;for(int j=1;j<=n;j++){maxn+=max(a[j][0],a[j][1]);b[abs(a[j][0]-a[j][1])]++;if(a[j][0]>a[j][1]) {A--;c[abs(a[j][0]-a[j][1])]++;}else {B--;b[abs(a[j][0]-a[j][1])]++;}}24 行未改动{for(int j=1;j<=n;j++)maxn+=max(a[j][0],max(a[j][1],a[j][2]));cout<<maxn<<endl; continue;}}A=B=C=n/2;club(1);cout<<maxn<<endl;3 行未改动``````cpp#include<bits/stdc++.h>using namespace std;long long n,m,c[501],b[501],sum,ans;//c���� b��Ŀbool p[501],lu[501],flag;//¼Ϊ1string a;const int mo=998244353;//998244353long long jc(int x){int u=1;for(int i=x;i>=1;i--) u=(u*i)%mo;return u;}void pailie(int x,int y)//��ǰ���� ��¼ȡ{if(x>n) return;int temp,s; s=y;for(int i=1;i<=n;i++)21 行未改动for(int i=1;i<=n;i++){cin>>c[i];b[i]=a[i-1]-'0';sum+=b[i];if(c[i]==0) flag=1;}if(m==n){if(sum!=n||flag!=0) cout<<0; else cout<<jc(n); return 0;}if(m>sum){cout<<0; return 0;}24 行未改动`road2.in/out/ans` 在 `freopen` 里出现了 $2$ 次,有 $2$ 个是诈骗。`road3.in/out/ans` 在 `freopen` 里出现了 $8$ 次,有 $5$ 个是诈骗。`road4.in/out/ans` 在 `freopen` 里出现了 $10$ 次,有 $10$ 个是诈骗。---`replace1.in/out/ans `在 `freopen` 里出现了 $7$ 次,有 $5$ 次是诈骗。15 行未改动`club4.in/out/ans `在 `freopen` 里出现了 $8$ 次,有 $8$ 次是诈骗。`club5.in/out/ans `在 `freopen` 里出现了 $13$ 次,有 $13$ 次是诈骗。---`employ1.in/out/ans `在 `freopen` 里出现了 $8$ 次,有 $7$ 次是诈骗。`employ2.in/out/ans `在 `freopen` 里出现了 $4$ 次,有 $2$ 次是诈骗。6 行未改动---`fuck` 出现了 $10$ 次,并且 `fuck ccf` 出现了 $6$ 次。禁赛三年警告。PS. `CCF` 在所有代码中出现了 $304$ 次,分布在 $70$ 个文件中。点名两个人:#### SD-S00527以一己之力,贡献了 $185$ 个`CCF` 。```cpp#include<bits/stdc++.h>using namespace std;typedef long long ll;typedef pair<int,int> pii;#define fi first#define se second#define pb push_back#define add(u,v,w) tu[(u)].pb({(v),(w)})#define forr(x,y) for(int i=x;i<=y;i++)#define endl '\n'const int inf=0x3f3f3f3f;const ll infll=0x3f3f3f3f3f3f3f3f;int main(){freopen("replace.in","r",stdin);freopen("replace.out","w",stdout);ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);while(1);return 0;}//CCF is good//CCF is good//CCF is good//CCF is good//CCF is good/*---- 省略 180 个 CCF is good----*/```#### SD-S01524**请最大化后观看。**```cpp/*CCF CCF CCF CCF CCF CCF CCF CCF CCF CCF CCF CCF is is is is isCCF CCF CCF isCCF CCF CCF CCF CCF CCF is is is is isCCF CCF CCF is isCCF CCF CCF CCF CCF CCF CCF CCF CCF is is is is is .................*/```不做评价。## 代码长度这一块最长代码由两个 $85$ KB 的代码取得。#### SD-S01036&00778```cpp#include<iostream>using namespace std;int main(){freopen("replace.in","r",stdin);freopen("replace.out","w",stdout);int n,m;cin>>n>>m;if(n==4 and m==2){cout<<0<<'\n'<<2;}if(n==3 and m==4){printf("0\n0\n0\n0\n");}if(n==37375 and m==27578){printf(/*省略 82Kb 大样例内容*/);}if(n==2235 and m==1010){printf(/*省略 3Kb 大样例内容*/);}else{for(int i=0;i<m;i++){cout<<0<<'\n';}}return 0;fclose(stdin);fclose(stdout);}```神人。共有 $6$ 个代码超过 $10$ KB。除去注释超过 $10$ KB 的和两份神人无意义代码,还剩两份有意义的。有一个巨佬(SD-S01410) T2 写了写了 $13$ KB代码,并在本地成功过编,但交上去 CE 了…………。**默哀。**还有另一份 T4 代码,(作者 SD-S00031),写的像一个艺术品。防止破坏观感,我放在[这里](https://www.luogu.me/paste/s4hwwpmp)。这份代码取得了 $[0,8]$ 分的好成绩。全场最短代码由多个人同时取得:``````(以上为代码全文)。---## 一些小统计`#define int long long` 出现了 $1100$ 余次。`ios::sync_with_stdio` 出现了 $1750$ 次。你不能再说他们不能用了。## 字符画这一块如果你想上去,你可以把你的准考证号发给作者。#### SD-S01264```CCCCCCCCC CCCCCCCCCC FFFFFFFFFFFC C FC C FC C FC C FFFFFFFFFFFC C FC C FCCCCCCCCC CCCCCCCCCC F```~~**您在这种花呢?**~~#### SD-S00333```cpp**** * *** * *** * * duck* * ** ************ *** ** * ** *** ****************************************** ***************************** **** *** ******************************************```#### SD-S00495```/*-------- �� || , ---- |--|--|| |---| / |--|--|| |---| /| |--|--|| |---| | || .|. | |*/```原神巨佬 %%%#### 同上```^^^^^^^^^^^^( �� �� )| |------| |-------()| |----------\ \\ \| |```我在尝试看懂他在画什么。#### SD-S00999```____ ____ ____ ____ // / / / / / / / // / / / / / / / //____/ / /\ / /____ /____/ // / / \ / / // / / \ /____ ____/ / .```%%%%%%%%%%%#### SD-S?????```[||||]\__// \/ \/______\```## 盒子这一块### 彩蛋 1`SD-S01020` 出现在了两个不同人的代码里。神秘。### 彩蛋2SD-J00001 出现在了选手文件夹中?### 开盒环节:帮你们开了,不用谢。**SD-S00161**:@[China_DeepSeek](luogu://user/1209548)**SD-S00433**:@[undefined_behavior](luogu://user/780262)**SD-S00436**:@[Meng_Xiangyu](luogu://user/1433474)**SD-S00446**:@[JuRuoOIer](luogu://user/476093)**SD-S00588**:@[Lain_yc](luogu://user/547760)**SD-S00655**:@[Aurora_AC](luogu://user/1938765)**SD-S00689**:@[Nahia](luogu://user/1199153)**SD-S00740**:@[Shiro_Zhu](luogu://user/622054)**SD-S00893**:@[Lament_Rain](luogu://user/1157620)**SD-S00999**:@[WangShizhe](luogu://user/1099109)**SD-S01017**:@[_awa_wangjiawen](luogu://user/305069)**SD-S01040**:@[COKENOTFOUND](luogu://user/790382)**SD-S01146**:@[hehejushi](luogu://user/941672)**SD-S01146**:@[AA12_G](luogu://user/787512)**SD-S01320**:@[Staque](luogu://user/592463)**SD-S01468**:@[Wolfiez](luogu://user/915383)**SD-S01469**:@[haozhengrui](luogu://user/748678)**SD-S01563**:@[W_SUN](luogu://user/341801)**SD-S01569**:@[strappple](luogu://user/529038)**SD-S01593**:@[ZhuHua14](luogu://user/826012)**SD-S01608**:@[Gyf117](luogu://user/947527)**SD-S01660**:@[AnotherDream](luogu://user/1208546)## 英语这一块依然有 $8$ 个人不会写 `solve` ……---## 其他`AK ` 出现了 $20$ 次。`afo` 出现了 $18$ 次。`OI` 出现了 $4$ 次。`kkk` 出现了 $111$ 次,全名则出现了 $2$ 次。`chen_zhe` 出现了 $1$ 次,`chenzhe` 出现了 $4$ 次,但不是指的 cz,而 `cz` 出现了 $143$ 次。`CSP` 出现了 $97$ 次。`rp` 出现了 $246$ 次。# 正文疑似前摇过长。手动翻了 $6100$ 份代码,如有遗漏,请提醒我一下。### 前 摇 过 长```cpp#include <bits/stdc++.h>//#include <bits/stdc++.h>//#define int long long//using namespace std;//int n,q,l[200001],b[5000001];//string s[200001],t[200001];//signed main(){//// freopen(".in","r",stdin);//// freopen(".out","w",stdout);// cin >> n >> q;// while(q--){// cout << "0\n";// }// return 0;//}//#include <bits/stdc++.h>//#define int long long//using namespace std;//int n,q,l[200001],b[5000001];//string s[200001],t[200001];//signed main(){//// freopen(".in","r",stdin);//// freopen(".out","w",stdout);// cin >> n >> q;// while(q--){// cout << "0\n";// }// return 0;//}/*省略 200 行同样的注释*/#define int long long//bala 正文```### 祝好```//love you//OI//bye~ bye```### 大佬爆切 T2```//14:48 begin//14:57 realize what I need to do//15:1? find out Union-Find Set is wrong//15:18 pass examples//generate bigger(m = 1e6),if C is too hard//O(2^k k^2 n)?but too hard to get the limit,0.5s in ex3 and 0.3s in ex4```### 我赌出题人会向数据里放样例!```cpp#include<bits/stdc++.h>using namespace std;int a[1005];bool cmp(int a,int b){return a>b;}int main(){freopen("road.in","r",stdin);freopen("road.out","w",stdout);cout<<14;return 0;}```$0pts$ 。还有高手:```#include<bits/stdc++.h>using namespace std;#define int long long#define fst ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);const int N=1e6+10,M=2e6+10;const int INF=0x3f3f3f3f3f3f3f3f;const int P=998244353;int n,m,ans=1;int a[N];signed main(){freopen("employ.in","r",stdin);freopen("employ.out","w",stdout);fstcin>>n>>m;if(n==3){cout<<2;}else if(n==10){cout<<2204128;}else if(n==100){cout<<161088479;}else if(n==500){if(m==1){cout<<515058943;}else if(m==12){cout<<225301405;}}return 0;}```### ?```// if(n==4){// b[1]=a[1][1]+a[2][2]+a[3][3]+a[4][3];// b[2]=a[1][1]+a[3][2]+a[2][3]+a[4][3];// b[3]=a[1][1]+a[4][2]+a[3][3]+a[2][3];// b[4]=a[2][1]+a[1][2]+a[3][3]+a[4][3];// b[5]=a[2][1]+a[3][2]+a[1][3]+a[4][3];// b[6]=a[2][1]+a[4][2]+a[1][3]+a[3][3];// b[7]=a[3][1]+a[1][2]+a[2][3]+a[4][3];// b[8]=a[3][1]+a[2][2]+a[4][3]+a[1][3];// b[9]=a[3][1]+a[4][2]+a[1][3]+a[2][3];// b[10]=a[4][1]+a[1][2]+a[2][3]+a[3][3];// b[11]=a[4][1]+a[2][2]+a[1][3]+a[3][3];// b[12]=a[4][1]+a[3][2]+a[1][3]+a[2][3];// b[13]=a[1][1]+a[2][2]+a[3][2]+a[4][1];// b[14]=a[1][1]+a[2][2]+a[4][2]+a[3][3];// b[15]=a[1][1]+a[3][2]+a[4][2]+a[2][4];// b[16]=a[2][1]+a[1][2]+a[3][2]+a[4][3];// b[17]=a[2][1]+a[3][2]+a[4][2]+a[1][3];// b[18]=a[2][1]+a[4][2]+a[1][2]+a[3][3];// b[19]=a[3][1]+a[2][2]+a[1][2]+a[4][3];// b[20]=a[3][1]+a[1][2]+a[4][2]+a[2][3];// b[21]=a[3][1]+a[4][2]+a[2][2]+a[1][3];// b[22]=a[4][1]+a[1][2]+a[2][2]+a[3][3];// b[23]=a[4][1]+a[2][2]+a[3][2]+a[1][3];// b[24]=a[4][1]+a[3][2]+a[1][2]+a[2][3];// b[25]=a[1][1]+a[2][1]+a[3][2]+a[4][3];// b[26]=a[1][1]+a[3][1]+a[2][2]+a[4][3];// b[27]=a[1][1]+a[4][1]+a[2][2]+a[3][3];// b[28]=a[1][1]+a[][]+a[][]+a[][];// b[29]=a[1][1]+a[][]+a[][]+a[][];// b[30]=a[1][1]+a[][]+a[][]+a[][];// b[31]=a[][]+a[][]+a[][]+a[][];// b[32]=a[][]+a[][]+a[][]+a[][];// b[33]=a[][]+a[][]+a[][]+a[][];// b[34]=a[][]+a[][]+a[][]+a[][];// b[35]=a[][]+a[][]+a[][]+a[][];// b[36]=a[][]+a[][]+a[][]+a[][];// b[37]=a[][]+a[][]+a[][]+a[][];// b[38]=a[][]+a[][]+a[][]+a[][];// b[39]=a[][]+a[][]+a[][]+a[][];// b[40]=a[][]+a[][]+a[][]+a[][];// b[41]=a[][]+a[][]+a[][]+a[][];// b[42]=a[][]+a[][]+a[][]+a[][];// b[43]=a[][]+a[][]+a[][]+a[][];// b[44]=a[][]+a[][]+a[][]+a[][];// b[45]=a[][]+a[][]+a[][]+a[][];//// }```### 不可以,总司令```cppfor(int i=1;i<=q;++i){cout<<0<<endl;}```### 又是字符画```-------------------------------------------------------------------------||_ |/ ~ |/ ~ |/ / `\ |~ /`\ )\ |~- `\ / | |_ ---`\ / ||_| ---- `\ |`\ |||||||||-------------------------------------------------------------------------```### 祝好```I love CCFI can't solve this problem17:59 I can't solve this problemI'll AFOGoodbye```还有```cpp// wo zhen de bu xiang tui yi```### Don't learn me```cpp//wrong answer,don't learn me.//time limit exceed,don't learn me.```### P```cpp//2025.11.1 17:41 100+72+30+24=226//Is it enough?? I am too vegetable.//I think SD-S01020 is going to AK.```关键问题是,你写别人考号干啥?### ALL FOR MYSELF, NOT ANYONE ELSE```cpp//ALL FOR MYSELF, NOT ANYONE ELSE#include<bits/stdc++.h>//#define TERRY_MC#define endl '\n'#define int llusing namespace std;typedef long long ll;const int N=505,MOD=998244353;/*以下略*/```### ccf dont ban me```cpp/*编者注:部分内容已经使用 * 替代 *///f**k your poopoo, i like d***s//ccf dont ban me pls i sorry```### 来 生 再 见```cpp//i love yukina roxy anon yuki aimi aiba and all of bangdreams characters and cvs//CCF SEE U NEXT LIVE//RP++```### I AKed CSPJ this morning```cpp//*Some strong music rings.../*Today is 20251101.The code is by XYM!!!*///We are strange to love.//You know the rules and so do I~////Never gonna give you up.//Never gonna let you down.//Never gonna run around and hurt you.//Never gonna make you cry.//Never gonna say goodbye.//Never gonna run around and hurt you.////luogu UID 1433474,luogu name Meng_Xiangyu//I AKed CSP-J this morning.```### love CCF```//rp++//love CCF```### LinYin 是谁啊?```cpp//Don't forget our relativeship, Lin Yin... ...li666 answer666=0;heap7772666=heap7771666; /for(int i666=1; i666<=n666; i666++) fa666[i666]=i666;int cnts666=0;while(heap7772666.size()&&cnts666<n666) {lsqxx666 bs666=heap7772666.top();heap7772666.pop();int lss666=bs666.s7771666; //Lin Sen Senint lxx666=bs666.t7771666; //Lin Xiao Xili666 dis666=bs666.wd666;if(fam666(lss666, lxx666)) continue;heap666.push(bs666);answer666+=dis666;mer666(lss666, lxx666);cnts666++;}li666 ans666=answer666;li666 ly666=n666+k666; //Lin Yin, you have been rebirthed!!!//I will save you, Lin Yin... ...//Brother... My elder brother... ...//Now, let's say "Goodbye".//Goodbye, my brother... ...//Goodbye, my inside girl-- Little Yin... ...for(int i666=0; i666<lm666; i666++) {//I have so much power!!! I am powerful!!! -- Lin Yin```### 求翻译```cpp//yu shi zhen hao ke !!!```### 别样的祈福```cpp// Can you give me more points,CCF?```甚至还有效仿者:```cpp//CCF I love you, please gives me some scores.```还有直抒胸臆:```//I love CCF```### 暴戾语言```cpp//FUCK Magus CYB//FUCK zzldd DJM//HAPPY```### 我知道你喜欢玩原神了```cpp// I want to play Genshin and Star Rail!/*省略数十行相似内容*/// I love Furina!/*省略 10 行相同内容*/```### 今年太难了```cpp//TOO HARD!!!//25pts//jin nian tai nan le//xiakule//ovo -> owo -> ono -> awa -> pwp -> qwq```### Wake up```Wake up!What should I do now?Could I see the blossom?But now I may find you.Why T1 so hard!!!!!!!!45min.```### HELLO```cppHello.I am a minecraft player.My minecraft ID is:SonomaSKY_xyz.I like playing minecraft.And I enjoy it.Elytra is my favorite item.I am looking forward to playing minecraft 1.21.11.I am an OIer,too.My luogu UID is:1209548.2025/11/1 I went to RiZhao,ShanDong.I have an exam.It is nemed CSP-S,by CCF.It is important.RP += INF.^__^```### I AK IOI```@__CrossBow_EXE__SD-J00628.//freopen//feropenIAKIOI```### 阿森纳球迷```North London ForeverWhatever the weatherThese streets are our ownAnd my heart will leave you neverMy blood will foreverRun through the stone~COYG!```### Never gonna give you up```We're not strangers to loveYou know the rules and so do IA full commitment what I'm thinking ofYou wouldn't get this from any other guyI just wanna tell you how I'm feelingGotta make you understandNever gonna give you upNever gonna let you downNever gonna run around and desert youNever gonna make you cryNever gonna say goodbyeNever gonna tell a lie and hurt youWe've known each other for so longYour heart's been aching but you're too shy to say itInside we both know what's been going onWe know the game and we're gonna play itAnd if you ask me how I'm feelingDon't tell me you're to blind to seeNever gonna give you upNever gonna let you downNever gonna run around and desert youNever gonna make you cryNever gonna say goodbyeNever gonna tell a lie and hurt you```### 唯一活下来的中文注释,真是个奇迹```cpp/*试一试:看看我如何状态转移总满意度我看看,每进入一个新人,算一下他将就好还是已有的某个人将就好好像得排序,具体怎么排不知道看一下前8组是否能过,n<=30先dfs看看,O(3^n),2.058911e+014,显然TLE了2001e7可以O(n^3)第12可以水过去想想前8或前11如何得分显然,需要决定谁去A,谁去B,谁去C。求总和。但是不能简单取最大值想一个快于等于O(n^3)的先想c=0,即一半去A一半去B如果这样,需统计B比A大的和A比B大的哪一种少优先选择,其次从多的那一种只能选一部分去另一个了。此时让差小的去另一个更优。时间复杂度O(nlogn),即使用了priority_queue也没法进一步优化最坏情况此时8组到手。看看此时有去C的了,……分为3类:A最大的,B最大的,C最大的。因为交换无影响设最多的为a,第二为b,最少为c显然,不可能a和b同时大于n/2所以只有a里的人能将就,去b和去c如何定?若a多出来的人都去b完全可以,因为a+b<n所以将A根据差排序决定去B还是去C。因为无需关心a,b,c具体是啥,算出差即可。无需关心?好像需要关心a,b,c中a的值,b和c不用关心100分到手。好像不对。我需要记录最大值从哪里取的,只从从a取的里面减即可所以应该可以:================================================================第二题,大图论我想想……只有两种途径让它变成连通图1.修复已有边2.使用新增点,并加入新增点和已有点的连边怎么修复可以跑一遍kruskal(或Prim)。但是不然,现在有新增点了。新增点与每个点都能有连边,所以,有个笨办法,根据新增点状况进行dfs这样O(mlogm*2^k)(kruskal)O(n^2*2^k) (prim)想想怎么基于其中一个改cc直接跑一遍prim能过4个O(n^2*2^k)能过8个O(mlogm*2^k)能过4个prim基于已访问过点,kruskal基于边,想一下基于prim的吧基于prim,可以不加任何点求出最小生成树。再想想如何在prim过程中加点使得加过点之后更小加点只需要付加过点的权值。即已有这个点,边是能考虑的。那么怎么加点呢?Kruskal还是Prim?啊?特殊性质A?如果有特殊性质A,即直接把这些点加进去即可,可以不连通这些点?不连通这些点?K还是P?只要不连通这些即可,prim是把已联通的连通块连接边加入新点,kruskal是选所有边不构成环的最小边。我想想……如果存在两个点使得经其中一个新点路更短,则路最短的新点一定在答案中。然后跑一个dijkstra只能获得从一个点的最短路,可能这步"优化"更慢了先想想特殊A吧有了特殊A,即求最小生成树,其中几个节点可以是非树节点。好像既然特殊A有后半句,找一下最大的i,之后前i个点都免费了。此时只剩下所有点跑个最小生成树,同时删去预期4个==================================先做第三个吧。第三个,我需要先算出字符串的区别。即掐头去尾这样之后,有一个子串关系:a<=b<=ca是掐头去尾后的 b是s_{i,1} c是原串只要对于每个有此子串关系的s_{i,1}判断替换之后的会怎样就行.接下来就是如何快速判断是否有这个关系。判断可以用KMP做到O(s),s是字符串长度。我看看这种做法能得多少分5e6?接下来,既然总长是5e6,且为多测,O(L1+n*L2)根据上面的思路,我需要先把每个小串的next表算出来,这一步O(L1)然后对于每个q,求出它掐头去尾的next表,然后比较每个串是否符合这个子串关系设这个q大串长度为sO(s*n)即O(n*L2)q=1对此做法无影响若有B,掐头去尾肯定是baaa...a或aaaa...b根据b位置左边的a个数和右边的a个数就行。比较子串关系变成O(1)此时总复杂度是O(n*q)看看能不能让它带log好了,预期6组试试哈希?哈希之后,如何判断是否有子串关系?有点难===================================看第四题吧。第四题我看一下是否会做第四题我可以写个dfs骗骗分看看折半搜索?n!好像没法折半,有没有剪枝如果没面试的所有人耐心都低于了没通过的,则break掉想想其他的。想不到。就这样写吧第四题有个特殊性质A,有A的直接阶乘取模。m=n时全1则阶乘取模,有0则0m=1?这个我想想……m=1时只录取一个人即可。则可以所有情况减都不录取的情况都不录取看看能不能求都不录取?第一天是1时一定能有人录取如果第一天是0,不知道了。此时预期7个好了第二题预期4组第三题6组第四题7组那么先做第四题*/```### 原神玩家+1```luogu@Nahia uid:1199153Genshin Impact uid:289015817I love Nahida forever!*/```### 许愿&感谢```cpp/*gu fen: 100+56+[25,100]+20=[201,276]maybe 0?thank you Furinathank you Cyrenethank you Elysiathank you HL1thank you Rabbit groupthank you Hikarithank you Tairitsuthank you Geopeliathank you Ginoplease let me 200+please let me 1=please let me level 7t1 trivial greedy?da yang li passt2 mst can do 16pts and pass sample 2???mst + constraint A + O(2^k mlogm)=56?t3 trie pao de fei kuai??passed da yang li25?50?100??t4 zhuang ya dp20?I thought an O(n^2) solution but it's impossible to dp//freopen//freopen#include<bits\stdc++.h>int y1;freopen("club.ans","w",stdout);freopen("employee.in","r",stdin);We're no strange to loveyou know the rules and so do IDarkest nignt I'll confront you here...rain sky red blue touch collapse baby's sleep songplease let me 1=please let me 1=please let me 1=please let me not 0ptsplease let me 200+please let me level 7*/```### 求翻译```cpp/*xian zai hai mei kai kao,wo jiu yi jing po bu ji dai dexie xia le zhe duan zhushixian zai yi jing shi 18:04 lewo de xin qing shi fen gou shidao bu shi shuo wo zuo le yi dui gou shi(shi ji shang wo jiu shi zuo le yi tuo gou shi ,dan wo de yi si shi wo bu shi yin wei wo zuo le yi tan gou shi xin qing bian gou shi de)er shi yin wei wo fa zi fei fu xie le yida duan hua wang bao cun leqi si wo lewo xian zai yao nai zhe xing zi hui xiang yi xia,zai xei xia lai:wo mei nai xin xiang lefan zheng da gai jiu shi gan xie le yi dui renran hou jue de zhe ci kao ~120ru guo wo you xing(xing yun de xing)qie you qing(qing xv de qing) wo hui zai NOIP hao hao zai xie yi bianxi wang neng hun ge 3=gan xie na ge zheng li mi huo xing wei da shang de renma fang ni ba zhe yi da duan wen zi xie cheng han ziFrom luogu @Shiro_Zhu BCMS ZhuXiling : bi wo cai de bi wo qiang de gen wo shui ping cha bu duo de dou AK CSPhai you ,wo bu xiang ding ge lv gou tui yilai ge bluebluebluebluebluebluebluebluebluedui le ,wo hai yao tu cao yi xia,wo de da zhou mei le .hai you,zhe shi wo di yi ci da CSP-S*/```### hope```I'm luogu uid748678.Maybe it's my last year in CSP/NOIP.Hope everything goes best.```### %%%```/*at 16:04finally akedwith all the best wishesat 17:204 duipais were builttry to write an overall selfevalbut failed*/```### 游记爷```/*Ren5Jie4Di4Ling5%16:25 wtf so easy?just hash is ok or i am a (b h)?16:30 i understand the problem in a wrong way OvO.16:40 i can only solve 25pts,D first.17:00 back to think C17:20 i think i should start to write codes for C and D,only 249pts,sad17:35 finisg 25pts,why wrong?17:40 pass 25pts18:15 i can solve 30pts now18:25 finish 30pts*/```### 我猜 1```cpp#include<bits/stdc++.h>#define pii pair<long long,long long>#define ll long longusing namespace std;const int N = 1e5 + 9;int n,m,k,w[N];vector<pii> v[N];priority_queue<pii,vector<pii>,greater<pii> > p;int main(){freopen("employ.in","r",stdin);freopen("employ.out","w",stdout);cout << 1;fclose(stdin);fclose(stdout);return 0;}```### 我摆了``````以上为代码全文。### 万 · 能 · 头```cpp#include<iostream>#include<cstdio>#include<cmath>#include<cstdlib>#include<ctime>#include<cstring>#include<string>#include<algorithm>#include<bitset>#include<vector>#include<queue>#include<deque>#include<stack>#include<map>#include<set>/* 省略若干 */using namespace std;int main(){freopen(".in","r",stdin);freopen(".out","w",stdout);return 0;}```### T1 肝佬```cpp#include<bits/stdc++.h>using namespace std;const int N=1e5+101;long long t;long long n;struct node{int fir;int sec;int thi;int vis;int c12;int c23;int c13;}sta[N];struct node1{int fir;int sec;int thi;int vis;int c12;int c23;int c13;}sta1[N];struct node2{int fir;int sec;int thi;int vis;int c12;int c23;int c13;}sta2[N];struct node3{int fir;int sec;int thi;int vis;int c12;int c23;int c13;}sta3[N];int cmp1(node a,node b){return a.fir>=b.fir;}int cmp2(node a,node b){return a.sec>=b.sec;}int cmp3(node a,node b){return a.thi>=b.thi;}signed main(){freopen("club.in","r",stdin);freopen("club.out","w",stdout);cin>>t;while (t--){cin>>n;long long ans=0;int nu[5];nu[1]=n/2;nu[2]=n/2;nu[3]=n/2;int num[N]={};for (int i=1;i<=n;i++){cin>>sta[i].fir>>sta[i].sec>>sta[i].thi;sta[i].c12=sta[i].fir-sta[i].sec;sta[i].c13=sta[i].fir-sta[i].thi;sta[i].c23=sta[i].sec-sta[i].thi;}sort(sta+1,sta+n+1,cmp1);for (int i=1;i<=n;i++){sta1[i].fir=sta[i].fir;sta1[i].sec=sta[i].sec;sta1[i].thi=sta[i].thi;sta1[i].c12=sta[i].c12;sta1[i].c23=sta[i].c23;sta1[i].c13=sta[i].c13;}for (int i=1;i<=n/2;i++){ans+=sta[i].fir;sta[i].vis=1;num[i]=1;}//cout<<ans<<endl;sort(sta+1,sta+n+1,cmp2);for (int i=1;i<=n;i++){sta2[i].fir=sta[i].fir;sta2[i].sec=sta[i].sec;sta2[i].thi=sta[i].thi;sta2[i].c12=sta[i].c12;sta2[i].c23=sta[i].c23;sta2[i].c13=sta[i].c13;}for (int i=1;i<=n/2;i++){if (sta[i].vis){if (sta[i].sec>sta[i].fir){nu[1]--;ans+=(sta[i].sec-sta[i].fir);num[i]=2;}else nu[2]--;}else{sta[i].vis=1;ans+=sta[i].sec;num[i]=2;}}//cout<<ans<<endl;sort(sta+1,sta+n+1,cmp3);for (int i=1;i<=n;i++){sta3[i].fir=sta[i].fir;sta3[i].sec=sta[i].sec;sta3[i].thi=sta[i].thi;sta3[i].c12=sta[i].c12;sta3[i].c23=sta[i].c23;sta3[i].c13=sta[i].c13;}for (int i=1;i<=n/2;i++){if (sta[i].vis){if (sta[i].thi>sta[i].fir&&sta[i].thi>sta[i].sec){if (num[i]==2){nu[2]--;ans+=(sta[i].thi-sta[i].sec);}else{nu[1]--;ans+=(sta[i].thi-sta[i].fir);}}else nu[3]--;}else{sta[i].vis=1;ans+=sta[i].thi;num[i]=3;}}//cout<<ans<<endl;for (int i=1;i<=n;i++){if (!sta[i].vis){int yi=0,er=0,san=0;int y=0,e=0,s=0;if (sta[i].fir>=sta[i].sec&&sta[i].fir>=sta[i].thi){yi=sta[i].fir;y=1;}else if (sta[i].sec>=sta[i].fir&&sta[i].sec>=sta[i].thi){yi=sta[i].sec;y=2;}else if (sta[i].thi>=sta[i].sec&&sta[i].thi>=sta[i].fir){yi=sta[i].thi;y=3;}if (sta[i].fir>=sta[i].sec&&sta[i].fir<=sta[i].thi||sta[i].fir>=sta[i].thi&&sta[i].fir<=sta[i].sec){er=sta[i].fir;e=1;}else if (sta[i].sec>=sta[i].fir&&sta[i].sec<=sta[i].thi||sta[i].sec>=sta[i].thi&&sta[i].sec<=sta[i].fir){er=sta[i].sec;e=2;}else if (sta[i].thi<=sta[i].fir&&sta[i].thi<=sta[i].sec||sta[i].thi>=sta[i].sec&&sta[i].thi<=sta[i].fir){er=sta[i].thi;e=3;}if (sta[i].fir<=sta[i].sec&&sta[i].fir<=sta[i].thi){san=sta[i].fir;s=1;}else if (sta[i].sec<=sta[i].fir&&sta[i].sec<=sta[i].thi){san=sta[i].sec;s=2;}else if (sta[i].thi<=sta[i].fir&&sta[i].thi<=sta[i].sec){san=sta[i].thi;s=3;}if (nu[y]<n/2) ans+=yi;else{if (er) ans+=er;else{if (y==1){for (int j=n/2;j>=1;j--){if (!sta1[j].vis){if (sta1[j].c23>=0&&sta1[j].sec!=0&&sta1[j].c12>=0){ans-=sta1[j].fir;ans+=sta1[j].sec;ans+=yi;sta1[j].vis=1;break;}else if (sta1[j].c23<=0&&sta1[j].thi!=0&&sta1[j].c13>=0){ans-=sta1[j].fir;ans+=sta1[j].thi;ans+=yi;sta1[j].vis=1;break;}}}}else if (y==2){for (int j=n/2;j>=1;j--){if (!sta2[j].vis){if (sta2[j].c12>=0&&sta2[j].fir!=0&&sta2[j].c12<=0){ans+=sta1[j].sec;ans+=sta1[j].fir;ans+=yi;sta2[j].vis=1;break;}else if (sta1[j].c13<=0&&sta1[j].thi!=0&&sta2[j].c23>=0){ans-=sta1[j].sec;ans+=sta1[j].thi;ans+=yi;sta2[j].vis=1;break;}}}}else if (y==3){for (int j=n/2;j>=1;j--){if (!sta3[j].vis){if (sta3[j].c12<=0&&sta1[j].sec!=0&&sta3[j].c23<=0){ans+=sta3[j].thi;ans+=sta3[j].sec;ans+=yi;sta3[j].vis=1;break;}else if (sta3[j].c12>=0&&sta3[j].fir!=0&&sta3[j].c13<=0){ans+=sta3[j].thi;ans+=sta3[j].fir;ans+=yi;sta3[j].vis=1;break;}}}}}}}}cout<<ans<<"\n";}return 0;}```---终于整理完了。整理不易,不喜轻喷,谢谢。后续会更的。