版本比较
2025 CSP-S SD 迷惑行为统计
正文
增加 500 行删除 58 行
112345678910111213182 行未改动全部展开19619719819919520020120220319920420520620720869 行未改动278279280281277282283284285286123 行未改动全部展开41041141241340941441541641741841441942042142242328 行未改动45245345445545145645745845946024 行未改动48548648748848448949049149249324 行未改动5185195205215175225235245255263 行未改动53053153253352953053453553653753853954054154254354454054554654754854921 行未改动57157257357457057557657757857924 行未改动60460560660760360860961061161215 行未改动62862963063162763263363463563632 行未改动66967067167266867367467067567667767867911 行未改动69169269369469069569669769369869970070170217 行未改动72072172272371972472572672772372872973073173273373473573173273673773873974074134 行未改动77677777877977578078177778278378478578178678778878979020 行未改动8118128138148108158168178188194 行未改动82482582682782382882983083183213 行未改动8468478488498458508518528538548558568578538548558568578588598608618628638648658663 行未改动870871872873874875876877878879880881873882883875884885886887888105 行未改动全部展开99499599699798999899910001001100220 行未改动10231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107640 行未改动11171118111911201066106711211122112311241125112638 行未改动116511661167116811141169117011711172117333 行未改动120712081209121011561211121212131214121535 行未改动12511252125312541200125512561257125812593 行未改动126312641265126612121267126812691270127116 行未改动12881289129012911237129212931294129512961297129812441299130013011302130321 行未改动132513261327132812741329133013311332133327 行未改动136113621363136413101365136613671368136922 行未改动1392139313941395134113961397139813991400254 行未改动全部展开1655165616571658160416051659166016611662166316091664166516661612161316671668166916701671167216731619167416751676167716231678167916801681168226 行未改动170917101711171216581659171317141715171617171718171917201721172217231669172417251726172717284 行未改动173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128由于个人保存不当,代码中中文注释全没了……。~~由于个人保存不当,代码中中文注释全没了……。~~
可能等官方的程序包出来后再去修改(前提是那时我还在役)。
**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});69 行未改动 return f[x]; } void mg(int x,int y){ if(siz[x] > siz[y]) swap(x,y); f[x] = y,siz[y] += siz[x]; 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]); 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;//¼Ϊ1 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)//��ǰ���� ��¼ȡ 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]; 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$ 个是诈骗。 `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$ 次是诈骗。32 行未改动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); while(1); return 0;} }//CCF is good//CCF is good//CCF is good//CCF is good11 行未改动```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 is CCF 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 .................*/ */```不做评价。
## 代码长度这一块17 行未改动 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); fclose(stdin); fclose(stdout);}
```
34 行未改动
#### SD-S01264
``` CCCCCCCCC CCCCCCCCCC FFFFFFFFFFF CCCCCCCCC CCCCCCCCCC FFFFFFFFFFF C C F C C F C C F C C F C C FFFFFFFFFFF C C F C C F C C F CCCCCCCCC CCCCCCCCCC F```
~~**您在这种花呢?**~~20 行未改动
```/*-------- �� || , ---- |--|--| | , ---- |--|--|| |---| / |--|--|| |---| /| |--|--|| |---| | || .|. | |4 行未改动
#### 同上
``` ^^^^^^^^^^^^ ^^^^^^^^^^^^ ( �� �� ) | |------| |-------() | |13 行未改动 / / / / / / / / / /____/ / /\ / /____ /____/ / / / / \ / / / / / / \ /____ ____/ / .
```
%%%%%%%%%%%
#### SD-S?????
``` [||||] \__/ / \ / \ /______\ [||||] \__/ / \ / \ /______\```
## 盒子这一块3 行未改动`SD-S01020` 出现在了两个不同人的代码里。
神秘。
### 彩蛋2
SD-J00001 出现在了选手文件夹中?
### 开盒环节:
帮你们开了,不用谢。
**SD-S00161**:@[China_DeepSeek](luogu://user/1209548) **SD-S00161**:@[China_DeepSeek](luogu://user/1209548)
**SD-S00433**:@[undefined_behavior](luogu://user/780262) **SD-S00433**:@[undefined_behavior](luogu://user/780262)
**SD-S00436**:@[Meng_Xiangyu](luogu://user/1433474)
**SD-S00446**:@[JuRuoOIer](luogu://user/476093)105 行未改动全部展开### 祝好```//love you//OI//bye~ bye //bye~ bye```### 大佬爆切 T2```//14:48 begin20 行未改动}```$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); fst cin>>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];40 行未改动// b[42]=a[][]+a[][]+a[][]+a[][];// b[43]=a[][]+a[][]+a[][]+a[][];// b[44]=a[][]+a[][]+a[][]+a[][];// b[45]=a[][]+a[][]+a[][]+a[][];// // } //// }```
### 不可以,总司令```cpp38 行未改动```还有
```cpp// wo zhen de bu xiang tui yi // wo zhen de bu xiang tui yi```
### Don't learn me```cpp33 行未改动### 来 生 再 见
```cpp//i love yukina roxy anon yuki aimi aiba and all of bangdreams characters and cvs//CCF SEE U NEXT LIVE //CCF SEE U NEXT LIVE//RP++```
### I AKed CSPJ this morning35 行未改动 while(heap7772666.size()&&cnts666<n666) { lsqxx666 bs666=heap7772666.top(); heap7772666.pop(); int lss666=bs666.s7771666; //Lin Sen Sen int lxx666=bs666.t7771666; //Lin Xiao Xi int lxx666=bs666.t7771666; //Lin Xiao Xi li666 dis666=bs666.wd666; if(fam666(lss666, lxx666)) continue; heap666.push(bs666); answer666+=dis666;3 行未改动 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". //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 Yin16 行未改动```
还有直抒胸臆:```//I love CCF //I love CCF```
### 暴戾语言
```cpp//FUCK Magus CYB//FUCK zzldd DJM //FUCK zzldd DJM//HAPPY```
### 我知道你喜欢玩原神了21 行未改动### Wake up```Wake up!What should I do now?Could I see the blossom? Could I see the blossom?But now I may find you.
Why T1 so hard!!!!!!!!
27 行未改动//feropenIAKIOI```
### 不知道该起什么名了### 阿森纳球迷
```North London ForeverWhatever the weather22 行未改动Your 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 see Don'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 cry254 行未改动全部展开xian zai hai mei kai kao,wo jiu yi jing po bu ji dai dexie xia le zhe duan zhushi
xian zai yi jing shi 18:04 lewo de xin qing shi fen gou shi dao bu shi shuo wo zuo le yi dui gou shi wo 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 le qi si wo lewo xian zai yao nai zhe xing zi hui xiang yi xia,zai xei xia lai:
wo mei nai xin xiang le fan zheng da gai jiu shi gan xie le yi dui ren 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 bian
xi wang neng hun ge 3=
gan xie na ge zheng li mi huo xing wei da shang de ren 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 yi hai you ,wo bu xiang ding ge lv gou tui yilai ge blueblueblueblue26 行未改动
at 17:204 duipais were built
try to write an overall selfeval but failed try 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: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?4 行未改动
```
### 我猜 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;}
```---终于整理完了。
整理不易,不喜轻喷,谢谢。
后续会更的。