版本比较
FJ NOI Plus 2025 迷惑行为大赏
正文
增加 78 行删除 78 行
59 行未改动606162636464656667686920 行未改动9091929394949596979877 行未改动1761771781791801801811821831842 行未改动18718818919019119119219319419537 行未改动23323423523623723723823924024024124224324424524624724624724824925025125125225325425545 行未改动3013023033043053053063073083093103093103113123133145 行未改动32032132232332432532432532632732832961 行未改动39139239339439539539639739839964 行未改动46446546646746846846947047147147247347347447547647747747847948048148248148248348448548690 行未改动57757857958058158158258358458522 行未改动60860961061161261361461261361461561661761822 行未改动64164264364464564564664764864965065065165265365469 行未改动7247257267277287287297307317328 行未改动7417427437447457457467477487497507497507517527537547527537547557567577584 行未改动7637647657667677677687697707716 行未改动7787797807817827827837847857868 行未改动7957967977987997998008018028038048058068078088098098108118128134 行未改动81881982082182282382282382482582682736 行未改动86486586686786886886987087087187287387438 行未改动9139149159169179179189199209217 行未改动92993093193293393393493593693693793893994029 行未改动97097197297397497497597697797897998098198298398498498598698798898998999099199299319 行未改动101310141015101610171017101810191020102110221023102410251026102710281026102710281029103010311032103310341034103510361037103810391040104110421042104310441045104610 行未改动10571058105910601061106110621063106410655 行未改动10711072107310741075107510761077107810791080108110821082108310841085108612 行未改动10991100110111021103110411031104110511061106110711081109111030 行未改动114111421143114411451145114611471148114925 行未改动11751176117711781179117911801181118211833 行未改动1187118811891190119111911192119311941195119611971198119911991200120112021203120412051206120612071208120912101211121212131214121512151216121712181219121912201221122212231223122412251226122712281229123012311232123212331234123512341235123612371237123812391240124112421242124312441245124612461247124812491250125112521252125312541255125616 行未改动12731274127512761277127712781279128012819 行未改动12911292129312941295129512961297129812997 行未改动13071308130913101311131113121313131413157 行未改动59 行未改动
```T2、T3、T4 也是,不贴了。
### FJ-000520 行未改动mei ju C,A1.>C: fang zai 1 huo 22.<C,>A: fang zai 1 huo C zhi hou3.<A: A zhi hou huo C zhi houmei ju qi zhong you t1 ge fang zai 2,ze mei ju qi zhong you t1 ge fang zai 2,ze*/```T3```cpp77 行未改动}int main(){ freopen("query.in","r",stdin); freopen("query.out","w",stdout); // 暴力略 // 暴力略 return 0;}// #include <bits/stdc++.h>// using namespace std;2 行未改动// const int N=51000,B=17;// const ll INF=1e18;// int n,q;// ll a[N];// (此处省略 100 多行) // (此处省略 100 多行)// return 0;// }```### FJ-001037 行未改动 if(x<0) putchar('-'),x=-x; if(x>9) write(x/10); putchar('0'+x%10);}// (后文略) // (后文略)```### FJ-0012T1 T1对拍与 `long long`。```cpp//wait to duipai//long long```T2 感谢什么? T2感谢什么?`//thx i'm []`
### FJ-0017又是战术性空行。 又是战术性空行。T1```cpp#include<bits/stdc++.h>using namespace std;45 行未改动```cpp/*???????????????е?L??j??????е?j???????? j????????
??????L???M??j???????????k-2????j??????2???????????????j????1????j??? ???2 =??????j R??p?????????2???1????????1????i??????????j???????p??????????????????? M??j???????????k-2????j??????2???????????????j????1????j??? ???2 =??????jR??p?????????2???1????????1????i??????????j???????p???????????????????*/```
### FJ-00515 行未改动g++ candy.cpp -o A -std=c++14 -O2 -Wall -Wextra -Wconversion -Wshadow -D_GLIBCXX_DEBUG -fsanitize=undefined -fsanitize=address && ./Adiff candy.out candy1.ans -w*/```T2:`g++ sale.cpp -o A -std=c++14 -O2 -Wall -Wextra -Wconversion -Wshadow -D_GLIBCXX_DEBUG -fsanitize=undefined -fsanitize=address && ./A`; T3:`g++ .cpp -o A -std=c++14 -O2 -Wall -Wextra -Wconversion -Wshadow -D_GLIBCXX_DEBUG -fsanitize=undefined -fsanitize=address && ./A`; T2:`g++ sale.cpp -o A -std=c++14 -O2 -Wall -Wextra -Wconversion -Wshadow -D_GLIBCXX_DEBUG -fsanitize=undefined -fsanitize=address && ./A`;T3:`g++ .cpp -o A -std=c++14 -O2 -Wall -Wextra -Wconversion -Wshadow -D_GLIBCXX_DEBUG -fsanitize=undefined -fsanitize=address && ./A`;T4:`g++ query.cpp -o A -std=c++14 -O2 -Wall -Wextra -Wconversion -Wshadow -D_GLIBCXX_DEBUG -fsanitize=undefined -fsanitize=address && ./A`。
T3:《从空文件输入,输出到空文件》& Which is `E` —— 战术性 CE。```cpp61 行未改动T2:火星文。```cpp//namespace m2{ //buhui
//}
//aeirhguerhgaiojsamdfcoiqhbiu```64 行未改动 for (int i = 0; i < n; i++) for (int j = i; j < n; j++) ans = max(ans, dp[1][i][j]); printf("%d\n", ans);}
int main() { freopen("tree3.in", "r", stdin);// freopen("tree.out", "w", stdout); // freopen("tree.out", "w", stdout); scanf("%d", &T); while (T--) solve(); while (T--) solve(); return 0;}*///?????治????????д????? //?????治????????д?????```
### FJ-0056T3 不会 `freopen` 了。 T3不会 `freopen` 了。不会敲代码了。```cpp#include<bits/stdc++.h>// (一堆板子)90 行未改动T2```cppint mian(){ // 略 // 略}int main(){return xcy::mian();}```T322 行未改动### FJ-0084[T3:古希腊掌管 RE 的神。](https://yundouxueyuan.com/d/NOIPC/record/692adae1bf64ccc18c99cefe)
### FJ-0093“我的每一次打代码,都在我的掌控之中。” T1 `//9:04`; T2 `//52 pts...`; “我的每一次打代码,都在我的掌控之中。”T1 `//9:04`;T2 `//52 pts...`;T3 `//48 pts`。
### FJ-0096游记——AFO 记。22 行未改动11:27 got T2 baoli and A 149pts12:06 I couldn't do counting!!!try T3failed149pts AFO..... 149pts AFO.....*/```
### FJ-0117又战术性 CE。 又战术性 CE。“线段树挂了,摆了。”```cpp#include<bits/stdc++.h>#define ll long long69 行未改动void d(int u){h[u]=0,s[u]=1;for(auto v:e[u]){d(v),s[u]+=s[v];if(s[v]>s[h[u]])h[u]=v;}}void D(int u){if(!u)return;D(h[u]),f[u]=f[h[u]]+(u==1?s[h[u]]+1:s[u]);if(u==1)for(auto v:e[u])if(v^h[u])D(v),f[u]+=f[v];}void S(){for(cin>>n>>m,i=1;i<=n;e[i++].clear());for(i=2;i<=n;e[p].pb(i++))cin>>p;d(1),D(1);cout<<f[1]<<"\n";}signed main(){ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);freopen("tree.in","r",stdin);freopen("tree.out","w",stdout);for(cin>>T;T--;S());return 0;}//Ϊʲô�ҵ�����DP���̰���ˣ�����CCF�����ʲô���ݣ����� //Ϊʲô�ҵ�����DP���̰���ˣ�����CCF�����ʲô���ݣ�����``````cpp#include<bits/stdc++.h>#define int long long8 行未改动 t=max(t,s[k]-s[j-1]); b^=(t*i%mod+mod)%mod; } }return 0;}//afo��*��*������ }//afo��*��*������```
### FJ-0134>我真的不会 T2、T3、T4 中的任何一题。 再见。 >我真的不会 T2、T3、T4 中的任何一题。再见。>>那些同的记忆 >落在春的泥土里 >滋养了大地 >那些同的记忆>落在春的泥土里>滋养了大地>开出下一个花季```cpp// wo zhende buhui T2 T3 T4 zhongde renhe yiti// zaijian.4 行未改动// KAI CHU XIA YI GE HUA JI```
### FJ-0137T4 T4goodbye OI!```cpp//!noip@Nov29,2025:dream goodbye OI!//度过了一段很快乐的时光!谢谢,然后再见!6 行未改动/*
ע�������һ�ֱ�ѡ���Ρ�ö�ټ��ɡ�
upd:188��ȼ���ˡ� upd:188��ȼ���ˡ�
*/```T4:你以为它不成立吗?OIer 都看懂啦!8 行未改动### FJ-0142T1:考古。```cpp/*�����ܺ���С���ǹ� �����ܺ���С���ǹ�*/```
### FJ-0143T3:AFO。```cpp//退役了,但我会记得这一切的```T4“失去手段后只会输入怎么办?” “失去手段后只会输入怎么办?”“凉拌。”```cppint main(){ freopen("query.in","r",stdin);4 行未改动}```
### FJ-0146T3 完了,完了,代码打不完了。——《如梦令》 T3完了,完了,代码打不完了。——《如梦令》他甚至没有解开 freopen。```cpp#include<bits/stdc++.h>#define int long long36 行未改动 cin>>p; ed[p].push_back(i+1); } dfs(1,0); } } return 0;} }
```
### FJ-015038 行未改动*/```
### FJ-0160T2 T2不会计算 $2^n$ 了。```cpp#include<bits/stdc++.h>#define int long long7 行未改动 cin>>T>>T; while(T--){ cin>>n>>m; for(int i=1;i<=n;i++) cin>>a[i];
} return 0;} }```
### FJ-0166估分吗?29 行未改动*/```
### FJ-0209T1 T1会忘 `long long` 怎么办?我来教你。```cpp//ll!!!#include <bits/stdc++.h>using namespace std;// (后文省略)```
### FJ-0211T2:输出 $2^n$。 T2:输出 $2^n$。本来可以拿 $8$ 分的,但他忘换行啦!```cppvoid solve() { cin >> n >> m; ans = 1; for (int i = 1; i <= n; i++) for (int i = 1; i <= n; i++) cin >> a[i], ans = ans * 2 % MOD; cout << ans;}```19 行未改动
### FJ-0220T4:我是如何调试的。```cpp// return 0; // return 0;// cout<<114514;```### FJ-0244T2:据考古发现,该文章是 OIer 对 OI 得感叹。```cpp/*T2����������Сʱ���վ�ʧ���ˣ�ֻ����72�ֵ����ʣ����ź���OI������Ļ�ˡ�һ·���л�Ц����ʹ�࣬������ѵ�Ȼ�����������ѵľ�����������ѡ���ˡ� �ټ���OI�� */ ���������ѵľ�����������ѡ���ˡ��ټ���OI��*/```
### FJ-0279T1:`chocolate--;````cpp//8:15���˿��� //8:15���˿���//9:30��������̰�������о��� (maybe 100pts)//10:00 chocolate--;//11:10 chocolate--;```T3:考古喽!```cpp//Arknights �ٷ�id 482169191//�ҾͲ�����ͨ�����˿����Ի���Ϊ�������� //�ҾͲ�����ͨ�����˿����Ի���Ϊ��������```T2、T4 都是空文件。是的,你没看错,是有文件但啥也没打。
### FJ-045510 行未改动int main(){return freopen("candy.in","r",stdin),freopen("candy.out","w",stdout),Sol::M(),0;}```
### FJ-0329T2:$2^n$。 T2:$2^n$。但他快速幂没开 `long long`,乘法时爆炸啦!```cpp#include <bits/stdc++.h>#define int long long5 行未改动 int res = 1; while (y) { if (y & 1) res = res * x % mod; x = x * x % mod; y >>= 1; y >>= 1; } return res;}signed main() { freopen("sale.in", "r", stdin); freopen("sale.out", "w", stdout); ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> c >> t; while (t--) { cin >> n >> m; for (int i = 1; i <= n; i++) cin >> a[i];12 行未改动T1```cpp/*T1 Done at 8:53.100pts */ 100pts*/```T2 T2"Why is this problem so difficult???"```cpp/*Complete reading untill 9:20.30 行未改动 if min(a) == a[i] OK 0}7~9, 14~15 (m = 2) { choose i, j;
}*/```T4:RP 万岁!25 行未改动void dfs1(ll u){ sz[u]=1; for(int v:g[u]){ if(v==p[u]) continue; dfs(v,u); // dfs(v,u); // sz[u]+=sz[v]; }}ll ask(ll w){3 行未改动 } }}void dfs2(ll u){ if(u!=1&&g[u].size==1){ // if(u!=1&&g[u].size==1){ // dp[u][0]=1; for(int i=1;i<=n;i++){ dp[u][(1<<i)]=0; } } for(int v:g[u]){ if(v==p[u]) continue; dfs(v,u); // dfs(v,u); // for(int s1=0;s1<(1<<n);s1++){ for(int s2=0;s2<(1<<n);s2++){ ll s=s1&s2; dp[u][s]=max(dp[u][s],dp[u][s2]+dp[v][s2]); } } for(int s=0;s<(1<<n);i++){ // for(int s=0;s<(1<<n);i++){ // tmp[u][s]=dp[u][s]; } for(int i=0;i<=n;i++){ for(int s=0;s<(1<<n);s++){ int s1=(s)|(1<<i); tmp[u][s1]=max(tmp[u][s1],dp[u][s]+ask(s1)); } } for(int s=0;s<(1<<n);i++){ // for(int s=0;s<(1<<n);i++){ // dp[u][s]=tmp[u][s]; } }
}int main(){ freopen("tree.in","r",stdin); freopen("tree.out","w",stdout); freopen("tree.out","w",stdout); cin>>T; while(T--){ cin>>n>>m; for(int i=2;i<=n;i++){ cin>>p[i]; g[i].push_back(p[i]); g[p[i]].push_back(i); } dfs1(1,0); // dfs1(1,0); // memset(dp,-0x3f,sizeof dp); dfs2(1,0); // ll ans=0; dfs2(1,0); // ll ans=0; for(int s=0;s<(1<<n);s++){ ans=max(ans,dp[u][s]); // ans=max(ans,dp[u][s]); // } cout<<ans<<"\n"; } return 0;} }```
### FJ-0499为什么代码后要空行呢? 为什么代码后要空行呢?T1 空 $0$ 行,T2 空 $1$ 行,T3 空 $2$ 行,T4 空 $2$ 行。
### FJ-0509T1:能为我翻译吗?```cpp//����������ź�һ�ΰ������һ������ѷ��������� //����������ź�һ�ΰ������һ������ѷ���������```
### FJ-0527[T3——古希腊掌管 TLE 的神](https://yundouxueyuan.com/d/NOIPC/record/692adaf1bf64ccc18c99dc3b)16 行未改动/*8:15 �Ի����8:30 ����9:05 ��T1 ��̫����9:50 T2 20pts 9:50 T2 20pts10:55 modд���� i'm so tang T2 40pts11:04 T2 52pts*/```9 行未改动{ ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); freopen("tree.in","r",stdin); freopen("tree.out","w",stdout);
return 0;}``````cpp7 行未改动{ ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); freopen("query.in","r",stdin); freopen("query.out","w",stdout);
return 0;}```
7 行未改动