NOIP2023 CQ 迷惑代码合集

· · 休闲·娱乐

本来马上就滚回去学 whk 了,被 cue 过来写这个。

我原来是 CQ 迷惑代码合集知名博主吗。

先说一手,我今年考爆了,没做 T4。

仍然使用 vscode 进行统计。

代码内容

今年 CQ 市共有 345 名 OIer 参加 NOIP。有 1240 个文件中包含 #include,这意味着有整整 140 个空文件。

谁在 dp

我们检索到了 1728 个 dp 子串,感谢 T4 做出的贡献。

其中 CQ-0286 老师贡献了 54 个 dp 子串,下面为部分代码:

if(c == 15 || c == 16){
    memset(dp1,-0x3f,sizeof dp1);
    dp1[1][0] = dp1[0][0] = 0;
    for(int i = 1; i <= m; i++){
        int gap = cha[i].x - cha[i - 1].x;
        dp1[i][0] = mx[i - 1];
        mx[i] = max(mx[i],dp1[i][0]);
        for(int j = 1; j <= k && cha[i].x - j + 1 >= 1; j++){
            if(j >= cha[i].y){
                if(gap <= j)dp1[i][j] = max(dp1[i][j],dp1[i - 1][j - gap] - 1ll * d * gap + cha[i].v);
                else dp1[i][j] = max(dp1[i][j],mx[i - 1] - 1ll * d * j + cha[i].v);
            }
            else{
                if(gap <= j)dp1[i][j] = max(dp1[i][j],dp1[i - 1][j - gap] - 1ll * d * gap); 
                else dp1[i][j] = max(dp1[i][j],mx[i - 1] - 1ll * d * j);
            }
            mx[i] = max(mx[i],dp1[i][j]);
        }
    }
}
else if(c >= 12 && c <= 14){
    memset(dp2,-0x3f,sizeof dp2);
    dp2[1][0] = dp2[0][0] = 0;
    for(int i = 1; i <= m; i++){
        int gap = cha[i].x - cha[i - 1].x;
        dp2[i][0] = mx[i - 1];
        mx[i] = max(mx[i],dp2[i][0]);
        for(int j = 1; j <= k && cha[i].x - j + 1 >= 1; j++){
            if(j >= cha[i].y){
                if(gap <= j)dp2[i][j] = max(dp2[i][j],dp2[i - 1][j - gap] - 1ll * d * gap + cha[i].v);
                else dp2[i][j] = max(dp2[i][j],mx[i - 1] - 1ll * d * j + cha[i].v);
            }
            else{
                if(gap <= j)dp2[i][j] = max(dp2[i][j],dp2[i - 1][j - gap] - 1ll * d * gap); 
                else dp2[i][j] = max(dp2[i][j],mx[i - 1] - 1ll * d * j);
            }
            mx[i] = max(mx[i],dp2[i][j]);
        }
    }
}
else{
    memset(dp,-0x3f,sizeof dp);
    dp[1][0] = dp[0][0] = 0;
    for(int i = 1; i <= m; i++){
        int gap = cha[i].x - cha[i - 1].x;
        dp[i][0] = mx[i - 1];
        mx[i] = max(mx[i],dp[i][0]);
        for(int j = 1; j <= k && cha[i].x - j + 1 >= 1; j++){
            if(j >= cha[i].y){
                if(gap <= j)dp[i][j] = max(dp[i][j],dp[i - 1][j - gap] - 1ll * d * gap + cha[i].v);
                else dp[i][j] = max(dp[i][j],mx[i - 1] - 1ll * d * j + cha[i].v);
            }
            else{
                if(gap <= j)dp[i][j] = max(dp[i][j],dp[i - 1][j - gap] - 1ll * d * gap);    
                else dp[i][j] = max(dp[i][j],mx[i - 1] - 1ll * d * j);
            }
            mx[i] = max(mx[i],dp[i][j]);
        }
    }
}

这部分分打得确实有点吓人。/jk

谁在排序

通过检索 sort 子串还可以发现 sort 几乎集中在考号较低和考号较高的两端,估计是 T4 正解的离散化和 T1 暴力所为。

谁在指针

CQ-0122 老师的线段树贡献了本次比赛最多的 -> 运算,共计 16 个:

inline void build(node * &p, int l, int r){
    p = ++ncnt; p->cnt = p->sum = 0;
    if (l == r) return;
    int mid = l + r >> 1;
    build(p->lc, l, mid), build(p->rc, mid + 1, r);
}
inline void insert(node * &x, node * y, int l, int r, int p, ll v){
    x = ++ncnt; *x = *y; ++x->cnt, x->sum += v;
    if (l == r) return;
    int mid = l + r >> 1;
    if (p <= mid) insert(x->lc, y->lc, l, mid, p, v);
    else insert(x->rc, y->rc, mid + 1, r, p, v);
}
inline ll ask(node * x, node * y, int l, int r, int p, int q){
    if (p <= l && r <= q) return x->sum - y->sum;
    int mid = l + r >> 1; ll res = 0;
    if (p <= mid) res += ask(x->lc, y->lc, l, mid, p, q);
    if (r > mid) res += ask(x->rc, y->rc, mid + 1, r, p, q);
    return res;
}

神秘变量名

CQ-0268 老师的结构体名称:

struct AKNOIP {
    int L, R, V, id;
} a[MAXN + 5], b[MAXN + 5];
bool cmp(AKNOIP a, AKNOIP b) { return a.R < b.R;}
bool cmp2(AKNOIP a, AKNOIP b) { return a.L < b.L;}

我需要一个 10^9 的 char 数组

CQ-0325 的 T1 前七行翻江倒海:

#include<bits/stdc++.h>
using namespace std;
int main(){
    //freopen("dict.in","r",stdin);
    //freopen("dict.out","w",stdout);
    int n,m,o;
    char a[100000000],s[100000000],t[1000000000];

注释

谁在留极长注释

CQ-0087 老师切了 T4 却没有做出 T2,实在是非常遗憾:

/*
没错,在12:07,我的T4过拍了

估分:100+40+35+100=275

这应该能有一等奖了吧

但这是重庆啊... 

部分分代码都留下来了,纪念我做这题的过程

一个一个部分分慢慢推到正解,激动万分 

剩下了50min,回去补一点暴力吧 
*/

他的正解代码前面有长达 4.5K 的部分分代码,确实是一位很厉害的老师。

谁在 AK NOIP

CQ-0011 老师怒骂 CCF:

/*
又是水题场,我已经无力吐槽了  

他也确实在云斗数据下 AK 了。

@_l_l_ 在上次 AK 提高组之后又 AK 了 NOIP,怎么会是呢?

/*
这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?这是 t4?
还有两个小时,冲 t3 绰绰有余

(此处省略一百多行编译指令和报错信息)

看样子 rp 被前天的 rk-4 垫上力
关注 109114 写写喵
general red /bx
Felix72 /bx
cqdzwh /bx
15 /bx
tuxuanming2024 /bx
priority /bx
(p-1)! mod p /bx
this->CE /bx
3 /bx
oxford /bx
chicken /bx
missel /bx
2e9 /bx
ytbetter /bx

太激动了第一次 ak noip



不吹不捧,ccf 的出题质量确实越来越高,但是难度是怎么一会是呢?
*/

他的 T3:

/*
这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?这是 t3?

Love CCF_NOI 的 CQ-0207 老师今天过生日还 AK NOIP!让我们祝他生日快乐:

/*
今天过生日的人 AK NOIP!!!!!!
                        @沙区一考场39号座位 
I love CCF_NOI!!!
                ——CQ-0207 

*/ 

CQ-0266 老师建反向边:

/*
    IOI AK ME!
    NOI AK ME!
    NOIP AK ME!
    CSP AK ME!
*/ 

写题解

CQ-0077 老师在发明整体 dp:

/*
dp i j 
跑到第 i 天,连续跑了 j 天的能量最大值。
dp i 0 = max dp i-1 j
dp i j = dp i-1 j-1 + calc i,j - d 
calc i j = j>=yi ? v :0 
相当于什么?
相当于全部取了 max 给 0。
然后整体向右平移。最后有的点加上贡献。
贡献应该是一个后缀加。
后缀加用线段树维护。
至于平移该怎么做?
我觉得大力分块要好做一点。
有一个 10 的多测不是很美好。
能用双端队列维护吗?
这边想用一个类似与块状链表的丑陋东西维护。 
暂时写这个收益不高,先把T2打了再说,已经 11:17了。

*/

好像做复杂了一点。

CQ-0257 老师的 T2 破大防:

11:38 又写完了
第二个大样例过了
但后面两个错得很离谱
破防了
希望其它题不要出问题 
如果我压根不会写暴力
那我现在怎么对拍呢?
哎 
写个数据生成器手玩吧

11:46 随便一组就能卡
调代码去喽 

11:50 找到了找到了!
开改

11:52 改好了
大样例还是挂了 

12:12 破防了
开摆
还有个T3
走了走了
应该会有分的吧
特殊性质应该会救我的吧 
*/ 

T2 大样例感觉确实有点东西的。

CQ-0001

膜拜 CQ 队长!!!!!下面是他的游记:

/*
旁边是八中 CF rating接近2600的大佬,感觉好慌 

大概10:50的时候就做完了,T1,T2一共30min,T3不知道做多久,T4最开始唐了,卡在一个很简单的地方,感觉做了挺久的 
然后打拍子
感觉T4大样例强度还行,T3不好造数据,所以先打的T2的拍 
然后发现T4最大的那个样例是特殊性质,于是还是打了拍 
然后换成linux编译了一下,没有CE
后来发现T3数据很小时随出来Yes的概率很大,所以还是打了T3的拍。
希望写的不是伪算,也别挂分,不然就成小丑 

感觉CCF的题越来越水了,这样下去感觉 noip 都没啥区分度,只能靠省选定胜负了(省选菜鸡瑟瑟发抖) 
希望以后CCF能把noip和csp质量出高一点,出的更有区分度一些。 

DeepSkyCore jinqihao2023 leihonglongyin Iratis Dawnq posvII Augenstern Erinyes Linkwish _l_l_ jason_sun xukai ymjer Talaodi system_tish
大佬们保佑我别挂 
*/

非洲 OI 不发达

CQ-0226 老师的 T2 注释:

/*

oiiaioooooiaioiiaioooooiaioiiaioooooiaioiiaioooooiaioiiaioooooiaioiiaioooooiaioiiaioooooiaioiiaioooooiai
(重复五次)

>非洲 OI 不发达,因为没有金坷垃 

>金坷垃,n 方能过 1e8. 

9:30

有性质

9:45 

wdf 性质是伪的 

10:15 

太酷啦

二分图 乱搞过了

CSP-S 考的个什么玩意

NOIP 都有 200了 
*/

谢谢,我也想知道这两场比赛考的什么玩意。

几把 T4 毁我两次人生。

原神,启动

CQ-0120 的猜测是正确的,因为他玩原神。

//About why English->vscode
//sto hua_lian orz
//sto konjakujelly orz
//sto Lisdery orz
//sto lmgoat orz
//sto zuishuai orz
//sto Shadow_YYH orz
//sto Mr_XBJ orz
//sto unreachable orz
//I guess at least 15 persons AK.
//After then,why don't come to Genshin Impact?

(大约是)同桌

CQ-0145 心急如焚:

/*
现在是 12:20,我旁边的老哥直接 AK 开始睡觉了,恐怖如斯
upd:破防了,难道这场比赛真的很简单?
啊?我过样例 5 了?离谱!!
*/

你是对的,这场比赛是四年来最水的 NOIP,但我是重庆排名三位数,我不配评价。

CQ-0145 旁边坐的大致是 CQ-0036?

/*
2023/11/18 12:30
Aked.(if no FST/fn)
OI无悔。
谢谢大家,谢谢。
(以下省略若干膜拜)
*/

他没有 FST,在云斗学院上取得了 400 分!让我们恭喜省选标准分的诞生!

发癫

CQ-0309 的注释我真的没看懂:

//宣布舞人罪
//罪人舞步旋
//宣布无人罪 

Wish you all luck

谢谢你,CQ-0018 老师。

//Wish all of you good luck.
//namespace burningContract

CQ-0057 老师将会得到保佑:

/*
Bless and Punishment. Fortune and Misery.
I'm played as a marionette, while they still bless me.
*/

考场估分

CQ-0022 老师一点都没错也一分都没挂:

/*
如果没挂分,上限应该是 335 了
就这样吧。。。。 
感觉 T3 敲暴力+伪算,0.5h检查更稳妥 
今年标准分多半是 400,难搞。。 
*/

CQ-0043 打炸了:

/*
T2调不对,死了。
后面的题只打了最低档暴力

AFO! 
*/

CQ-0055 有点恶毒的:

/*
估分 100+100+35+45=280。
很惊险。T1 对拍 2k 组出 hack。当时还有 15min。给吓麻了。
然后 T2 也拍出来过 hack。
所以如果我不对拍就是 80pts 了。/jk
有点怕 T1 TLE。随机数据本机是 0.6s。
我去。搞忘去 linux 测效率了。
算了不管了。
感觉这个是中规中矩的分。不知道大家得分怎样。
要是大家都不会 B 我就大 win 特 win 了。
虽然感觉不是很可能。
那我就只是大众分。/ll
要是是春测一样的话我就消愁了。
不过妹妹祝我 rp++ 了。
我肯定会好运的。
祝其他人都挂完分。
哎。
这周回去就全日制学文化课了。
感觉文化课学起来很是受不了。
*/

然而遗憾的是,他 T4 在云斗数据上挂成了 4 分,T3 挂成了 30 分。

CQ-0060 被看不懂的外号保佑了:

/*
100+100+35+44=279?

T1是水题。
T2是奇环树,不算难
T3不会
T4也不会,废了
希望刘家,马爷,狗翰,兔子,花猫,白猪,节肢动物,杆菌可以保佑不挂分
lay说我会大红大紫,希望不是这样,希望她的4道题都可以光合作用
提前膜拜咸鱼,wb 


*/

复制整个赛时 cmd

CQ-0050 老师把他赛时整个 cmd 都复制了进来,我们注意到他一开始试图在 cd 到不存在的 D 盘三次。

/*
心态炸了,300 都没有。sb T3 
Microsoft Windows [版本 10.0.19045.3448]
(c) Microsoft Corporation。保留所有权利。

C:\Users\stu>D:
系统找不到指定的驱动器。

C:\Users\stu>D:
系统找不到指定的驱动器。

C:\Users\stu>D:
系统找不到指定的驱动器。

C:\Users\stu>F:

F:\>cd CQ-0050

F:\CQ-0050>fc dict.out dict3.ans
正在比较文件 dict.out 和 DICT3.ANS
FC: 找不到差异


F:\CQ-0050>fc dict.out dict4.ans
正在比较文件 dict.out 和 DICT4.ANS
FC: 找不到差异


F:\CQ-0050>fc run.out run3.ans
正在比较文件 run.out 和 RUN3.ANS
FC: 找不到差异


(省略一车各种测大样例)

Love

CQ-0061 老师想做张峻豪先生的狗:

//Be confident!
/*
好想做张峻豪先生的狗啊
好想做张峻豪先生的狗啊
好想做张峻豪先生的狗啊
好想做张峻豪先生的狗啊
好想做张峻豪先生的狗啊
好想做张峻豪先生的狗啊
我好爱他好好好
*/

CQ-0127 老师你成功引起了我的注意:

//freopen("dict.in","r",stdin);
//freopen("dict.out","w",stdout);

//freopen("love.in","r",stdin);
//freopen("love.out","w",stdout); 

//frepen("dict.in","r",stdin);
//freopen("dict.out","w",stdout);

//frepoen("dict.in","r",stdin);
//freopen("dict.out","w",stdout);

//freopen("dict.in","r",stdin);
//freopen("dict.out","w",stdout);

//freopen("dict.in","r",stdin);
//freopen("dict.out","w",stdout);

CQ-0166 的 T3 完整代码:

#include<cstdio>//I love Zimu Zhao.
#include<iostream>//I love Zimu Zhao.
using namespace std;//I love Zimu Zhao.
namespace Zimu_Zhao{//I love Zimu Zhao.
    const int N = 5e5;//I love Zimu Zhao.
    int c, n, m, q;//I love Zimu Zhao.
    int main(){//I love Zimu Zhao.
        scanf("%d%d%d%d", &c, &n, &m, &q);//I love Zimu Zhao.
        q++;//I love Zimu Zhao.
        while(q--)//I love Zimu Zhao.
            putchar('0');//I love Zimu Zhao.
        return 0;//I love Zimu Zhao.
    }//I love Zimu Zhao.
}//I love Zimu Zhao.
int main(){//I love Zimu Zhao.
    freopen("expand.in", "r", stdin);//I love Zimu Zhao.
    freopen("expand.out", "w", stdout);//I love Zimu Zhao.
    return Zimu_Zhao::main();//I love Zimu Zhao.
}//I love Zimu Zhao.

都知道你爱 Zimu Zhao 了。(另外三题也有类似东西)

CQ-0236 稳定每题贡献 50 个 love:

/*
I love StayAlone & Shunpower
(此处省略49项重复内容)
*/

我记得 2021 年就有个 slove(),今年 CQ-0240 继续稳定发挥:

int slove()
{
    int cnt=0;
    for(int i=1;i<=n;i++)
    {
        if(state[i]==2) cnt++;
    }
    return cnt;
}

一位名叫“铁锹”的人似乎在八中很火。CQ-0267 就提到了他:

/*
于9点零五分过掉此题大样例,希望没事啊(貌似比去年T1水,就一个sort基本就没了) 
于12点39分改完了所有发现的错误点,再一次过掉了大样例,希望AC 
老猪马保佑我%%%
I love CCF,不要挂分啊
mjl保佑我
gm保佑我
0#保佑我
lf保佑我 
用铁锹小保底歪114514次换我此题AC
相信铁锹不会拒绝我的
今天丢失1原钱,RP++ 
I love CCF 
I love CCF 
I love CCF 
I love CCF 
I love CCF 
I love CCF 
I love CCF
I love CCF
想去冬令营 
想去冬令营 
想去冬令营 
想去冬令营 
想去冬令营 
想去冬令营 
想去冬令营 
想去冬令营 
想去冬令营 
想去冬令营 
想去冬令营 

*/

T4 还有铁锹画像:

/*
1 1
3 2 2 1
2 2 4
3 2 3
时间复杂度可以过64pts,但是怎么贪心啊啊啊啊 ,希望CCF数据水让我水过这些分 ,墓测是线段树+二分+贪心?不知道思考的方向对不对 ,要是有64就上200pts了 
一坨代码。。。 
I love CCF 
I love CCF 
I love CCF
I love CCF 
I love CCF 
I love CCF 
I love CCF 
I love CCF
I love CCF  
   -------------
  /             \
 /   .    .      \-------铁锹的小眼睛
/                 \
\    \/           /------铁锹的诡异微笑
 \---------------/ 
        |
        |
       /|\
        |
        |
       /\
      / \-----铁锹的大长腿 

墓前估分156(100+40+0+16),如果不挂有希望1=? 但是貌似今年的题比去年简单,所以我又只能当4=小垃圾了 呜呜呜 
*/

CQ-0307 稳定 XiaoTing,希望我们明年还能看到他。

//9:23

//AFO Thank you OI
//I Will Always Love XiaoTing

考场题解

CQ-0316 一眼丁真了 T2:

/*经观察,该提为树上问题 (多测,切记清空*/

pb_ds 库

CQ-0157 想要 include 了整个 pb_ds 库:

/*
//freopen("dict.in","r",stdin);
//freopen("dict.out","w",stdout);
freopen("dict.in","r",stdin);
freopen("dict.ans","w",stdout);
freopen("dict.in","r",stdin);
freopen("dict.out","r",stdin);
freopen("dict4.in","r",stdin);
freopen("dict.out","w",stdout);
freopen("dict.in"."r".stdin);
freopen("dict.out"."w".stdout);
freopen(dict.in,r,stdin);
freopen(dict.out,w,stdout);
freopen("dict.in",'r',stdin);
freopen("dict.out",'w',stdout);
freopen("dict.in","w",stdout);
freopen("dict.out","r",stdin);
freoepn("dict.in","r",stdin);
freoepn("dict.out","w",stdout);
freopen("dict.in","r",stdin)
freopen("dict.out","w",stdout)
//freopen("dict.in","r",stdin);
//freopen("dict.ans","w",stdout);
FILE*fin=fopen("dict.in","r");
FILE*fout=fopen("dict.out","w");
#include<ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/binary_heap_/binary_heap_.hpp>
#include<ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/binary_heap_/entry_pred.hpp>
#include<ext/pb_ds/detail/binary_heap_/const_iterator.hpp>
#include<ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp>
#include<ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp>
#include<ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp>
#include<ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp>
#include<ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp>
#include<ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp>
#include<ext/pb_ds/detail/binary_heap_/entry_cmp.hpp>
#include<ext/pb_ds/detail/binary_heap_/resize_policy.hpp>
#include<ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/container_base_dispatch.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/traits.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp>
#include<ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/point_const_iterator.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp>
#include<ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp>
#include<ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp>
#include<ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp>
#include<ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp>
#include<ext/pb_ds/detail/trie_policy/trie_string_access_traits_imp.hpp>
#include<ext/pb_ds/detail/trie_policy/trie_policy_base.hpp>
#include<ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/traits.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp>
#include<ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp>
#include<ext/pb_ds/detail/splay_tree_/node.hpp>
#include<ext/pb_ds/detail/splay_tree_/traits.hpp>
#include<ext/pb_ds/detail/splay_tree_/splay_tree_.hpp>
#include<ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp>
#include<ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp>
#include<ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp>
#include<ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp>
#include<ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp>
#include<ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/thin_heap_/thin_heap_.hpp>
#include<ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp>
#include<ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp>
#include<ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp>
#include<ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp>
#include<ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp>
#include<ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp>
#include<ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp>
#include<ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp>
#include<ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp>
#include<ext/pb_ds/detail/resize_policy/sample_size_policy.hpp>
#include<ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp>
#include<ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/rb_tree_map_/node.hpp>
#include<ext/pb_ds/detail/rb_tree_map_/traits.hpp>
#include<ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp>
#include<ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp>
#include<ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp>
#include<ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp>
#include<ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp>
#include<ext/pb_ds/detail/pat_trie_/synth_access_traits.hpp>
#include<ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/traits.hpp>
#include<ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/pat_trie_.hpp>
#include<ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp>
#include<ext/pb_ds/detail/types_traits.hpp>
#include<ext/pb_ds/detail/tree_trace_base.hpp>
#include<ext/pb_ds/detail/priority_queue_base_dispatch.hpp>
#include<ext/pb_ds/detail/unordered_iterator/const_iterator.hpp>
#include<ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp>
#include<ext/pb_ds/detail/unordered_iterator/iterator.hpp>
#include<ext/pb_ds/detail/unordered_iterator/point_iterator.hpp>
#include<ext/pb_ds/detail/branch_policy/null_node_metadata.hpp>
#include<ext/pb_ds/detail/branch_policy/branch_policy.hpp>
#include<ext/pb_ds/detail/branch_policy/traits.hpp>
#include<ext/pb_ds/detail/debug_map_base.hpp>
#include<ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/rc_binomial_heap_/rc.hpp>
#include<ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp>
#include<ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp>
#include<ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp>
#include<ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp>
#include<ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp>
#include<ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/luogu_/561785.hpp>
#include<ext/pb_ds/detail/cond_dealtor.hpp>
#include<ext/pb_ds/detail/standard_policies.hpp>
#include<ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp>
#include<ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp>
#include<ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp>
#include<ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp>
#include<ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp>
#include<ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp>
#include<ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp>
#include<ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp>
#include<ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp>
#include<ext/pb_ds/detail/hash_fn/probe_fn_base.hpp>
#include<ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp>
#include<ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp>
#include<ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp>
#include<ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp>
#include<ext/pb_ds/detail/list_update_policy/lu_counter_metadata.hpp>
#include<ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp>
#include<ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp>
#include<ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp>
#include<ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp>
#include<ext/pb_ds/detail/list_update_map_/lu_map_.hpp>
#include<ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/type_utils.hpp>
#include<ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp>
#include<ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp>
#include<ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp>
#include<ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp>
#include<ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp>
#include<ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp>
#include<ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp>
#include<ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp>
#include<ext/pb_ds/detail/eq_fn/eq_by_less.hpp>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/exception.hpp>
#include<ext/pb_ds/trie_policy.hpp>
#include<ext/pb_ds/hash_policy.hpp>
#include<ext/pb_ds/tag_and_trait.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/priority_queue.hpp>
#include<ext/pb_ds/list_update_policy.hpp>
*/

注释 freopen

CQ-0325 连中两题:

//freopen("run.in","r",stdin);
//freopen("run.out","w",stdout);
//freopen("dict.in","r",stdin);
//freopen("dict.out","w",stdout);

就先写到这吧。

懒得翻了。

有需要的可以让我加。

有需要撤下的私信我。

感觉自己快退役了。T^T