棍母。

· · 个人记录

BJ-S01710

游记选手。

T2:
//I thought that CSP-S2025 won't be difficult,so I didn't review the map mod.
//But it's more difficult than the  years before(It's the most difficult year I've seen).
//All right, I just have 75 pts at least->I was so tired to get ready the exam in our junior high school.
//I will try again next year.Good luck and ++rp!---luogu__uid_823830,11.1.
//I love CFF!I AK IOI!(bushi

BJ-S01714

清澈的爱只为CCF。

T2:
    freopen("road.in","r",stdin);
    freopen("road.out","w",stdout);
    cout << "  /-----------    /-----------  --------------" << endl;
    cout << " /               /              |             " << endl;
    cout << "/               /               |             " << endl;
    cout << "|               |               |             " << endl;
    cout << "|               |               |             " << endl;
    cout << "|               |               |             " << endl;
    cout << "|               |               |-------------" << endl;
    cout << "|               |               |             " << endl;
    cout << "|               |               |             " << endl;
    cout << "|               |               |             " << endl;
    cout << "|               |               |             " << endl;
    cout << "\\               \\               |             " << endl;
    cout << " \\               \\              |             " << endl;
    cout << "  \\-----------    \\-----------  |             " << endl;
    cout << "  /--------\\      /--------\\      /--------\\    |--------\\  " << endl;
    cout << " /          \\    /          \\    /          \\   |         \\ " << endl;
    cout << "/            \\  /            \\  /            \\  |          \\" << endl;
    cout << "|               |            |  |            |  |          |" << endl;
    cout << "|               |            |  |            |  |          |" << endl;
    cout << "|               |            |  |            |  |          |" << endl;
    cout << "|               |            |  |            |  |          |" << endl;
    cout << "|               |            |  |            |  |          |" << endl;
    cout << "|      ------|  |            |  |            |  |          |" << endl;
    cout << "|            |  |            |  |            |  |          |" << endl;
    cout << "|            |  |            |  |            |  |          |" << endl;
    cout << "\\            |  \\            /  \\            /  |          /" << endl;
    cout << " \\          /|   \\          /    \\          /   |         / " << endl;
    cout << "  \\--------/ |    \\--------/      \\--------/    |--------/  " << endl;

点明主旨。

T4:
S组你咋这么难啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

BJ-S01726

核弹级选手。

T2,T3,T4:
#include <bits/stdc++.h>
using namespace std;
const int BAD_ALLOC = 2147483647;
int main() {
        for (int i = 1; i <= BAD_ALLOC; i++) {
        auto a = new int[BAD_ALLOC];
        a[BAD_ALLOC-1] = 0;
        }
}

BJ-S01729

古希腊掌管 cmp 的神。48 个 cmp 竟然不重样。

T1:
bool cmp(node a,node b){
    if(a.m1 != b.m1)
        return a.m1 > b.m1;
    if(a.m2 != b.m2)
        return a.m2 > b.m2;
    return a.m3 > b.m3;
}
bool cmp2(node a,node b){
    if(a.m1 != b.m1)
        return a.m1 > b.m1;
    if(a.m2 != b.m2)
        return a.m2 > b.m2;
    return a.m3 < b.m3;
}
bool cmp3(node a,node b){
    if(a.m1 != b.m1)
        return a.m1 > b.m1;
    if(a.m2 != b.m2)
        return a.m2 < b.m2;
    return a.m3 > b.m3;
}
bool cmp4(node a,node b){
    if(a.m1 != b.m1)
        return a.m1 > b.m1;
    if(a.m2 != b.m2)
        return a.m2 < b.m2;
    return a.m3 < b.m3;
}
bool cmp5(node a,node b){
    if(a.m1 != b.m1)
        return a.m1 < b.m1;
    if(a.m2 != b.m2)
        return a.m2 > b.m2;
    return a.m3 > b.m3;
}
(省略很多的cmp...)

BJ-S01735

神秘 freopen。

T1:
freopen("club.in","r"stdin);
freopen("club.out","w"stdout);
T4:
freopen("employ.in","r"stdin);
freopen("employ.out","w"stdout)

BJ-S01746

内存释怀地死了。

T2:
int l[1000010][3];
int x[10010][1000000];

freopen 表示神本无相。

T1:
space('in',"club.in");
space('out',"club.out");
T2:
space('in',"road.in");
space('out',"road.out");
T3:
space('in',"replace.in");
space('out',"replace.out");
T4:
spacein('in',"employ.in");
outsite('out',"employ.out");

BJ-S01747

1111111111111111111111。

T2:
printf("1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...(省略97.7KB的1)

BJ-S01749

拼音游记。

T4:
/*"shaonianwenroudemeiyan,buzhishizaizhijingshuideguowang,yibuzhiyouhuipuxiechuzenyangdehuazhang."
    diyicissai,yekenengshizuihouyici,danwulunruhe,woxiangshuo,zuoweiyigebiaozhundewenkesheng,
    huoxiuxuejisuanjishiyijianhennanyirangrenlijiede`huibeipipanweilangfeishijiandeyijianshi,
    keshijieshangbenmeiyounameduodetiaotiaokuangkuang,bushima?
    wobuhouhuixueOI,yejuebufangqi!
    bujunianqi,weikongjuezhi,jiyizhishou,cishengbufu!
    zhijingmeifenchichengdereaihemeiyigehuaichuaizhefenreaidewomen
    RP++ jinyiciwen,jinianwoyinianduodeOIshengya
    huoxuwojijiangmianlinAFO,dan,nougeshunjian,womenhaihuizaijian
    bijing,yueliangyijiuxiaoyaoyuwuzhuzhiwai,gaoxuanyucangqiong,
    shiwo......zhuibushangtale.
    keshiwoyouqipan,wozhongjiangcongzhifengxiexiadeliuguangli,kuiwangrenjian.
    name,jiuqinganchaowomendeqidai,quzhengmingwomendeweilaiba,huijian,yehuizaijian!
    womenshuohaole......
    Fortune favors the bold.
    --2025.11.1 16:48 shisisulingsangeyuedediyitian
    jinyicipianxiangeiwo,hewoyinianyouyudeOIshengya,
    #include <iostream>
    using namespace std;
    int main()
    {
        cout<<"Hello world!";
        return 0;
    }*/

BJ-S01753

拜谢糖豆之神。\bxbxbx

T1,T2,T3,T4:
/*
 ____
/    \  This is a sugar bean.
\____/  Sugar bean don't judge your flaws.
May the God of Sugar Bean bless all OIers!
*/

BJ-S01756

这里并不是 python。

T1:
int n;
......
if(n=="5 10 2020 14533 18961 2423 15344 16322 1910 6224 16178 2038 9963 19722 8375 10557 5444 3518 14615 17976 6188 13424 16615 8769 509 4394 958 3195 9953 16441 5313 10926 10 5491 4476 6362 9805 9130 15480 9090 9901 10480 6326 6516 1985 9119 2924 6420 9826 12689 7592 7293 16544 12901 11905 18183 18712 9015 3463 13025 1792 2433 17042 10 3004 4255 17336 11894 5756 17092 8150 14715 10991 5149 16652 16780 11524 11996 5433 7690 10472 19935 1184 6516 9246 3231 5570 10010 8426 16992 4654 18955 13977 16657 10 6839 5455 15586 11767 12919 2643 13775 8904 19938 13717 11997 15170 13707 2404 17497 3471 2462 8073 18467 14346 18663 13582 4839 15785 11875 7476 12308 8568 3134 18522 10 14230 3941 18854 12173 19429 15426 10974 4717 15290 4732 6608 4961 13198 13925 2137 10688 3092 16965 5356 19920 1471 11299 10796 13511 17932 12143 16407 5611 8100 16107")

BJ-S01774

把自己T2的代码复制几百遍是骗不到分数的。

T3:
#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;

int city[1005][1005];
struct C
{
    int u,v,value;
}City[1000005];
int a[10][1005];
bool visited[1000005];

bool cmp(C x,C y)
{
    return x.value < y.value;
}

int main()
{
    freopen("road.in","r",stdin);
    freopen("road.out","w",stdout);
......(略)

BJ-S01779

很好的游记。

T3:
/*
那年全国赛后,我看见 Day2T2 字符串瘫在椅子上,后面不会背了

振兴字符串荣光,我辈义不容辞

写哈希吧,不然没法在 1.5h 内获得 300 分了。

本题不弱于二维偏序(构造 a...a+b+c...c -> a...a+d+c...c),无法做到线性。

O(L1+L2+(n+q)log(n+q))

懒死了,写了个 (n+q)logL1,影响不大。

样例:abcdx。

出题人深得小汤圆学精髓。

其实我 2h 时才通过本题。

加油喵!只剩 t4 了!
*/
T4:
/*
正难则反。

对被拒绝或自愿退出的人容斥即可,写出来即为二项式反演。

错了。

注意到删去一个死人可能会复活他后面一个死人。

没绷住,计算容斥系数时会回跳,完全做不了了。
*/

BJ-S01795

cmp 仙人 \times 2,可惜只有 12 个。

#include<bits/stdc++.h>
using namespace std;
struct club
{
    int e, f, g, nn;
}a[100005];
bool cmp1(club d, club p)
{
    if (d.e!=p.e)
        return d.e<p.e;
    else if (d.f!=p.f)
        return d.f<p.f;
    return d.f<p.f;
}
bool cmp2(club d, club p)
{
    if (d.e!=p.e)
        return d.e>p.e;
    else if (d.f!=p.f)
        return d.f>p.f;
    return d.f>p.f;
}
......(略)

BJ-S01807

棍母。

T2:
while (cin >> x) cout;
cout << rand() % 10009;

BJ-S01822

``` T4: #include<bits/stdc++.h> using namespace std; struct st{ long long a,b; }l[505]; long long m[505]={1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,237554682,331032489,972509923,586493473,986189864,781263551,868586527,401576539,447152495,853155713,655938692,768863313,254940118,638976950,282223649,914551701,567646151,59230529,837902046,858512294,380063818,943237576,71251511, ...(略) 4215758,284347304,5519285,702441659,800355478,664508969,512509317,111271972,64914753,188983439,899060915,618048964,329123348,520476760,694848220,694848220,} //bool cmp(st a,st b) int main(){ freopen("employ3.in","r",stdin); freopen("employ3.out","w",stdout); ``` ### BJ-S01830 神秘游记。 ``` T3: //using nmaespacem sdt; //int man() //------------------------------------------ //qiu shang luo gu qwq //My luogu uid is:1302857(I am not sure), name is MAX007_CRN //My yuanshen uid is:********** yuanshen really fun! //My eggy party name is:fukongcp(fukong is Chinese, cp is English) //I also play National MC jiyanban,you can luogu talk about with me //I think I can get 0~114514 pts why cspjchusaimeiguo??????? //Grade 7 Chinese 77.5pts, Math 93pts, English 87pts haiyoujium? //wobuxinglehaoduoyingwenbuhuida //-------------------------------------------------- /*zhe yi lv shang zou zou ting ting shun zhe shao nian piao liu d hen ji mai chu che zhan d qian yi ke jing you xie you yu bu jin xiao zhe jin xiang qing qie reng wu fa bi mian er chang ye d tian yi jiu zhe mo nuan feng chui qi l cong qian cong qian chu shi zhe shi jian wan ban liu lian kan zhe tian bian si zai yan qian ye gan yuan fu tang dao huo qu zou ta yi bian ru jin zou guo zhe shi jian wan ban liu lian lian zhe tian bian si zai yan qian cu bu ji fang chuang ru ni d xiao yan wo ceng nan zi ba yu shi jie zhi da ye chen mi yu qi zhong meng hua bu de zhen jia bu zuo zheng zha bu ju xiao hua wo ceng jiang qing chun fan yong cheng ta ......End(No time) */ int main() { freopen("replace.in", "r", stdin); freopen("replace.out", "w", stdout); //feropen("road.out", "w",stdin); //feropen("repalce.out",stdout); return 114514; } //why CCF is mingan word? //*uc* you neiger CCF ``` ### BJ-S01835 内存炸弹。 ``` T2: int u[1000001]; int v[1000001]; int w[1000001]; int a[1000001][1000001]; //int b[1000001]; int main(){ freopen("road.in","r",stdin); freopen("road.out","w",stdout); ``` ### BJ-S01846 神秘字母表。神秘 `cin>>endl`。 ``` T1: #include <bits/stdc++.h> using namespace() int main() { freopen("club.in","r",std) freopen("club.out","w",std) int n,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,ab,cd,ef,gh,ij,kl,mn; cin>>a>>endl; cin>>n>>endl; cin>>b>>c>>d>>endl; cin>>e>>f>>g>>endl; cin>>h>>i>>j>>endl; cin>>k>>l>>m>>endl; cin>>n>>endl; cin>>o>>p>>q>>endl; cin>>r>>s>>t>>endl; cin>>u>>v>>w>>endl; cin>>x>>y>>z>>endl; cin>>ab>>endl; cin>>cd>>ef>>gh>>endl; cin>>ij>>kl>>mn>>endl; if(a=3) { cout<<18<<endl; cout<<4<<endl; cout<<13<<endl; } if(a!=3) { int n,a,b,c; cin>>n; list A={1,2,3} ``` ``` T2: using namespace() int main() freopen("road.in","r",std) freopen("road.out","w",std) { int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,ab; cin>>a>>b>>c>>endl; cin>>d>>e>>f>>endl; cin>>g>>h>>i>>endl; cin>>j>>k>>l>>endl; cin>>m>>n>>o>>endl; cin>>p>>q>>r>>s>>t>>endl; cin>>u>>v>>w>>x>>y>>endl; ``` ``` T3: using namespace() int main() freopen("replace.in","r",std) freopen("replace.out","w",std) { int a,b; char c,d,e,f,g,h,i,j,k,l,m,n; cin>>a>>b>>endl; cin>>c>>d>>endl; cin>>e>>f>>endl; cin>>g>>h>>endl; cin>>i>>j>>endl; cin>>k>>l>>endl; cin>>m>>n>>endl; ``` ``` T4: using namespace() int main() freopen("replace.in","r",std) freopen("replace.out","w",std) { int a,b,c,d,e,f,g,h,i,j,k,l,m; cin>>a>>b>>endl; if(a=3) { cin>>c>>endl; cin>>d>>e>>f>>endl; cout<<2<<endl; } if(a=10) { cin>>c>>endl; cin>>d>>e>>f>>g>>h>>i>>j>>k>>l>>m>>endl; cout<<2204128; } ``` ### BJ-S01849 游记。 ``` T4: /* 游记 写完题没事干了,不敢对拍,这个机子感觉一拍就死了 刚入场看到虚拟机+2cpu+3.8G 内存就笑嘻了,感觉 vsc 和 firefox 同时开就炸了,所以一直在轮流切换 开始之后把四个题都读一遍 T1 好像是直接用 pq 记录一下 T2 只保留原图 mst 上的边之后直接 2^k*k*n 就行 T3 好像是哈希一下然后两个 trie 上都要是祖先关系于是转二维偏序 T4 看起来是可以做的 T1 对的原因其实主要是 n 是偶数,于是如果有一个超的就直接把它里面能变化的全都调开,剩下的位置一定都合法 T2 就是因为如果在原图里就不会加入这条边说明肯定没用,这样只有 O(n) 条边,于是直接枚举使用的乡镇集合 T3 直接把所有不同位置的 min 和 max 整个区间求出来,于是把串划分为 A,B1,B2,C 几部分,那么两对串有贡献当且仅当 B1=B1,B2=B2,A 和 C 分别是后缀和前缀,于是对中间哈希之后往两边各开一个 Trie,确定出祖先关系之后跑二维偏 序就是对的 T4 最开始把题读成前面有 ci 个被拒绝的人他就放弃了,然后心想这不是随便容斥都是平方的吗,写完发现样例 2 死活过不去,才发现读错题了 于是重新思考了一下对的题意,发现题目可以转化为确定 c 之后 i 从 1 扫到 n,中间维护一个变量 cur,如果 si=0 或者 ci<=cur 那么 cur+1,问有多少种方式使得 cur<=n-m 显然这个东西只能按照顺序从前往后 dp,每次填写 <=cur 或 >cur 的数,但是 cur 变化的时候 >cur 的数不好处理,于是使用 CF1842G 的套路(服了马大预言家),在 cur 变化的时候再考虑前面放了几个 cur 那所以直接记 f[i][j][k] 表示前 i 项,目前 cur=j,ci>cur 的用了 k 个的排列数量,转移的时候分讨 si,在 cur 增加的时候枚举前面使用多少个 cur+1,注意 si=0 且放一个 cur+1 的时候系数不太一样 看起来是四次方的,但是你仔细想一下发现 x 的枚举范围是 cnt[j+1],那所以所有 j 加起来 x 的枚举范围其实是 O(n) 的,于是就 O(n^3) 做完了 还有 1h 结束,what should i do */ ``` ### BJ-S01850 ``` T1: //社团招新 /* linux操作可能有问题 解压文件可能有问题 学生应该熟悉一下相关操作 * 解题思路: 贪心 ?DP? 每个社团都不能 超过n/2 如果不限制每个社团人数 那么 每个人选最满意的社团就好 此时满意度的和最大 限制了的话 让一部分人换 次满意的 社团 * 哪部分人换? 满意度排名后 超过n/2的人 不一定 三个队列 放每个人的 <满意度,位置> 即可 3 4 4 2 1 3 2 4 5 3 4 3 5 1 4 0 1 0 0 1 0 0 2 0 0 2 0 2 10 9 8 4 0 0 */ ``` ### BJ-S01852 有没有看懂的人评论区解释一下。 ``` T1: freopen("club.in""r"stdin) freopen("club.out""w"stdout) cin>>n; if(n%2==0){ for(int i=1;i<=n;i++){ for(j=1;j<=3;j++){ if(n/2<=n/j){ ans=n*i } else false; } } } else false; ``` ``` T2: #include<bits/stdc++.h> using namesapce std; int n,m,k,ans; int main(){ freopen("road.in""r"stdcin) freopen("road.out""w"stdcout) cin>>n>>m>>k; for(int i=1;i<=m;i++){ } cout>>ans; return 0; } ``` ``` T3: #include<bits/stdc++.h> using namespace std; int n,m; string s; int main(){ freopen("replace.in""r"stdcin) freopen("replace.out""w"stdcout) int sc,c; return 0; }a[n]; void dfs(int n,d) ``` ``` T4: #include<bits/stdc++.h> using namespace std; int p[100005]; string sf; int n,m,ans; int z=n; int sf=n; int main(){ freopen("employ.in""r"stdcin) freopen("employ.out""w"stdcout) cin>>n>>m>>sf>>z; for(int i=1;i<=n;i++){ } cout<<ans; return 0; } ``` ### BJ-S01862 惊现双拼注释。求大佬解码。 ``` T3: int m = t1.size(), l = 1, r = m, u1 = 0, u2 = 0; // cs qm wh hb / cs hb wh qm di yi ge bu pi pz wz vi ``` ### BJ-S01869 字母表仙人。 ``` T1: long long a,b,c=0,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=0,u,v,w,x,y,z; ``` ### BJ-S01876 变量大仙。 ``` T4: if(m==100&&n==47&&s==1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111){ cout<<"161088479"; } if(m==500&&n==1&&s==11011011010101111100111111111011100011011100111111111011110111100111111011111101001111010001110111011111110101010110100101011100101110101110111011101110110011110011111011010110100010011000111010011110101000101101101111111111101010101110111101101101111110111101110010000011111101111010010110011101011010110000010001111110101110101011011111101001111111101011010101110001111111101111101110111011101101100010100100001011111110110111001010010001011111000110001110100010111100110101001011011110010110111111 ){ cout<<"515058943"; } if(m==500&&n==12&&s==00011000000000000101010000000001000000000000010000010000000000000100100000000100000000000010000000100000000000000000000000000000001000000000000000100000000000000000000000000000000010000000000000000000000000000000000000000100000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ){ ``` ### BJ-S01885 逆行人生。 ``` T1,T2,T4: #include<bits\stdc++.h> ``` ### BJ-S01901 我不要上文化课! ``` T4: /* 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! 我不要上文化课! */ ``` ### BJ-S01908 神秘数组,神秘 `cin`,神秘`freopen`。 ``` T1: freopen("club.in",r,stdin); freopen("club.out",w,stdout); ``` ``` T2: freopen("road.in",r,stdin); freopen("road.out",w,stdout); ``` ``` T3: freopen("replace.in",r,stdin); freopen("replace.out",w,stdout); ``` ``` T4: freopen("employ.in",r,stdin); freopen("employ.out",w,stdout); ``` ``` T2: int u[m],v[m],w[m],a[k]; for(int i=0;i<m;i++) cin>>u[i]>>v[i]>>w[i]; for(int i=0;i<k;i++) cin>>a[k]; ``` ### BJ-S01919 氧化钙仙人,裸奔的数据。 ``` T1: int CAO; ``` ``` T2: if(a=={4 4 2/n,1 4 6/n,2 3 7/n,4 2 5/n,4 3 4/n,1 1 8 2 4/n}) { cout<<"13"; } ``` ``` T3: if(a=={4 2/n,xabcx xadex/n,ab cd/n,bc de/n,aa bb/n,xabcx xadex/n,aaaa bbbb/n}) { cout<<"2"<</n<<"0"; } else if(a=={3 4/n,a b/n,b c/n,c d/n,aa bb/n,aa b/n,a c/n,b a/n}) { cout<<"0"<</n<<"0"<<"0"<<"0"; } ``` ``` T4: int a; cin>>a; if(a=={3 2/n,101/n,1 1 2}) { cout<<"2" } else if(a=={10 5/n,1101111011/n,6 0 4 2 1 2 5 4 3 3}) { cout<<"2204128"; } ``` ### BJ-S01923 看懂的人自动解说费城枪击案。 ``` T2: #include<bits/stdc++.h> using namespace std; //A:cout<<0; int u[1000005],v[1000005],w[1000005],c[15],a[15][10005],boo=0,boo1=0,n,m,k; int u1[6]={-1,1,2,4,4},v1[6]={-1,4,3,2,3},w1[6]={6,7,5,4}; int c1[3]={1,100}; int a1[3][5]={{-1,1,8,2,4},{-1,1,3,2,4}}; int main(){ freopen("road.in","r",stdin); freopen("road.out","w",stdout); cin>>n>>m>>k; if(n!=4||m!=4||k!=2){ boo1=1; } for(int i=1;i<=m;i++){ cin>>u[i]>>v[i]>>w[i]; if(u[i]!=u1[i]||v[i]!=v1[i]||w[i]!=w1[i]){ boo1=1; } } for(int j=1;j<=k;j++){ cin>>c[j]; if(c[j]>0){ boo=1; } if(c[j]!=c1[j]){ boo1=1; } for(int i=1;i<=n;i++){ cin>>a[j][i]; if(a[j][i]>0){ boo=1; } if(a[j][i]!=a1[j][i]){ boo1=1; } } } if(boo==0){ cout<<0; return 0; } if(boo1==0){ cout<<13; return 0; } cout<<rand(); return 0; } ```