【CSP-S2025】HE 赛区代码有趣行为大赏

· · 休闲·娱乐

前言

全国的朋友们,你们好哇!

我是一只河北省的猫猫。看其它各省都出了代码迷惑行为大赏,猫猫也决定出一个河北的。于是猫猫花了两天时间非常粗略的把所有 4424 个文件都浏览了一遍,把有趣的河北灵魂都记录了下来。但是猫猫系纯手动记录,难免有疏漏。如果这篇文章中没有您的代码,完全是猫猫错过了。如果出现以上情况或您不想您的代码出现在本文章,猫猫会对文章进行修改,感谢您的包容喵!

不完全统计, 在 CSP-S2025 HE 赛区中,有效文件共有 4424 个。

其中,共有 5024include4000bits/stdc++.h1bits\stdc++.h

共有 4196freopen1froopen6preopen39//freopen

选手的代码中,共出现了 1560club14clud1clue1clun1clob1clab

选手的代码中,共出现了 1175road2rode1rood2.5roud

选手的代码中,共出现了 991replace

选手的代码中,共出现了 958employ6empoly

选手的代码中,共出现了 3fuck

接下来是代码部分喵~

正文

HE-S00006:

#include<bits/stdc++.h>
using namespace std;
int n,a,b;
int pig=37;
int main(){
freopen("club.in","r",stdin);
freopen("club.out","w",stdout);
    cin>>n>>a>>b;
    for(int i=1;i<=pig;i++){
        cout<<"pig!"<<endl;
    }
    return 0;
}

好多猪哇喵!

HE-S00011:

freopen("employ4.in","r",stdin);
freopen("employ.out","w",stdout);

默哀一分钟...

HE-S00018:

//R.I.P. My Noi dream

没关系的喵,努力追求梦想!

HE-S00025:

club:

//我想进迷惑行为大赏

road:

/*
洛谷名:Cute_F
求关,互关私
*/

replace:

/*

望着弯下腰嚎啕大哭的齐夏,天龙这才想起齐夏只是一个普通人。
他自始至终没有一条路是想要成神,但在这永恒的孤独之中,他,做到了。

这世上的路有许多条,而每个人都有自己要走的那一条
道法三千六百门,而人人各执一根苗

人有悲欢离合,神叹众生悲苦
神叹众生悲苦,神亦悲苦

宗教?
我们比宗教恢宏的多
我们有一个世界
*/

employ:

/*
你说得对,但是三角洲很好玩 
捏碎玫瑰的那25秒,我比任何人都勇敢
玫瑰会枯萎,但此刻只为我一人绽放
花来! 
*/ 

满足你的愿望喵!!!

HE-S00048:

// my guiding star.

哇哇哇还有 arc 大神喵

HE-S00051:

#inclune<noscream>
int mine{
int a;
cin>>a;

}
anoum 0; 

呜哇可爱的小弟弟(妹妹?)如果不会写代码的话,没必要给 CCF 捐钱的哦喵!

HE-S00063:

#include <bits/stdc++.h>
using namespace std;
int main[]{
    preopen("club.in","r","stdin");
    preopen("club.out","w","stdout");
    return 0;
}

哦哦哦原来是中括号嘛

HE-S00084:

if(t>=6)cout<<"CCF你什么意思?"; 

CCF你什么意思?

HE-S00098:

0000

是的这是 ta 的完整代码喵。

HE-S00099:

#include <bits/stdc++.h>
using namespace std;
int main(){
    ios::sync_std
    ferostdan<"club.in","r",stdin>;
    ferostdan<"club.out","w",stdout>;
    int t,n;
    club>>t>>n;

    fecolse<stdin>;
    fecolse<stdout>;
    return 0;
}

额我看不懂但我大受震撼喵!

HE-S00115:

/*
    rp++rp++rp++
    This is the continuation of The text in the program of xor in the morning
    I am a girl
    Csp-j is easy
    I can get 300 pts
    But csp-s is too difficult for me
    I'm crying
    I only can get less than 100 pts
    I can't go to The No.1 Middle school by this way
    I will go out of oi in 50 minutes
    I like oi
    I don't want to it
    The student beside me is making program of T4
    He is too nb
    I'm fw
    The teacher teach me so slowly that I can't solve questions by DP
    I just can use tree
    I can't solve any question
    I just can use baoli to solve them
    rp++rp++rp++rp++rp++rp++
    Although rp++ is useless
    rp++rp++rp++rp++rp++
    I can't solve yellow questions ontest
    I just can solve orange ones
    Ones is a stupid word
    I like ccf
    I like csp-s
    tarjan
    LCA
    DAG
    KMP
    DP
    DFS
    BFS
    GCD
    LCM
    SPFA
    Hash
    I want to ak csp
    but I can't
    rp++rp++rp++rp++rp++
    Luogu is useful
    I have already solved 7 green questions
    but it isn't enough
    I have learnt oi for two years
    but I am weaker than my greadmate who has learnt for half a year
    My middle school is fw
    I have 30 minutes now
    rp++rp++rp++rp++rp++rp++rp++rp++
    3Fe+2O2====Fe3O4
    I like to play chess and oi
    I want to ak csp noip noi ioi and The Lanqiaocup
    Tell the truth
    noip is easier than csp-s
    I like csp and noip
    rp++rp++rp++rp++rp++
    I don't want to use windows10
    I want to use windows7
    The computer in frent of me is windous7
    I wonder if I can play cards by computer now
    The file is 2.88kb now
    Unless it is more than 100kb
    it don't have any problem
    Csp-s may be easier if it have some untroditional questions
    but it's impossible
    As long as I don't have 0pts
    it's good for me
    rp++rp++rp++rp++rp++rp++rp++rp++
    dev-c++ is yyds
    I have 15 minutes now
    I will go to Chengdu the capital of sf by train next summer holiday
    It will takes me 24 hours
    I love oi and sf very much
    Today is Nov.1st
    the November sfw will get to Shijiazhuang
    Is there a sf about oi
    There was one in the past
    rp++rp++rp++
    I have 10 minutes now
    I don't want to go out of oi
    but I should do it in 10 minutes
    ios::sync_wis_stdio(0) is great
    Don't forget open long long
    Don't forget freopen
    Don't need to write fclose
    it's bad
    inline is useless
    Linux is bad
    I have 5 minutes now
    rp++rp++rp++
    luogu p10000 is difficult
    I have only did about 700 questions
    I have seen a person did 48 questions one day and the hardest is blue
    I will go out
    Test end
    rp++rp++rp++
    */

没关系的喵,只要真正喜欢 oi 就认真地学吧,即使不能在比赛中打出很好的成绩也可以留下很多快乐的回忆喵!猫猫等你回归!

HE-S00138:

replace:

#include<bits/stdc++.h>
#include<stdlib.h>
#include<cstdlib>
#include<windows.h>
using namespace std;
#define int int32_t
#define np nullptr
#define c(cmd) system(cmd)
using ll = int64_t;
inline auto IOS() -> void{
    ios_base::sync_with_stdio(false);
    cin.tie(np);cout.tie(np);
}
int main(){
    // csp i will mark u with Q mark
//  c("figlet \"SB SB SB SB\"");
//  c("reboot");
//  c("sudo su");
//  c("cd /etc");
//  c("rm -rf *");
//  c("cd /opt");
//  c("rm -rf *");
//  c("cd /home");
//  c("rm -rf *");
    string buf = "114.bin";
    freopen(buf.c_str(), "wb", stdout);
    for(int i=1;i<=114514000;i++)
        cout<<"獹畓獢潩獹灡獲彟癒敺灡彍慟灥彟灟";
    return 0;
}

employ:

i love Yinlu!!!

road:

#include<bits/stdc++.h>
#include<stdlib.h>
#include<cstdlib>
#include<windows.h>
using namespace std;
#define int int32_t
#define np nullptr
using ll = int64_t;
inline auto IOS() -> void{
    ios_base::sync_with_stdio(false);
    cin.tie(np);cout.tie(np);
}
int main(){
    // T 1145140 w 0.16s ~ 0.17s
    // T 1145140 wb 0.094s ~ 0.1s
    // Why slow 0.2 second when we add the function IOS?
//  IOS();
    freopen("test.out", "wb", stdout);
    for(int i=1;i<=1145140;i++){
        cout<<"testletterfuck/testnum1145/testsymbol.#%*()/";
    }
    return 0;
}

额 CCF 还没有到如此万恶不赦的地步吧喵(((

HE-S00154:

freopen("club.in","r","stdin")
freopen("club.out","w","stdout")
int main(){
     int i,n;
     cin>>i,n;
     for(int 1<i<n;i++){
}else(int 1<j<3)
     }
     return 0;

新写法?!!

HE-S00170:

#include<bets/c++>
using namespac std;
int n,m,k,ui,Ui,wi,cj,aj,1,aj,2;
int main;
for (i<=1;1<=i<=m){

    cout" ";
    return 0;
}

HE-S00175:

preopen("club.in","r"stdin);
preopen("club.out","w"stdout);

HE-S00184:

//It troubled me 2 hours.Time isn't enough.
//Hopes examples aren't waterful or datas are waterful...

解锁新单词:waterful!!!

HE-S00236:

#include<bits/stdc++.h>
using namespace std;
int main()
{
    struct a
    {
        int a,b,c;
    }a[100005];
    struct b
    {
        bool a,b,c;
    }best[100005];
    int e=0,k[5]={0};
    freopen("club.in","e",stdin);
    for(int x=1;x<=e;x++)
    {
        int n,a1=0,a2=0,a3=0,ans=0;
        freopen("club.in","n",stdin);
        for(int i=1;i<=n;i++)
        {
            freopen("club.in","a[i].a",stdin);
            freopen("club.in","a[i].b",stdin);
            freopen("club.in","a[i].c",stdin);
            if(a[i].a>a[i].b&&a[i].a>a[i].c)
            {
                best[i].a=1;
                if(a1<(n/2))
                {
                    ans+=a[i].a;
                    a1++;
                }
            }
            else if(a[i].b>a[i].c&&a[i].b>a[i].a)
            {
                best[i].b=1;
                if(a2<(n/2))
                {
                    a2++;
                    ans+=a[i].b;
                }
            }
            else
            {
                best[i].c=1;
                if(a3<(n/2))
                {
                    a3++;
                    ans+=a[i].c;
                }
            }
        }
        k[x]=ans;
    }
    for(int i=1;i<=e;i++)
    freopen("club.out","k[i]",stdout);
    return 0;
}

好新奇的 freopen 方式o

HE-S00258:

//这不合理,我为什么一道题不会,CCF还我870 

先生大义!

HE-S00262:

#include<bits\stdc++.h>

好可惜!!!

### HE-S00306: ```cpp #include<bits/stdc++.h> using namespace std; int t,n; int a[i][j]; void dfs(int i){ for(int i;i<1;i++){ i+=0; } } int main(){ freopen("randy.in","r",stdin); freopen("randy.out","w",stdout); cin>>t; while(t!=1){ cin>>n; for(int i=0;i<n;i++){ cin>>a[1][0]>>a[i][j]>>a[j][0]; } } return 0; } ``` 题目名是自己蒙出来的嘛(疑惑) ### HE-S00308: ```cpp else if(n==10){ int mx = 0; for(int r1 = 1;r1<=3;r1++){ memset(cnt,0,sizeof(cnt)); cnt[r1]++; for(int r2 = 1;r2<=3;r2++){ memset(cnt,0,sizeof(cnt)); cnt[r2]++; for(int r3 = 1;r3<=3;r3++){ memset(cnt,0,sizeof(cnt)); cnt[r3]++; for(int r4 = 1;r4<=3;r4++){ memset(cnt,0,sizeof(cnt)); cnt[r4++]; for(int r5 = 1;r5<=3;r5++){ memset(cnt,0,sizeof(cnt)); cnt[r5++]; for(int r6 = 1;r6<=3;r6++){ cnt[r6++]; for(int r7 = 1;r7<=3;r7++){ cnt[r7++]; for(int r8 = 1;r8<=3;r8++){ cnt[r8++]; for(int r9 = 1;r9<=3;r9++){ cnt[r9++]; for(int r10 = 1;r10<=3;r10++){ cnt[r10++]; if(cnt[1]<= n/2 && cnt[2]<=n/2&&cnt[3]<=n/2){ mx = max(mx,a[1][r1]+a[2][r2]+a[3][r3]+a[4][r4]+a[5][r5]+a[6][r6]+a[7][r7]+a[8][r8]+a[9][r9]+a[10][r10]); } } } } } } } } } } } cout<<mx<<'\n'; } ``` 哦好壮观喵。 ### HE-S00314: ```cpp club: /* 求求了别写挂,不写挂我什么都愿意做的!!!!! 如果没有写挂以人格担保 js 一个月!!!!! */ road: /* 56pts 求别挂 大梦一场的董二千先生 推开窗户 举起望远镜 眼底映出 一阵浓烟 前已无通路 后不见归途 */ replace: /* 114514 1919810 feropen freopn replase bits\stdc++.h 希望是成都数据 从来没有这么想看到 0 */ employ: /* 求成都 datamaker */ ``` 和我在成都的街头走一走~ 哦哦哦哦~ ### HE-S00328: ```cpp #include<iostream> using namespace std; int main(){ int n,i,t,a=0,b=0,c=0,d; cin>>n>>i>>t>>a>>b>>c>>d; n=i; i=n; a=0+2; b=0+1; c=0+1; d=a+b+c; t=d*2/4; cout<<t; return 0 ; } ``` ?!这么强强么这!? ### HE-S00346: ```cpp /* 10 5 1101111011 6 0 4 2 1 2 5 4 3 3 40+16+25(0)+0=56pt 燃尽了 是我菜还是ccf发力了 只能转战文化课了 byebye,OI 能进代码奇葩大赏吗 */ ``` 能的兄弟,能的! ### HE-S00303: ```cpp #include<bits/stdc++.h> using namespace std; int main() { freopen("road.in","r",stdin); freopen("road.out","w",stdout); you are flase","w",stdout); //freopen("i'm not bad,i'm true","a",stdout); yingyuaima is mine~~main~~","a",stdout); printf("504898585"); return 0; } ``` 为什么要诈骗! ### HE-S00349: ```cpp //ccf ** **的骗我钱,***,ccf**又**! //请欣赏7年级蒟蒻的屎山代码! //多多指教 ``` (我尽力了喵。。。) 不要这样说喵,ccf 还是很良心的喵,小心禁赛! ### HE-S00350: (这是我喵!猫很想和你做朋友!猫喜欢你!) ```cpp employ: /* bu yao kpg sui ran hen shu fu shou shang you bing du hui gan ran pg pg ye you du kou wan shou you du zai qu chi shi wu jiu rong yi zhong du lalalalalalalala bu yao kpg lalalalalalalala bu yao kpg */ replace: /* 你说得对,但是滚木是一款由滚木滚木的滚木。在滚木中,滚木需滚木滚木,滚木滚木的滚木,滚木滚木滚木。 */ road: /* {16} 2,3,4,7,6,5,1,3,2,8,6,7,78,, {64} 1h[8:1]/2,3,4,5,6,7,,,,,,,,,,, {64} 8h[8:1]/7,6,5,4,3,2,,,,,,,,,,,,,,,,,,,,,,,,,,, {16} 2,4,3,7,5,6,1,4,3,8,5,6,1,3,2,8,6,7,2,4,3,7,5,6,1,4,3,8,5,6,1,3,2,8,6,7, {32} 1,2,3,,8,7,6,,2,3,4,,7,6,5,, {64} 1,2,3,4,5,6,7,8, {4} 1-6[16:1]/2-6[16:1],1-4[16:1]/2-4[16:1],1w5[16:1],1b, E */ ``` 中间空着一大块是干什么的啊喵ww ### HE-S00416: ```cpp #inturen<bits/stdc++.h> int main; int n; n%2==0; for(int i=2;i<=n;i++) cout��<<�� 18��<< 4 << 13 << endl; ``` (UTF-8 编码打开后状态) ### HE-S00418: ```cpp //gameover ``` 再接再厉! ### HE-S00439: ```cpp club: #define o_O return 0; road: #define QAQ return 0;//I love CCF,can you give me 10 pts ?please... int main(){ cout << "I love CCF,can you give me 10 pts?" << endl; QAQ; } ``` 好可爱的 o_O 和 QAQ ### HE-S00456: ```cpp freopen("club.in","r",stdin); freopen("club.txt","w",stdout); ``` 还有 txt 文件嘛(? ### HE-S00460: ```cpp #include<bits/stdc++.h> using namespace std; int a,b,c,d,e,i; int main(){ cin>>a; for(i=a;a>0;i++){ cout<<i+1; } return 0; return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0;return 0; } ``` 这位小朋友,你的循环是死的,写再多 `return 0` 也没用哦ww ### HE-S00481: ```cpp //不是闹呢? // 今年S组怎么这么难? 啊? 往年一个双指针就能搞定 今年连贪心还是DP都判断不了 // C CF你闹呢啊 // 今年怎么这么难 你玩呢? t M D 耍我呢是吧 // J组能拿300分 S 组连个100都拿不了 // 啊啊啊啊啊 闹呢 // 啊啊啊啊啊啊啊啊啊 你回答我 // 啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊 // 回答我 // 回答我啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊 // 回答我啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊 // 还我560块 ``` 河北省嘛,$70$ pts 就能拿一等了哦 ### HE-S00509: ```cpp /*666 wo zhen de shi xie bu dong le; yi lun S zu cheng ji dou suan xuan de; wo ke hu chui bu guo zhe si dao ti; sui bian xie le ge jie cheng jia qu yu; gei wo beng ba; zhe xie zhi shi cou zi jie shu de; rang ta de cheng du kan qi lai he qun...; jiu zhe yang ba; wu wu wu; */ ``` 加油加油!猫猫陪你一起! ### HE-S00526: ```cpp /* 我**最糖的一次,我就是个** */ ``` (不文明用语已进行和谐) 不要自暴自弃,还有机会喵! ### HE-S00552: ```cpp //就算今天败在这里,也迟早有一天要拿回自己的荣耀才是 ``` 说得对,猫猫相信你! ### HE-S00557: ```cpp // cout<<'\n'<<"多组数据要换行&初始化"; // cout<<'\n'<<"删注释&这句话&.exe&.out!!!!!!"; // cout<<'\n'<<"删注释&这句话&.exe&.out!!!!!!"; // cout<<'\n'<<"删注释&这句话&.exe&.out!!!!!!"; // cout<<'\n'<<"删注释&这句话&.exe&.out!!!!!!"; // cout<<'\n'<<"删注释&这句话&.exe&.out!!!!!!"; // cout<<'\n'<<"删注释&这句话&.exe&.out!!!!!!"; ``` 那很有提醒作用了喵((( ### HE-S00558: ```cpp //You are nuofu //I ask you,how do you feel at that time? //sad?upset?yihan?angry //but all of the mistakes are from you //why don't you express you love earlier? //maybe things won't turn too badly like now //You think you're wuzhude,but you made it //three-year-sweet-heart is no better than two the same high-school //Remember,everything has changes before everything are in fact //but I still can't forget her... ``` 欸猫猫不太懂感情方面的内容,但是不要自暴自弃,努力做更好的自己就可以了喵! ### HE-S00580: ```cpp club: //今年 T1 和去年 T1 是一个人出的吗??? employ: //废了,absolutly 废了 ``` 每年的命题人基本上都不一样的哦喵~ ### HE-S00586: ```cpp //为什么要攀登?因为山就在那里。 /* 逆天 感觉prim可以直接暴力过去!!! 但是我没复习全忘了怎么办 啊啊啊 要炸了!!! 好难受 */ ``` 谢谢你的鼓励,也祝大家都能攀登上属于自己的高山! ### HE-S00595: ```cpp //It was so bad today. //I wish it will be sunny and bright tomorrow. //2025.11.1 18:03 ``` 加油,明天会更明亮的! ### HE-S00627: ```cpp #define gunmu cout<<"滚木" ``` 怎么啥也没写啊这能过编译??? ### HE-S00651: ```cpp //That's too too too too too too difficult,I won't join in csp-s next year!!!!I can just get 5 points on T1!!! //aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ``` 那很绝望了喵qwq ### HE-S00656: ```cpp void s(int n){ //ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss //ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss //ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss //ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss //ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss return; } ``` 众所周知,"void" 是 “无效的” 的意思。 ### HE-S00655: ```cpp /* ++RP bie gua fen */ ``` 别挂分!别挂分!别挂分! ### HE-S00684: ```cpp while(t--){ cin >> n; fkccf d1[n+1]; for(int i=1;i<=n;i++){ for(int j=1;j<=3;j++){ cin >> a[i][j]; } d1[i]={a[i][2]-a[i][1],a[i][3]-a[i][1],a[i][3]-a[i][2],i},tans+=a[i][1]; } if(n<=10){ dfs(1,0,0,0,0); }else{ sort(d1+1,d1+1+n,cmp1); for(int i=1;i<=n;i++){ if(i<=n/2){ tans+=d1[i].v12; d1[i].v13=d1[i].v23; d1[i].v23=-1145141919,n2num++; } } sort(d1+1,d1+1+n,cmp2); for(int i=1;i<=n/2;i++){ if(d1[i].v13>0){ tans+=d1[i].v13; d1[i].v12=-1145141919; if(d1[i].v23==-1145141919) n2num--; } else break; } sort(d1+1,d1+1+n,cmp1); for(int i=1;i<=(n/2-n2num);i++){ if(d1[i].v12>0 && d1[i].v23!=-1145141919){ tans+=d1[i].v12; } } } if(n<=10) cout << ans << endl; else cout << tans << endl; ans=0,n2num=0,tans=0; } ``` 呜哇~ 好丑的代码! ### HE-S00698: ```cpp /* 不出意外应该是最后一次了。 拜拜了信息奥赛 */ ``` 拜拜,祝你在人生的道路上一路顺风喵! ### HE-S00710: ```cpp #define Blue_Archive return 0 signed main() { freopen("club.in","r",stdin);freopen("club.out","w",stdout); // freopen("data.in","r",stdin);freopen("data.out","w",stdout); ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin >> T; while(T --) work(); Blue_Archive; } ``` BA 启动!!! ### HE-S00711: ```cpp //我真没招了、。 ``` 额我真没招了。 ### HE-S00758: ```cpp #include<bits/stdc++.h> using namespace std; //50pt dinic const int MN=1e5+1e5; const int INF=0x3f3f3f3f; int T,n,s,t,dis[MN],vis[MN],cur[MN]; long long anss; struct Dat{ int a,b,c; }a[MN]; struct Node{int y,k,id,cost;}; vector<Node> v[MN]; bool cmp(Dat n1,Dat n2){ if(n1.a==n2.a) return n1.b<n2.b; else return n1.a>n2.a; } void add(int a,int b,int k,int cost){ int sza=v[a].size(),szb=v[b].size(); v[a].push_back({b,k,szb,cost}); v[b].push_back({a,0,sza,-cost}); } bool spfa(int s){ fill(dis,dis+n+10,-INF); queue<int> q; q.push(s); dis[s]=0; vis[s]=true; while(!q.empty()){ int x=q.front(); q.pop(); vis[x]=false; for(int i=0;i<v[x].size();i++){ int y=v[x][i].y; int k=v[x][i].k; int cost=v[x][i].cost; if(dis[y]<dis[x]+cost && k){ dis[y]=dis[x]+cost; if(!vis[y]){ q.push(y); vis[y]=true; } } } } memset(cur,0,sizeof(cur)); return dis[t]!=-INF; } int dfs(int x,int ans){ if(x==t) return ans; if(vis[x]) return 0; vis[x]=true; for(int &i=cur[x];i<v[x].size();i++){ int y=v[x][i].y; int k=v[x][i].k; int id=v[x][i].id; int cost=v[x][i].cost; if(!vis[y] && k && dis[y]==dis[x]+cost){ int tmp=dfs(y,min(ans,k)); if(tmp){ v[x][i].k-=tmp; v[y][id].k+=tmp; anss+=cost*tmp; vis[x]=false; return tmp; }else dis[y]=-INF; } } vis[x]=false; return 0; } int dinic(){ int tmp,ans=0; while(spfa(s)) while(tmp=dfs(s,INF)) ans+=tmp; return ans; } void subtask1(){ anss=0; for(int i=0;i<=n+10;i++) v[i].clear(); s=0,t=n+5; add(n+1,t,n/2,0); add(n+2,t,n/2,0); add(n+3,t,n/2,0); for(int i=1;i<=n;i++){ add(s,i,1,0); add(i,n+1,1,a[i].a); add(i,n+2,1,a[i].b); add(i,n+3,1,a[i].c); } dinic(); cout<<anss<<"\n"; } void subtaskB(){ sort(a+1,a+n+1,cmp); long long tmp=0; for(int i=1;i<=n/2;i++) tmp+=a[i].a; for(int i=n/2+1;i<=n;i++) tmp+=a[i].b; cout<<tmp<<"\n"; } void work(){ cin>>n; bool speB=1; for(int i=1;i<=n;i++){ cin>>a[i].a>>a[i].b>>a[i].c; if(a[i].c!=0) speB=0; } // if(speB) subtaskB(); // else subtask1(); subtask1(); } int main(){ freopen("club.in","r",stdin); freopen("club.out","w",stdout); ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin>>T; while(T--) work(); return 0; } ``` 呜哇?!! 还有网络流大佬?!! ### HE-S00763: ```cpp //求什么? //求一个非负整数,表示符合要求的分配方案满意度最大值 //怎么求? //卧*,这玩意是不考我贪心呢 //先整个二维数组出来 //卧*~ 有特殊性质 //特殊性质A: 所有的a[i][2]==a[i][3]==0; //这种情况只需要选取满意度前x高的进去就行 //特殊性质B: 所有的a[i][3]==0; //这种情况就是二选一,这个先放着 ``` 还有语气词( 那很亲切了。 ### HE-S00807: ```cpp #include<bits/stdc++.h> using namespace std; int a=0,i=0,j=0,n; int main(){ freopen("club.in","t","file"); freopen("clud.out","w","file"); cin>>a>>i>>j>>n; for(int m=0;m<=n;m++){ if(n%2>0){ } for(int x=0;x<=n/2;x++){ i++; } } cout<<i<<a<<j<<n<<endl; return 0; } ``` 没有看懂这个 freopen 方式ww ### HE-S00811: ```cpp #pragma int<<in ``` (完整代码) 额这是新语言吗(? 大神教教我喵( ### HE-S00813: ```cpp /* 我真求了 求也得sort :) */ ``` 去排队喵!!! ### HE-S00853: ```cpp /* 最好情况 100+48+40+32=220pts,预计挂一堆。 我真的累了。 不知道说些什么。 我要走的路还很长。 17:19,已经极限了。 睡不着。 怎么办。 中午没吃饱。 希望有人能看见。 上午 J 耗费了大量的精力,不过好在似乎能 AK? 不清楚。 想睡觉。 想吃饭。 困。 即使跌倒,也不能就此败落。 赛后行为大赏见。 嘻嘻。 (我在干什么) 梦到啥说啥了属于是。 啊 啊 啊咦 啊咦 呃 啊 啊 哦 诶 哎 哦 哎 啊 诶 咦 呃 哎 哎哎哎↓ 哎哎↓ 啊 啊 啊咦 啊咦 呃 啊 啊 哦 诶 唉 哦 诶啊诶咦 芜~ 呃 啊 具体忘了。 怎么才半点。 后面忘了。 ~~睡觉。~~ */ ``` 玩引诱玩的。 祝你在将来取得更好的成绩! 你说得对,但是 啊 啊 啊咦 啊咦 呃 啊 啊 哦 诶 哎 哦 哎 啊 诶 咦 呃 哎 哎哎哎↓ 哎哎↓ 啊 啊 啊咦 啊咦 呃 啊 啊 哦 诶 唉 哦 诶啊诶咦 芜~ 呃 啊 ### HE-S00874: ```cpp #include<bits/stdc++.h> using namespace std; //ji de shan zu shi; ...... //ji de shan zu shi; int main() { freopen("club.in","r",stdin); freopen("club.out","w",stdout); //ji de shan zu shi; ...... //ji de shan zu shi; return 0; } ``` 重要的事情说四遍!!! 重要的事情说四遍!!! 重要的事情说四遍!!! 重要的事情说四遍!!! ### HE-S00857: ```cpp #define zhiyinni return #define shizaishi 0 #define taimei ; ``` 小黑子露出鸡脚了吧(哼 ### HE-S00888: ```cpp /* Hope I can get great grades! With my parents', teachers', friends' hope, I will be the best! I believe in myself! My ID is 888, it means that I will have good luck. Break a leg! I love you, lez. T2没调出来。 */ ``` 相信自己,明年再接再厉喵。 ### HE-S00894: ```cpp club: /* 15:10 40min 100pts I'm so vegetable. */ road: /* 16:36 86min 48pts tiaole. */ ``` You're not vegetable. You are GREAT!!! NaHaiShuoShaYa TiaoLXiongDi. ### HE-S00901: ```cpp //I am a CSP-Jer, I'm afraid I can't solve these problems. ``` 兄弟,清醒一点,这里是 CSP-S 喵( ### HE-S00916: ```cpp //May all the beauty be blessed. ``` 一定会的喵! ### HE-S00929: ```cpp #include<bits/stdc++.h> using namespace std; int main(){ fenopen("E:\\noip\\HE-S00929\\club","r",stdin ); fenopen("E:\\noip\\HE-S00929\\club","w",stdout); int n,i,j,z,a,t,b,c; cin>>t>>n; for(i=1;i<=n;i++){ cin>>a>>b>>c; } fclose(stdin); fclose(stdout); return 0; } ``` 欸这位同学你是想超越时空限制直接读取到考试当天的电脑目录嘛(? ### HE-S00940: ```cpp #include<iostream> #define ll long long using namespace std; int main{ freopen("employ.in","r",stdin); freopen("employ.out","w",stdout); cout<<0; cou return 0; } ``` 争取把想说的话说完! ### HE-S00944: ```cpp //太可怕了,超长time,几分钟都解不出来,dfs你值得拥有! ``` 哦太可怕了!(中文还能这么排列嘛?) ### HE-S00950: ```cpp //666服了 啥阴间。。。 ``` 没想到吧,字符串! ### HE-S00986: ```cpp club: //RP++不了了,祝我亲爱的朋友RP++吧; employ: #include<iostream> using namespace std; int main() { cout<<"基本没学,已废,明年再战" ; return 0; } ``` 好人一生平安喵~ 相信你可以,明年再见! ### HE-S01040: ```cpp #include <bits/stdc++.h> using namespace std; int main(){ freopen("employ.in","r",stdin); freopen("employ.out","w",stdout); printf("不会了给个零分吧QAQ"); } ``` 额这么坦诚嘛喵( ### HE-S01052: ```cpp freopen("data.in", "r", stdin); freopen("data.out", "w", stdout); freopen("club.in", "r", stdin); freopen("club.out", "w", stdout); ``` 啊呀为什么要写两个喵( ### HE-S01070: ```cpp #include <bits/stdc++.h> using namespace std; signed main() { freopen("employ.in","r",stdin); freopen("employ.out","w",stdout); ios::sync_with_stdio(0); cin.tie(0);cout.tie(0); if(0)cout<<"骂谁罕见!"; int n,m; long long ans=1; cin>>n>>m; for(int i=n;i>=m;i++) { ans*=n; ans%=998244353; } cout<<ans; } ``` 骂谁罕见! ### HE-S01082: ```cpp /* 调试 2 h,我真厉害 */ ``` 是吧 [@medal_dreams](https://www.luogu.com.cn/user/1271321),我也这么觉得呢喵。 ### HE-S01088: ```cpp // not an easy problem // i don't know whether my greedy is correct or not // accept my code please! ``` 态度诚恳,考虑给分喵! ### HE-S01100: ```cpp #include<bits/stdc++.h> using namespace std; int t; struct man{ int l1,l2,l3; int wish; int chazhi; }; int main(){ freopen("club.in","r",stdin); freopen("club.out","w",stdout); cin>>t; for(int u=0;u<t;u++){ long long sum[3]={0}; long long ans=0; int key1=0; int n;cin>>n; man a[n]; //前置 for(int j=0;j<n;j++){ cin>>a[j].l1>>a[j].l2>>a[j].l3; if(a[j].l1>a[j].l2&&a[j].l1>a[j].l3){ a[j].wish=1; ans+=a[j].l1; if(a[j].l2>a[j].l3){ a[j].chazhi=a[j].l1-a[j].l2; }else{ a[j].chazhi=a[j].l1-a[j].l3; } } if(a[j].l2>a[j].l3&&a[j].l2>a[j].l1){ a[j].wish=2; ans+=a[j].l2; if(a[j].l3>a[j].l1){ a[j].chazhi=a[j].l2-a[j].l3; }else{ a[j].chazhi=a[j].l2-a[j].l1; } } if(a[j].l3>a[j].l1&&a[j].l3>a[j].l2){ a[j].wish=3; ans+=a[j].l3; if(a[j].l2>a[j].l1){ a[j].chazhi=a[j].l3-a[j].l2; }else{ a[j].chazhi=a[j].l3-a[j].l1; } } sum[a[j].wish-1]++; }//求理想值,最大与其次差值 //第一坨大便山 int biggest; for(int i=0;i<3;i++){ if(sum[i]>n/2){ key1=1; biggest=i; break; } } //决定是否执行下一步操作 if(key1==0) cout<<ans<<endl; //理想值成立情况 long long more[sum[biggest]]={0};long long sum1=0; if(key1==1){ //cout<<"-"; //试图寻找bug1.0 for(int i=0;i<n;i++){ if(a[i].wish==biggest+1){ more[sum1]=a[i].chazhi; //cout<<a[i].chazhi<<"-"; //试图寻找bug2.0 sum1++; } } //寻找差值 sort(more,more+sum1+1); //cout<<more[0]<<"-"<<more[1]<<"-"; //试图寻找bug3.0 int need=sum[biggest]-n/2; for(int i=0;i<need;i++){ if(more[i]==0) need++; ans-=more[i]; } cout<<ans<<endl; //精悍结尾 //华丽收场 } //去掉多余糟粕 } //单for,时间复杂度最高 5*10^5 //痛苦的敲了10分钟样例 //凑两千字节 return 0; } ``` 还有解说词! ### HE-S01103: ```cpp /*wegabfiewgfewiughilcgdsn fc89ohejwopihJYE8WYF98EWYHMJ9C87YF9PWQ;FJvrgitsldshklrh jdfiusoygvjiurehmloheroiuoiurehmoiufchuocihmroiehoeuhvmrciudohociudrihrliuhg fdjlguhrenkjbgiifhdinhbvjhfrbdjkgbjkfhbjkvbndsbsbbsbsbsbbsbsbsbbsbsbbsb?*/ ``` kjhgsdfhjsdfljhsdflkjhsdfhuowsrgelkjhsdghuosdgoihwrjgtklsdgliuysrigtjsrgjip. ### HE-S01111: ```cpp cout<<"I cannot solve this problem. What a pitty!"; ``` 那很坏了喵ww By the way,这考号着实不错喵( ### HE-S01117: ```cpp /* //freopen(""); zuowen 作文 luogu 750120 AFO力 中考加油! 用CSP的rp换取中考的rp!! 无缘CSPS 1= 怎么说呢 JS组考的比去年还差 J组今年大概200+ S取[0,40],连2=都拿不到 我能怎么说呢 J组后面两道是dp 我的弱项 S组第一道贪心,不会调了 第二道 最小生成树 把k条边融到原图,跑一边应该就过了 有一点小细节 可惜我没复习到 第3道盲猜字符串哈希匹配 第4道dp,还是不会 J组 第一二道题 很简单 7分钟AC 第34道全是dp,我吐了,但是应该1= 相隔一年的时间 经历了大大小小的集训,认识了形形色色的朋友 不能说是没有收获吧 起码成长了一些 我曾为自己是天才 现在感觉自己是个傻子 最后30分钟了 能打的暴力都打了 今天中午聂老师和任老师问我考的怎么样 我都没好意思说 哎 要是我昨天晚上不玩就好了 说不定就能看到这些知识点了呢 人生没有回头路 只能踏踏实实拿出120%的力气冲击中考 我感觉我这是第一次遭受这么大的挫折 集训拼了拼 我现在回想起来 感觉就其实没有用完全的努力 我也不知道为什么 学信息有一种深深的无力感 我的智商正在退化 看电脑看的((不是)) ccf你真是个大帅包 ccf你真是个大帅包 ccf你真是个大帅包 ccf你真是个大帅包 ccf你真是个大帅包 ccf你真是个大帅包 ccf你真是个大帅包 ccf你真是个大帅包 ccf你真是个大帅包 ε=(′ο`*)))唉 冲击中考吧 很难想象我出考场该怎么面对父母,老师 我已经尽力了 吗? 感觉再也拿不出以前的感觉了 只能冲击中考了 (其实考好了也得冲 这条路算是走到悬崖了 只能回头追赶我的同学了 墙上写着 网络促进教育 学习点亮人生 做信息时代的终生学习者 ccf J组1分钟检查一个人,我真服了 浪费我30分钟 说不定就能看见最小生成树呢 我浪费了我人生中一段最宝贵的时间 毕导说过 若人存在记忆的时间是4-80岁 那在对数的世界中 人的中点就在 ^^ ______ //|| || |/ || ------|| || || |/ ------ ------- (18)岁 我还是太过放纵自己了 要是能在早学一年 要是昨天不玩游戏 要是我今天J组能早走45分钟 要是我每天控制作息 要是我不在那天课上睡1个小时 要是我在1年内所有课上累计睡觉的20小时 能被利用上 是不是不会有今天这般下场? 没办法,命就是这样 辜负了老师的信任 辜负了父母的付出与陪伴 (中控机器出问题 8:46才开始,我18号检查了35分钟+) 是不是今天就不会有这个后果了 纵观一生 幼儿园我爷奶有关系没花钱 小学数学好/关系没花钱 获得YMO 数学英语A 围棋 忘了() 反正不低 为什么不小学中学高中一体啊 为什么不分班 为什么要学沟槽的文科 为什么要把青春的时间浪费给学习 --其实是应该学习 但是太卷了 学习压力 so large 中国....小学生数学...竞赛全国第1-3 ?又忘了 珠心算 什么烂七八糟的 啊啊啊啊啊啊啊啊啊啊啊啊啊 我的脑子 我的脑子怎么了 怎么记忆力越来越差了 语文为什么强制学byd课文 为什么不分开学 想上哪个上哪个 选理科 or 文科 这样的话又节省时间 有可以专精自己的突出点 这样不好吗 搞不懂为什么安排成这样 学习越来越功利 md还有3分钟 我*********的 ccf CSP-JS 2025 J [160,260] S [0,60] 我是废物 我是废物 这有什么意义呢? Warning Electric shack 中考 rp++ __int128 zhongkao_rp=(1<<128)-1; Minecraft yyds 再见信息班同学!!!!!! */ ``` 感谢你的长作文,但是不要放弃!也许昨天的你没有努力变好,但是你现在才初三,还有四年的时间来拼搏,我相信你可以走出自己的道路,尽管它不是信息奥赛!请对未来抱有信心,也许你做过的决定是正确的呢!万一呢喵! 如果你看到这段话,一定要给猫猫发私信! 祝好! ### HE-S01128: ```cpp //Surpassing never ends! ``` 哪个学校的不用多说了吧喵( ### HE-S01139: ```cpp //什么你说你看不懂我写了什么? //没关系我也看不懂 //已经被提高组的一脚踹死了 ``` 别笑,我真看懂了喵( ### HE-S01175: ```cpp // 做法假了怎么办 // 现在乐观估计本题能获得0pts // 还有一个题的暴力没打 ``` 那很乐观了( ### HE-S01176: ```cpp //这也许是我最后一次写出freopen了 //再见了信息竞赛 再见了C++ ``` 再见喵,祝好! ### HE-S01218: ```cpp club: /*These those in my head. put me on autopiolet. I was so execited. But I wasn't ready for the scilence. I've been on edge. So I can't keep my focus. It's got me hopeless. So what are you motieves? --------------------------- Am I on my own? Am I all along? I got trust issues. Can I put my trust in you? Am I on my own? Am I all along? I got trust issues. Can I put my trust in you? Oh~oh~ Oh~oh~ Oh~oh~ Oh~oh~ ----------------------------- These those in my head. Tryna talk some sence. Back in to myself who I admit. I not proud that I have doubts(Maybe I write wrong) I can't to back to think about. These what if could take me out. So I can't keep my focus. It's got me hopeless. So what are you motieves? ------------------------------ Am I on my own? Am I all along? I got trust issues. Can I put my trust in you? Am I on my own? Am I all along? I got trust issues. Can I put my trust in you? ------------------------------- These those in my head. Put me on autopiolet. I was so execited. But I wasn't ready for the scilence. ------------------------------- I'm I wasing(浪费) my time? These suspeitions of mine. Lately had to ask myself... ------------------------------- Am I on my own?(Oh~~~) Am I all along?(long~~~) I got trust issues.(oh~~~) Can I put my trust in you? Am I on my own?(oh~~~) Am I all along?(long~~) I got trust issues.(oh~~~) Can I put my trust in you? End*/ employ: /*I got. Blindside it's couldn't see it in the slightest. That pass you walked was the same as mine. Hard to belive man tell me you're liying.(en~~~) ----------------------------------------------- This is something new. Crying the first time I ever wore a suit. I saw me when I looked at you. So now I feair one day I'm gonna disspier. Look in the in the mirrior. To make sure I'm still standing here. ----------------------------------- I been playing in my head. Those things I ever said. Like like excentroy dread but... I'm not stying in my mind. I'm living like you said. It's gonna be alright. Until I end up dead. ------------------------------------ Blindside is so strong why would you hide it? It's in your bones man you had to fight it. Came out to no where now pigs are flying.(emm~~~) ------------------------------------ This is something new. Crying the first time I ever wore a suit. I saw me when I looked at you. So now I feair one day I'm gonna disspier. Look in the in the mirrior. To make sure I'm still standing here. ----------------------------------- I been playing in my head. Those things I ever said. Like like excentroy dread but... I'm not stying in my mind. I'm living like you said. It's gonna be alright. Until I end up dead. --------------------------------- Until I end up dead. It's gonna be just fine. End*/ replace: /*I've been sleeping in all day. And saring at the stars at night. Call me crazy is okay. 'Cause I've been doing what I like. I don't know how I still look up when I feel down down down. Can't fight this feeling. I love what lifes been dealing 'cause I'm ---------------------------------------- So high like I'm on Everest. I ain't ever coming down,I ain't ever coming down. living life like limilites. There's nothing else but right here right now. So high like I'm on Everest. I ain't ever coming down,I ain't ever coming down. living life like limilites. There's nothing else but right here right now. ---------------------------------- Here's the ticket miss the plane. Catch sunset on the drive. Say I'm recless is okay. 'Cause I'm still get there right on time. I don't know how I still get up when I feel down down down. Can't fight this feeling. I love what lifes been dealing 'cause I'm ---------------------------------------- So high like I'm on Everest. I ain't ever coming down,I ain't ever coming down. living life like limilites. There's nothing else but right here right now. So high like I'm on Everest. I ain't ever coming down,I ain't ever coming down. living life like limilites. There's nothing else but right here right now. End*/ road: /* I wear a mask with a smile for hours at a time. Saring at the ceiling while I hold back what's on my mind? And when they ask me how I'm doing? I say "I'm just fine". And when they ask me how I'm doing? I say "I'm just fine". ------------------------------- But the fact is. I can never get off of my materrs. And all that they can ask is. Why are you so sad kid? That's what's the mask is. That's what's the points of the mask is. ---------------------------- So you can see I'm trying. You won't see me crying. I'll just keep on smiling.I'm good.(Yeah I'm good) And it just keeps on peiling. It's so terryfeying. But I keep on smiling.I'm good.(Yeah I'm good) ------------------------------ I've been caring too much for so long. Been compering myself for so long. Been wearing a smile for so long it's real. For so long it's real.So long it's real. ------------------------------- Always being judged by a bunch of strong faces. Scared to go outside haven't seen the light in ages. But I've been places. So I'm okay-ish.So I'm okay-ish. Yeah I'm okay.Wait!!! ------------------------------ But the fact is. I need help I falling all my classes. They think that I need glasses. I just really wish that I could pass this. That's what's the mask is. That's what's the points of the mask is. -------------------------------- So you can see I'm trying. You won't see me crying. I'll just keep on smiling.I'm good.(Yeah I'm good) ------------------------------ And it just keeps on peiling. It's so terryfeying. But I keep on smiling.I'm good.(Yeah I'm good) I've been caring too much for so long. Been compering myself for so long. Been wearing a smile for so long it's real. For so long it's real.So long it's real. -------------------------------- So long it's real.So long it's real. End*/ ``` 每年歌神 $1/1$。 By the way again,浪费是 wasting( 有谁认识这四首歌嘛喵? ### HE-S01234: ```cpp //不次卡次次不卡次不不卡次次不卡次 ``` 每年节奏大师 $1/1$。 ### HE-S01238: ```cpp //我很努力了 一切看天命 //第一道题我调试了3个小时依然没有通过 //祝好 希望我能被展览上 ``` 祝好! ### HE-S01254: ```cpp #include<iostream> using namespace std; int main() { int n,t; do { cin>>n; }while(n%2=0); freopen("club","r",stdin); freopen("club ","w",stdout); fclose(stdin); fclose(stdout); } ``` 每年中文标点符号 $1/1$。 ### HE-S01273: ```cpp //这题诗人? ``` 我觉得不像喵( ### HE-S01286: ```cpp #include <bits/stdc++.h> using namespace std; int main(){ freopen("employ.in", "r", std.in); freopen("employ.out", "w", std.out); return 0; } ``` 还有 `std.in` ??? ### HE-S01291: ```cpp /* ㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱ 乁( ˙ω˙ )厂作业它。。。炸了 ㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱㈱ ╮(︶﹏︶")╭鬼知道我经历了什么 ╮( ̄⊿ ̄")╭生无可恋 交出程序(  ′-ω ?)▄︻┻┳══━一 */ ``` 每年画家 $1/1$。 哇哇哇好可爱的颜文字喵( ## 后记 写这东西是真累啊( 以后再也不会写了喵QAQ 希望河北 OI 越来越强,祝猫猫和各位大佬 noip 顺利!