CSP-S SH 代码迷惑行为大赏

· · 休闲·娱乐

第一次发洛谷专栏(

纯手工制作,可能有大量遗漏,欢迎补充

如何解决NOI linux下中文被替换为�的问题......

更新中

一些统计

共有46个文件中包含//freopen

共有73个文件中包含rand

共有36个文件中包含ccf

共有10个文件中包含luogu

共有5个文件中包含kkksc

共有15个文件中包含afo,祝好

共有13个文件中包含6767

共有27个文件中包含114514

共有12个文件中包含"w",stdin

共有25个文件中包含"r",stdout(为什么多了这么多)

共有9个文件中包含.in "

共有8个文件中包含mian,但应该没有人因此爆零

共有9个文件中包含未注释的freopen("crystal+数字")

共有9个文件中包含未注释的freopen("subway+数字")

共有13个文件中包含未注释的freopen("migrate+数字")

共有6个文件中包含未注释的freopen("hub+数字")

共有0个文件中包含fuck,相比去年的两个获得了巨大的进步!

共有0个文件中包含原神/genshin,这不可能

共有两人在选手文件夹中表白

文件夹/文件名相关

cystal

SH-S00734

migerate

SH-S01169

freopen("migrate.in", "r", stdin);
freopen("migerate.out", "w", stdout);

migration

SH-S00167

migrat3e

SH-S00391

freopen("migrate1.in","r",stdin);
freopen("migrat3e.out","w",stdout);

双cpp

SH-S01461

freopen相关

(诈骗) :::info[SH-S00523 subway]

//freopen("
//freeopen("
//froepen("
//freopen("subaway.in",
//freopen("crystel.in",
//来自中原的一群伙伴,结庐东南山~~~

::: fropen :::info[SH-S01253 subway]

#include<bitsstdc++.h>
using namespace std;
int main(){
    fropen("subway.in","r",stdin);
    fropen("subway.out","w",stdout);

    fclose(stdin);
    fclose(stdout);
}

::: :::info[SH-S01500 hub]

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

int main() {
    freopen("hub.in","r",stdin);
    fropen("hub.out","w",stdout);
    return 0;
}

::: :::info[SH-S01500 subway]

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

int main() {
    freopen("subway.in","r",stdin);
    fropen("subway.out","w",stdout);
    return 0;
}

::: feropen :::info[SH-S00255 hub]

#include<bits/stdc++.h>
using namespace std;
const int maxn=1e5+33;
int c,t,n,k;
vector<int> e[maxn];
int main(){
    freopen("hub.in","r",stdin);
    feropen("hub.out","w",stdout);
    cin>>c>>t;
    while (t--){
        int ans=0;
        cin>>n>>k;
        for (int i=1;i<n;i++){
            int u,v;
            cin>>u>>v;
            e[u].push_back(v);
            e[v].push_back(u);
        }
        if (n<=5){
            if (k==1) cout<<2<<endl;
            else cout<<1<<endl;
        } else if (n<=10){
            cout<<2<<endl;
        }else if (n<=20){
            cout<<3<<endl;
        }else if (n<=25){
            cout<<4<<endl;
        }else if (n<=30){
            cout<<5<<endl;
        }else if (n<=40){
            cout<<6<<endl;
        }else if (n<=50){
            cout<<7<<endl;
        }else if (n<=70){
            cout<<8<<endl;
        }else if (n<=85){
            cout<<9<<endl;
        }else{
            cout<<10<<endl;
        }
    }
    return 0;
} 

::: freopne :::info[SH-S00439 crystal]

#include<bits/stdc++.h>
using namespace std;
long long a[500005];
int main(){
    freopen("crystal.in","r",stdin);
    freopne("crystal.out","w",stdout);
    long long n,m;
    cin>>n>>m;
    for(long long j=0;j<n;j++){
        cin>>a[j];
    }
    sort(a,a+n-1);
    long long i=0;
    while(m>=0){
        if(a[i]+1<a[i+1]){
            a[i]++;
            m-=i;
        }else{
            m-=i;
            i++;
        }
    }
    cout<<i+1<<endl;
    return 0;//PLEASE AC;
}

:::

代码中

define long long long :::info[SH-S00004 migrate] 这可以用吗

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

::: 双倍freopen :::info[SH-S00450 migrate]

#include<iostream>
using namespace std;
int main()
{
    freopen("migrate.in","r",stdin);
    freopen("migrate2.in","r",stdin);
    int c,t,n;
    cin>>c>>t;
    for(int i=1;i<=t;i++)
    {
        int n,d;
        cin>>n>>d;
        int x;
        cin>>x;
        if(x==2&x==5)
        {
            n+=1;
        }
    }
    cout<<n;
    freopen("migrate.out","w",stdout);
    freopen("migrate2.out","w",stdout);
    return 0;
}

::: a24 :::info[SH-S01506 subway] 检索subway4时发现的

ta在hub和migrate中也写出了这样的代码

#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("subway4.in","r",stdin);
    freopen("subway4.out","w",stdout);
    int a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24;
    cin>>a1>>a2>>a3>>a4>>a5>>a6>>a7>>a8>>a9>>a10>>a11>>a12>>a13>>a14>>a15>>a16>>a17>>a18>>a19>>a20>>a21>>a22>>a23>>a24;
    cout<<a7+a15+a22<<endl<<a3+a17+a24;

    return 0; 
}

::: 全是图论 :::info[SH-S01416] 看得出来很绝望了

但是freoepn("",w,stdout);

#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("subway.in","r",stdin);
    freoepn("subway.out",w,stdout);
    for(int i=1;i<=67676767676767;i++)
    {
        cout<<"ccfshiren"<<endl;
    }
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("migrate.in","r",stdin);
    freoepn("migrate.out",w,stdout);
    for(int i=1;i<=67676767676767;i++)
    {
        cout<<"youshitu?"<<endl;
    }
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("hub.in","r",stdin);
    freoepn("hub.out",w,stdout);
    for(int i=1;i<=67676767676767;i++)
    {
        cout<<"haishitu"<<endl;
    }
}

::: recall :::info[SH-S01135 hub]

bool live[N], recall[N];

::: miku :::info[SH-S00706 crystal]

vector<long long> miku(n);

::: i love ccf :::info[SH-S01455 hub] 献祭T4换取前三题rp++

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

int main(){
    freopen("hub.in","r",stdin);
    freopen("hub.out","w",stdout);
    cout<<"love_ccf,rp++!"<<endl;
}

::: thank to ccf :::info[SH-S00356 hub] 依旧献祭

#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("hub.in","r",stdin);
    freopen("hub.out","w",stdout); 
    cout<<"Thank to CCF, they give me a good day.\n";
}

::: I hate CSPS :::info[SH-S00555 migrate] 学到了

#include<bits/stdc++.h>
#define I using
#define hate namespace
#define CSPS std
I hate CSPS;

::: the end :::info[SH-S00777 hub]

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    freopen("hub.in","r",stdin);
    freopen("hub.out","w",stdout);
    printf("That's the end of the test.");
    return 0;
}

:::

注释中

SH-S00015

:::info[subway]

// New Idea: Build a graph between lines and lines, and then you can get the result
// Time Complexity:O(d^2*Q+n^2logn+n^2logk)
// How smart I am!

::: :::info[hub]

// I guess the correct solution is the binary search

:::

SH-S00019

默写歌词 :::info[crystal]

/*
我们孤身闯入这世界里
找寻名为宝藏的通关奖励
跃过深渊里迷人的金币
最后发现 珍贵是我和你
*/

:::

SH-S00021

祈求者 :::info[subway]

//CCF给分给分CCF给分给分CCF给分给分CCF给分给分CCF给分给分
//CCF分来分来分来CCF分来分来分来CCF分来分来分来CCF分来分来分来
//CCF 你RP+=INF!*LLONG_MAX!^BB(1e(1e9)^1e9+1e9+7)^(1e(1e9)+7)!^2;
//你这么多RP分我点分啊 

:::

SH-S00047

:::info[subway]

//什么叫还没切T1就把T2切了?
//大洋里都过了
//CCF 让我过T2吧
//过T2我就是7 dog了
//球球了
//不要炸 
//15:27一发过样例
//O(d\sum k+n^3+qd^2)
//1e7+2e7+4e7 = 7e7 
/*
能跑过吗?
大洋里好像很水
subway7只跑了0.45s 
希望CCF是少爷机 
自己写的生成器老是RE 
*/

::: :::info[migrate]

/*
I saw the wild  flowers dying
as they froze  in the winter
lost my clothes  in the water
feel the sand  between my toes
all these days  we keep trying
put our hands  on the lion
never thought  we stop flying
just to walk this on our own
oh we are growing old now
will it ever be the same
since we slow down
we slow down
we slow down
we slow down
slow down
we slow down
down down down
we slow down
*/
:::
:::info[hub]

/yyx/ /* CCF don't let me 挂分 pls

CCF give me 7 dog pls, I will do everything CCF give me 7 dog pls, I will do everything CCF give me 7 dog pls, I will do everything

目前247 */

:::
## SH-S00095
:::info[migrate]

//freopen //I want mihuozhinan //I code for ~2.5h for this 4KB trash. //But it's wrong in the first place //I am trash //I am really L //T2 is easy //so 1= > 200? //I finally solve T1&2 unless exploded

:::
## SH-S00117
:::info[subway]

/ 整个活吧:hope the greatest CCF give me 44 points in this question /

:::
## SH-S00274
Father!!
:::info[hub]

// Father!!! Please give me some points!!! // Father!!! // Father!!! // Father!!! ......(很多个)

:::
## SH-S00281
现场教学

~~但我不会splay~~
:::info[subway]

//I'm the SH-J00254 //Was the Cash Collection Foundation want to create an director app? //I'm a qu that I can't AK CSP-J2026 //there is a splay // a // / \ // p y // / \ //s l

//and rotate(y) // y // / // a // / // p // / \ //s l

//and rotate(l) // y // / // a // / // l // / // p // / //s

//then we do splay(s,0)

//first rotate(p) // y // / // a // / // p // / \ //s l

//rotate(s) // y // / // a // / //s // \ // p // \ // l

//rotate(a) // a // / \ //s y // \ // p // \ // l

//rotate(s) //s // \ // a // / \ //p y // \ // l

//finally I want to ask you //can you write a splay?

//it's 18:03 //teacher told us that the subway sample2 emplaints wrong.

:::
## SH-S00306
:::info[crystal]

/* 这里是曹阳二中考场,图书馆 巨大的图书馆,舒服的椅子,巨大的桌子 高高的天花板,小二层和小地下层 一定要考1=

密码:Oct31==Dec25?

14:35 感觉90pts思路,开t1 14:49 写出O(n)做法 14:54 过crystal样例1 14:55 过样例2 14:56 炸样例3 15:07 调啊调 15:26 还没有调出3 15:40 创造偏移量,全部搞成正整数,3就完事了 15:41 炸样例4 16:05 还没有调出来 16:10 决定用dij试一试t3 16:24 完成t3 bfs40分部分分代码 16:31 绝望了,migrate调不出来 16:43 太绝望了,感觉要AFO了 17:03 啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊 17:11 成功写出T3 O(tn2),预估40 17:16 吃三明治 17:41 写完hub的状压dp解法,炸了,133行 18:00 (CSP-S 2026 rift结算时刻)The match is over. Good-bye. China_TSJ77 is the loser of the match. 18:01 不对,还有半小时! 18:20 写完T3中的散文,再见

70+0+40+15=125

我常常追忆过去。 生命瞬间定格在脑海。我将身后的时间裁剪,折叠,蜷曲,揉捻成天上朵朵白云。 云朵之间亦有区别。积云厚重而卷云飘渺。生命中震撼的瞬间掠过思绪便一生也无法忘怀,而更为普通寻常的记忆在时间的冲刷下只留下一些残骸。 追忆宛如如梦。太过清楚而无法愉悦自己的幻想,太过模糊又坠入虚无。只有那薄雾见的山水,面纱下的女子,才能满足我对美的苛求。 追忆总是在不经意间将我裹进泛黄的纸页里。推导又重建的街道,分别又重聚的朋友,种种线索帮我从时间的河逆流而上。 我只不过是一个过客,但是,我仍然希望在每一次追忆旅途中留下啊美好的记忆,这便让我心满意足。 只是记忆时常疏于保管,回忆也在改变着各自的形态,这给我的追忆旅途带来许些挑战。 我该在哪里停留?我问我自己。 、 ——省选联考2025 追忆

luogu: @chillchill */

:::
:::info[migrate]
祝好

/* 陌生人,或者说,是迷惑大赏的编辑者,请在这里停留一会,谢谢。 我只是想要说一些真心话。 我今年12岁,初一了。我打OI 4年了(狭义的OI,就是不包括语法阶段:3年) 曾经的经历,回不来了 曾经的懊悔,道歉不了了 还是希望把我摆在迷惑大赏上,记得给我私信一下。 窗外是夜空,面对白色的亮眼的屏幕,耳边其他考生的键盘声不绝。 无数个夜晚的记忆飞过。 过去,无法重拾。 不知道未来怎么办。 估计S只有卡线2=

哎。 繁重的whk,不支持学OI的一大堆任课老师。 我们坚持的时候在干生命? 坚持的住吗? 可以坚持吗?(《坚持三问》)

在cyez上课的时候, 看后排Alex_mumu在打phigros 还有几位在打MC

Worth? Worth.

OI让我学会了许多。 感受了许多。 这几句话在许多CSP-S的注释中都有。 我本来以为是一乐。 如今,真的感受到了这样的情况。

“我该在哪里停留?我问我自己。” ——《追忆》 对的,感觉就是这样。

惆怅,忧愁,担心,接踵而来。 t1会爆炸,t2写不出,t3部分分,t4一坨十。 我刚满12岁,这是我第一次打复赛。 向几名在OI中结识的好友敬礼。 向wwq老师敬礼。 向其他几名老师也敬礼。 感觉这是我距离AFO最近的时刻。

手指落在键盘上。 无比惆怅。

此生无悔打OI,来世还做OIer。

2026.10.31 18:07 */

:::
## SH-S00371
无法看懂
:::info[hub]

//都怪CCF!!!!! //CCCFFFCCCCCC Δ
//CCCCCCFFFCCC + ===========
//FFFCCCCCCFFF + 信竞生放出大量热以及耀眼白光(生气了)
//CCCFFFCCCCCC +++++++++ 化学实验室 肚子的大人突然连打69个喷嚏且并没有确诊感冒 //CCCCCCFFFCCC + =========== CSPS考场内因O2使用过度导致学生们开始无氧呼吸, //FFFCCCCCCFFF + 点燃170度+MnO2+为同学们注入的爱心H2SO4 因助燃物不够导致机房电脑无法燃烧以至于作者无法通过人工降温实现快速解题 //《数竞同学只身一人闯入CSP考场发现自己的红牛没带后兴奋过度开始补whk》

:::
## SH-S00387
背诵歌词
:::info[hub]

/*

赞美愚者!!

SH-S00618

依旧歌词 :::info[hub]

//  I Love You so~
//  I gonna pack my things and leave you behind,
//  The feelings are old and I know that I've made up my mind.
//  I hope you feel what I felt when you shatered my soul.
//  Cause you were cule and I'm fool,so please let me go~

:::

SH-S00647

:::info[hub]

//ForEverLOVE
/*
I give credit to the last 2 hours when I get do my best in problem 3 and problem 4
I hope I can go to WC
My score is about 100+100+56+30 = 286
Wish that no accidents occurs

Words are difficult to express emotions
For Ever LOVE
TO
ANGELA JIANG~ 
*/

:::

SH-S00660

尝试阅读

没看懂 :::info[migrate]

// Wow.
// This code is impressing.
// No one can understand what the code did and neither can I after a few days.
#include <bits/stdc++.h>
using namespace std;
#define int long long
int c, t, n, d, x[2000005], nxt[2000005], bifur[2000005], nxtt[2000005], nnx[2000005], nxc[2000005], nxttc[2000005];
signed main() {
    freopen("migrate.in", "r", stdin);
    freopen("migrate.out", "w", stdout);
    ios :: sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cin >> c >> t;
    while(t--) {
        cin >> n >> d;
        for(int i = 1; i <= n; ++i) {
            cin >> x[i];
            nxt[i] = i;
            nxc[i] = 0;
        }
        for(int i = 1; i <= n; ++i) {
            nxt[i] = max(nxt[i], nxt[i - 1]);
            while(nxt[i] < n && x[nxt[i] + 1] - x[i] <= d) {
                ++nxt[i];
            }
        }
        int ans = 0;
        for(int i = n; i >= 1; --i) {
            ++nxc[nxt[i]];
            if(nxt[i - 1] != nxt[i] && nxt[i] > i && i < n) {
                bifur[i] = nxt[i] - nxt[i - 1] + bifur[nxt[i]];
            }
            else {
                bifur[i] = 0;
            }
        }
        for(int i = n; i >= 1; --i) {
            if(nxt[i - 1] == nxt[i] - 1) {
                nxtt[i] = nxtt[nxt[i]];
            }
            else {
                nxtt[i] = i;
            }
        }
        for(int p = 1; p <= n; ++p) {
            if(nxt[p] <= p || p == n) {
                nnx[p] = -1;
                continue;
            }
            int np = nxt[p], npred = nxt[p - 1];
            if(npred == p) {
                nnx[p] = np;
                continue;
            }
            if(npred == np - 1 && nxt[nxtt[p] - 1] == nxt[nxtt[p]]) {
                nnx[p] = -1;
                continue;
            }
            if(npred == np) {
                nnx[p] = -1;
                continue;
            }
            nnx[p] = nxt[nxtt[p]];
        }
        for(int i = 1; i <= n; ++i) {
            nxttc[i] = 0;
            bifur[i] = 0;
            if(nxt[i] > i && i < n) {
                if(nxt[i - 1] != i) {
                    bifur[i] += nxt[i - 1] - nxt[i - 2];
                }
                if(nxt[i - 1] == nxt[i] && nxt[i - 2] != nxt[i]) {
                    bifur[i] += bifur[nxt[i]];
                }
            }
        }
        for(int i = 1; i <= n; ++i) {
            nxttc[i] += nxc[i];
            if(nxtt[i] != -1) {
                nxttc[nnx[i]] += nxttc[i];
            }
        }
        for(int i = 1; i <= n; ++i) {
            ans += nxttc[i] * bifur[i];
        }
        cout << ans << '\n';
    }
    return 0;
}

:::

SH-S00734

:::info[subway]

/*
看这里!
SH-J01467小朋友 你的文件夹命名出错了 不应在准考证号和姓名全拼中添加空格
ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf ccf 
AFO AFO AFO AFO AFO AFO AFO AFO AFO AFO
*/

可是你的crystal也命名错了

默哀
## SH-S00771
:::info[crystal]
```
/*
Name: 音乐水晶 Voice Crystal
Copyright: Bulu(Geopelia is the best in the Pixel Tower!!)
Author: Bulu ★Xterfusion★
Date: 2098.10.31
Description: X X XXX O O OOO XX X XXX OO O OOO X X X XXXX O O O OOOO XX XXXX XXX OO OOOO OOO
*/
```
:::
:::info[subway]
```
/*
Name: 地铁站 Subway Station
Copyright: Bulu(Geopelia is the best in the Pixel Tower!!)
Author: Bulu feat.7999
Date: 2098.10.31
Description: What do you want more than a Happy ending?
*/
```
:::
## SH-S00837
:::info[crystal]
这是谁
```
// I love little lovely miyachn, OvO
```
:::
## SH-S00867
忘记floyd
:::info[subway]
不过你的dij大概是成功通过了,恭喜
```
//将路程从站-...-站-...-站 转化为 站-线路-...-线路-站

//我忘记了floyd,我是糖笔吧 //要滚回入门组了

//CCF orz orz orz orz //评测机评测机你跑快点吧

:::
## SH-S00888
~~终于看到原了~~
:::info[subway]

/* I Want to use PQ in this hp 0 3 7 20 2 8 3 6 1 7 2 9 3 1 4 2 5 5 100 3 2 6 3 1 7 2 4 3 2 5 100 4 6 6 7 1 6 2 3 I Tried My best here Exp 100 + Eps + 0 + 0 I am SX I can't do T2 OR T3's T4's Partical as I have NO More Time Good Luck Everyone

Furina YYDS Naxida YYDS

*/

:::
## SH-S00905
成功入选
:::info[hub]
// 我要上迷惑行为大赏!!!!! 
// 嗯...传播一下班级文化吧...
// 悲松谷坝舟顿疑 
// 己核繁盐明给及
// G-u-a-j-i-r-o
// TQY is the greatest oier in the whole universe! 
:::
## SH-S00952
共提交了87个cpp文件(?

//我是洛谷封禁用户,诚恳请求洛谷管理员解除对我洛谷账户的封禁。


![2026-11-10 11-03-24屏幕截图.png](https://cdn.luogu.com.cn/upload/image_hosting/6n73v2u0.webp)

## SH-S00987
ccf,你出的题可谓是一年比一年有意思啊 
:::info[subway]

//ccf,你出的题可谓是一年比一年有意思啊

:::
## SH-S01000
这 是 什么梗
:::info[crystal]

//X X XXX

:::
## SH-S01067
:::info[crystal / subway]

/**

/**

祝好 :::info[subway]

/*
tag:114514 kkksc03 ccf feropen retrun luogu chenzhe
little composition
first time i write such a thing
inferring from my name
iv already learnt olympics in informatics
for 7 years
during the 7 long years
in terms of the commen sense i have wasted my life
no noip 1=
in the first 5years iv hardly learnt anything
when i was in the computer classroom
i played nothing but video games
so it is
but theres a saying in my mermory
it was a cold rainy night
i surfed through the profile of the ones i subscribed to
and read an enlarged quote
'many year afterwards
you sit and ponder over your oi life
unsuccessful u actually have been
when somebody ask whats the meaning of all these days and nights
do not regret it
as
'rao yuan de lu, zong you feng jing''
so what i wanna do now
is not regrets, crying
but to make it meaningful
thanks for everyone i know
thanks for all my friends
thanks for my oi teachers:teacher wang,teacher yuan and teacher ma
thanks for my parents
2026csps:100+100+?+?(cheng/huang lv/lan zi/hei hei)
(ps: iv never even touched c++ since noip2025 but how i can ac t2 now?
REDICULOS)
--harvey2019 luoguid:283541
an ordinary sh senior three student
if anyone wanto make friends with me
welcome to dm me for qq
>_<
*/

:::

SH-S01152

祝好 :::info[migrate]

    //I finished the code.
    //but...
    //WHY ALWAYS COUT 0!?
    //WHYYYYY!!!
    //AHHHHHHHHH!!!
    //NOOOOOOOOOOOO!!!
    //...
    //...
    //...
    //...
    //...
    //15 minutes left,still cannot pass...
    //maybe it's my last csp-s...
    //Man,what can I say?
    //...
    //...
    //...
    //ah... 10 minutes left...
    //what can I do now?
    //...
    //...
    //...
    //...
    //...
    //I give up.
    //5 minutes...
    //4 minutes...
    //3 minutes...
    //2 minutes...
    //1 minute...
    //The end.
    //R.I.P. SH-S01152

:::

SH-S01165

背这么多? :::info[subway / migrate]

(含有大量暴戾语言)
//来自中原一群伙伴,结庐东南山。尘缘难尽默对寒窗,龙珠合十在胸膛。秉承千年卓绝意志,潜修东南山。宁静致远风雨声响,不觉如缕持香案。香火在雨中烧,几十个暑和寒。血脉相连一方苦行山。龙珠九转十二金光。反指五岳和三江。香火在雨中烧,几十个暑和寒。血脉相连一方苦行山。龙珠九转十二金光。反指五岳和三江。
//來自中原一群夥伴,結庐東南山。塵緣難盡默對寒窗,龍珠合十在胸膛。秉承千年卓絕意志,潛修東南山。寧靜致遠風雨聲響,不覺如縷持香案。香火在雨中燒,幾十個暑和寒。血脈相連一方苦行山。龍珠九轉十二金光。反指五嶽和三江。香火在雨中燒,幾十個暑和寒。血脈相連一方苦行山。龍珠九轉十二金光,反指五嶽和三江。
//埃,埃拉爹,搜了嫂比,你爸也被锁。李娜你那比例狗撒,我爸那锅来锁。梵蒂冈,八舅打我,刘备加速。八级刀我八级刀。
//汉皇重色思倾国 ,御宇多年求不得。杨家有女初长成,养在深闺人未识。天生丽质难自弃,一朝选在君王侧。回眸一笑百媚生,六宫粉黛无颜色。天寒赐浴华清池,温泉水滑洗凝脂。侍儿扶起娇无力,始是新承恩泽时。云鬓花颜金步摇,芙蓉帐暖度春宵。春宵苦短日搞起,从此君王不早朝。承欢侍候宴无闲暇,春从春游夜专夜。后宫佳丽三千人,三千宠爱在一身。金屋妆成娇侍夜,玉楼宴罢醉和春。姊妹弟兄皆列土。可怜光彩生门户。遂令天下父母心,不重生男众生女。骊宫高处入青云,仙乐风飘处处闻。缓歌慢舞凝丝竹,尽日君王看不足。渔阳鼙鼓动地来,惊破霓裳羽衣曲。九重城阙烟尘生,千乘万骑西南行。翠华摇摇行复止,西出都门百余里。六军不发无奈何,婉转娥眉马前死。花钿委地无人收,翠翘金雀玉搔头。君王掩面救不得,回看血泪相和流。黄埃散漫风萧索,云栈萦纾登剑阁。峨眉山下少人行,旌旗无光日色薄。蜀江水碧蜀山青,圣主朝朝暮暮清。行宫见月伤心色,夜雨闻铃肠断声。天旋地转回龙裕,到此踌躇不能去。马嵬坡下泥土中,不见玉颜空死处。君臣向顾尽沾衣,东望都们信马归。归来池苑皆依旧,太液芙蓉未央柳。芙蓉如面流如眉,对此如何不泪垂。西宫南苑多秋草,落叶满阶红不扫。梨园弟子白发新,胶房阿监青娥老。西殿萤飞思悄然,孤灯挑尽未成眠。迟迟钟鼓初长夜,耿耿星河欲曙天。鸳鸯瓦冷霜华重,翡翠衾寒谁与共。悠悠生死别经年,魂魄不曾来入梦。临邛道士鸿都客,能以精诚致魂魄。为报君王辗转思,遂教方式殷勤觅。排空驭气奔如电,升天入地求之遍。上穷碧落下黄泉,两处茫茫皆不见。忽闻海上有仙山,山在虚无缥缈间。楼阁玲珑五云起,其中绰约多仙子。中有一人字太真,雪肤花貌参差是。遇到金厢扣玉冏,转叫小玉报双成。闻到汉家天子使,九华帐里梦魂惊,揽衣推枕起徘徊,珠箔银屏屹立开。云鬓半偏新睡觉,衣冠不整下堂来。风吹仙袂飘遥举,犹似霓裳羽衣舞。玉容寂寞泪阑干,梨花一枝春带雨。神情凝涕谢君王,一别音容两渺茫。昭阳殿里恩爱绝,蓬莱宫中日月长。回头下望人寰处,不见长安见晨雾。唯将旧物表深情,钿合金钗寄将去。钗留一缕合一钿,钗擘黄金合分钿。但令心似金钿坚,天上人间会相见。临别殷勤重寄辞,辞中有誓两心知。七月七日长生殿,夜班无人私语时。在天愿做比翼鸟,在地愿为连理枝。天长地久有时尽,此恨绵绵无绝期。 

:::

SH-S01167

:::info[subway]

/*
O(qd^2) is ok

very easy,get every two subway route's dis O(n^3)
and than choose the x,y 's first subway route O(md^2)

and I can solve this problem.
let's go to T3 first

how to get two subway route's dis???
Oh,I can calc it on every point,this is O(nd^2)
*/

::: :::info[migrate]

/*
let's see how the legal route might be?
let every step go to the longest legal place.

a -> b -> c -> d -> e

only when there only exist on place like a -> b-1 -> c is legal too.

let's see x0 -> x1 -> x2 -> x3 -> ...
let the first place d that allow x_{d-2} -> x_{d-1}-1 -> x_d call it f1_x0
the second place called f2_x0
in [x0,f1_x0),the a -> b-1 -> c must appear in the last segment.

[i,f1_i) : 1
[f1_i,f2_i) : 0

ok I get the prob!!
let's go to hub.

I AC it,now is 16:45 can I ak?
let's goooooo
*/

::: :::info[hub]

/*
first divided and turn this prob into check if x is ok

let's think if we know a cb's lca,and we can take away the subtree.
let's think if we take away a subtree from the T and we only allow one cb,how can we solve the problem?

OK,O(n^2 log n)'s solution is native.
*/

:::

SH-S01214

许愿池 :::info[crystal / subway]

// 写下这行注释保我不被卡时限也不挂分awa 

:::

SH-S01258

international olympics imagination :::info[crystal]

// i am so perfect. i imagine a perfect problem and work out a perfect solution within one hour
// my imagination skill is as good as gpt 6 Astra
// i am so good at the olympics imagination
// i should ak the international olympics imagination
//
// i am so proud :)

:::

SH-S01365

:::info[subway]

/*
这个题意真的很长……

发现在地铁内部是可以零步行任意移动的,主要是换乘的步行

那是不是可以对每个地铁建点跑Floyd?

怎么处理每个站可以换乘的情况?

k最多是5e5的话,就假设每个站出现了m个换乘地铁

那么应该就是k/p*(p^2)=kp

那问题不大了,本来算了发现是个2e8的东西十分恐惧来着

那直接挂在每个站上暴力遍历所有组合就可以了

Visual Studio Code is really slow......Dev C++ is much quicker......
*/

::: :::info[migrate]

/*
恰好有两条是什么意思?

手模了一下,发现两条路线最多只能有一个岛屿不一样。

否则就可以在不同的线路之间跳跃了。

把存在x a y与x b y的数字对看作原始二元对
发现两个路线可以通过原始二元对扩充出来

筛选原始二元对:
需要x->a->y可达x->b->y可达,a<b,x->y不可达,b-a=1
x->b+1不可达,a-1->y不可达

延长条件:
对于p<x,p->x有唯一的最短路线,最后一步的岛屿不能直接进入x+1

可以在左边dp一次数一下p,右边dp一次数一下

对于一个a,b,只有最边缘的两个可能延长,其他的不可能延长。

等差数列:没有可以延长的

随心飞:有三个随心飞岛屿就没招了
有两个随心飞岛屿……
有一个随心飞岛屿……

哎呀,开始打暴力吧

三次方应该还是可以的,钦定起点计算终点最短路方案数量


枚举上一步这一维应该可以省掉,可以做一个cnt前缀和状物
*/

::: 想要在CSP-S SH迷惑行为上青史留名 :::info[hub]

/*
Wow user 1365 get 0 points in hub!Share it!

——————————————————————

T4大失败了。想要整活。

想要在CSP-S SH迷惑行为上青史留名,怎么办呢?

到底该写什么呢?让我想一下?

到底是什么呢?

……

(一阵激烈的歌唱声音响起,一只芙兰fumo出现在了你的眼前……)

*/

:::

SH-S01380

祝好 :::info[subway]

/*
think of me
think of me fondly
when you say goodbye
passing all the subtests in 40min
recalling the days when practing dij for no obvious reasons, but for the admiration of this algorizm's elegance
from zj to efz
the sense of pride and achievement fade slowly
but the passion
has been with me tiil TODAY.love OI
AFO
*/

:::

SH-S01395

let's go! :::info[crystal]

/*
a[i] can only +x it can't -
so just add one by one,easy.
nonono,it's wrong.
we need to do 1~n and n~1.
thanks to big sample 
nonono,it's also wrong.
we start from i.
let me think,now we choose [l,r] crystals.
our goal is a[r].
so,ans=sum(a[r]-a[i]).
maintain prefix sum.done.
yesyesyes,then we can binary the answer.
let's go!
*/

::: :::info[subway]

/*
a graph problem.
first.from x to y,the w[] is useless
we add w[x]+w[y] to ans then w[] useless.
we have a graph,and vertex has a weight.
nonono. we shall no do this.
every metro is a vertex.
and every station is a vertex.
every metro connets a t[i][j]-weighed edge to a station
we want to know the shortest route from station to station
we see only 500 metros, but 5e5 stations.
wait. every station only 20 metros.
so we have 1e8 edges from metros to stations to metros.
we cant see these edges fully.
how can we get these edges?
but wait,only 2.5e5 edges is useful.
let's turn all station edges to metro edges.
but how???? we have 1e8 edges.this is BAD.
1e7 edges,we can only see these,we cant see 1e8.
this time,we need some DS?no we cant get even LOG.
maybe we can div&conq.nonono.we cant.
cant turn,but we can get a min cost for i to get to station.
hmmm...
oh wait,the machine can run 1e8!i remember.so this is okay
so if we can see the all 1e7 edges,and see d[i][j].
then floyd, easy.
but floyd is 1.25e8.
so we shall Dijkstra n points,it's n^2 log n
then it's okay.
so we can know shortest route from metro A to metro B.
then,for every Q(x,y),we calc every metro that can reach x,and reach y
ans=w[x]+w[y]+dis[metrox][metroy]+t[x-metrox][y-metroy]
time complexity is O(md^2+qd^2+n^2log n+n^3)
no.... Dij not faster than Floyd!!!
maybe we write a B? 
let's go! 
*/

::: :::info[migrate]

/*
how to get [l,r]'s min?
let f[i]= r=i,how much ans
then how much l?
we only need to count the islands with 1 or 2 routes.
yep,we count the 1 or 2 route islands.
how to DP? we need to find minimum route first.
what time will it have 3+ routes?
if i have 3+ routes,then i++ have more than 3+ routes.
is it true?maybe it is!!!
this is a very good thing.
so we can binary search the point that >=3.
we find 1,r,the r is a segment.
then about l++.when l +1,what will r do?
idk,but lets meiju l and binary the r.
...cant do it.
n=5000 can do.
when is 1?when is 2?
no...only n=5000 40pts
I hate it!!!!!!!!
..wait,it's dandiao.
it cant ka me
this is fast.
if u random u will DIE!
*/

::: :::info[hub]

/*
why today's T3 sooo hard,maybe NOI-
why??? and T4's brute so hard to write and only 5pts
i cant find any good thing to pianfen.
i shall output what? sqrt(n)-1 may be can get many fen.
man.... i can only get 1=.... not even 300pts on CSP-S(if im unlucky)...
ready to say goodbye to my OI life after this year's NOIP...

good bye,OI —SH-S01395
6 Years of OI becomes nothing but air
not using long long makes you see your ancestors
NOIP 1= is my last dream
but how can it come true with a <=300 score on CSP-S?
i pray for myself
i pray for everyone like me
please dont let my last dream become a joke
dont let my last fight become a weak voice in the air
thank everybody who supported me in OI
but it seems like i let all of you down....
that's all. bye-bye,OI.
wish C*i*a C*m*u*e* F*d*r*t*o* will be better every day. 
wish *h*n* *o*p*t*r *e*e*a*i*n will b
*/

:::

SH-S01456

无疑是愤怒的 :::info[crystal]

//我知道逻辑有问题但是不会改了C艹
//cout << "战雷有个俄联邦\n";
//cout << "BVVD爱加强\n";
//cout << "苏-30 SM制霸天空\n";
//cout << "BMPT爱杀回马枪\n";
//cout << "米-28 Z吊射火箭\n";
//cout << "BMPT创烂地面\n";
//CCF你敢让我一个打J组的以0.5分只差无缘J组复赛再以1.5分险胜S组复赛哦不不不不不我无疑是愤怒的我整个S组初赛只会一个卡特列数你也能让我蒙过了哦不不不不不你的胆子真是肥嘟嘟的 

:::

SH-S01480

:::info[crystal / subway / migrate / hub]

/*
I LOVE CCF
give me 100pts plz
STO CCF OTZ
*/

:::

SH-S01490

:::info[hub]

    // Migrate to where
    // to further and the dessert.
    // Recalls in a blur
    // to him,to her,to you,to ME
    //              ————write at 2026/10/31 

:::