01 2025 档案
m/k场比赛
摘要:[#include<bits/stdc++.h> define lc p<<1 define rc p<<1|1 define INF 1e18 using namespace std; define lowbit(x) x&(-x) define endl '\n' using ll = long
阅读全文
向下向右走
摘要:https://codeforces.com/contest/2049/problem/D #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 1e18 using namespace std; #define
阅读全文
a数组操作跟b数组一样
摘要:https://codeforces.com/problemset/problem/2061/D #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #defin
阅读全文
说谎与诚实的人
摘要:https://codeforces.com/problemset/problem/2061/C #include<bits/stdc++.h> using namespace std; #define endl '\n' using ll = long long; using pii = pair
阅读全文
树删除两个点求最大联通分量数
摘要:https://codeforces.com/problemset/problem/2063/C #include<bits/stdc++.h> using namespace std; #define endl '\n' using ll = long long; using pii = pair
阅读全文
稻草人与乌鸦
摘要:https://codeforces.com/problemset/problem/2055/D #include<bits/stdc++.h> using namespace std; #define endl '\n' using ll = long long; using pii = pair
阅读全文
选择子序列再逆序
摘要:https://codeforces.com/problemset/problem/2063/B #include<bits/stdc++.h> using namespace std; #define endl '\n' using ll = long long; using pii = pair
阅读全文
账号分配权重【扩展域+虚拟并查集】
摘要:https://ac.nowcoder.com/acm/contest/100253/D #include<bits/stdc++.h> using namespace std; #define endl '\n' using ll = long long; using pii = pair<int
阅读全文
F图与G图
摘要:https://codeforces.com/problemset/problem/2060/E https://blog.csdn.net/MenghuanL/article/details/145268191?ops_request_misc=&request_id=&biz_id=102&ut
阅读全文
模拟
摘要:天梯赛使用 OMS 监考系统,需要将参赛队员安排到系统中的虚拟赛场里,并为每个赛场分配一位监考老师。每位监考老师需要联系自己赛场内队员对应的教练们,以便发放比赛账号。为了尽可能减少教练和监考的沟通负担,我们要求赛场的安排满足以下条件: 每位监考老师负责的赛场里,队员人数不得超过赛场规定容量 C; 每
阅读全文
汉诺塔
摘要:题目: 堆宝塔游戏是让小朋友根据抓到的彩虹圈的直径大小,按照从大到小的顺序堆起宝塔。但彩虹圈不一定是按照直径的大小顺序抓到的。聪明宝宝采取的策略如下: 首先准备两根柱子,一根 A 柱串宝塔,一根 B 柱用于临时叠放。 把第 1 块彩虹圈作为第 1 座宝塔的基座,在 A 柱放好。 将抓到的下一块彩虹圈
阅读全文
双指针+回文数组
摘要:https://codeforces.com/problemset/problem/1610/B #include<bits/stdc++.h> using namespace std; #define endl '\n' using ll = long long; using pii = pair
阅读全文
树+dfs
摘要:原题链接:https://codeforces.com/problemset/problem/2050/G 题解链接:https://blog.csdn.net/Lazy_ChessPlayer/article/details/144279298 #include<bits/stdc++.h> #d
阅读全文
倍增算法【模板】
摘要:原题链接https://www.luogu.com.cn/problem/P3865 题解链接https://blog.csdn.net/WJTF2/article/details/136239183?ops_request_misc=%257B%2522request%255Fid%2522%25
阅读全文
字符串dp+匹配
摘要:https://codeforces.com/problemset/problem/2050/E #include<bits/stdc++.h> using namespace std; #define endl '\n' using ll = long long; using pii = pair
阅读全文
线段树【区间GCD】
摘要:https://codeforces.com/contest/2050/problem/F 代码一: #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #def
阅读全文
贪心+区间端点
摘要:https://codeforces.com/problemset/problem/2051/E #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #defin
阅读全文
树+图
摘要:https://codeforces.com/problemset/problem/2053/E #include<bits/stdc++.h> using namespace std; #define endl '\n' #define lowbit(x) x&(-x) using ll = lo
阅读全文
二维数组+和
摘要:https://codeforces.com/problemset/problem/2055/C #include<bits/stdc++.h> using namespace std; #define endl '\n' #define lowbit(x) x&(-x) using ll = lo
阅读全文
数组【吞并】
摘要:https://codeforces.com/gym/580226/problem/I #include<bits/stdc++.h> using namespace std; #define endl '\n' #define lowbit(x) x&(-x) using ll = long lo
阅读全文
STL容器【set+pair】
摘要:https://codeforces.com/gym/580226/problem/G #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define low
阅读全文
树状数组【单点修改+区间查询】+二分
摘要:https://codeforces.com/gym/580226/problem/H #include<bits/stdc++.h> using namespace std; #define endl '\n' #define lowbit(x) x&(-x) using ll = long lo
阅读全文
树状数组【区间修改+单点查询】
摘要:https://www.luogu.com.cn/problem/P3368 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define lowbit(x) x&(-x) using ll = long long; u
阅读全文
树状数组【单点修改+区间查询】
摘要:https://www.luogu.com.cn/problem/P3374 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define lowbit(x) x&(-x) using ll = long long; u
阅读全文
字符串+图形
摘要:https://codeforces.com/gym/580226/problem/F #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define end
阅读全文
图形
摘要:https://codeforces.com/gym/580226/problem/E #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define end
阅读全文
循环
摘要:https://codeforces.com/gym/580226/problem/D #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define end
阅读全文
字符串+匹配
摘要:https://codeforces.com/gym/580226/problem/C #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define end
阅读全文
字符串+相邻
摘要:https://codeforces.com/gym/580226/problem/B #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define end
阅读全文
字符串
摘要:https://codeforces.com/gym/580226/problem/A #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define end
阅读全文
GCD相关
摘要:https://codeforces.com/gym/580226/problem/M #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define end
阅读全文
数学【找规律】
摘要:https://codeforces.com/contest/2043/problem/B #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define e
阅读全文
对数使用细节
摘要:https://codeforces.com/contest/2043/problem/A #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define e
阅读全文
完全背包
摘要:https://www.luogu.com.cn/problem/P1616 #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define endl '\n
阅读全文
01背包+应用
摘要:https://www.luogu.com.cn/problem/P1049 #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define endl '\n
阅读全文
01背包【模板】
摘要:https://www.luogu.com.cn/problem/P2871 #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define endl '\n
阅读全文
二分+排序
摘要:https://codeforces.com/contest/2053/problem/D https://blog.csdn.net/weixin_61825750/article/details/144799098 #include<bits/stdc++.h> #define lc p<<1
阅读全文
分组背包+四位
摘要:https://ac.nowcoder.com/acm/contest/99784/E #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define end
阅读全文
递归+pair
摘要:https://codeforces.com/contest/2053/problem/C #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define e
阅读全文
前缀和优化
摘要:https://codeforces.com/contest/2053/problem/B #include<bits/stdc++.h> #define INF 2e9 using namespace std; #define endl '\n' using ll = long long; usi
阅读全文
线段树+最大最小
摘要:https://codeforces.com/contest/2057/problem/D #include<bits/stdc++.h> #define lc p<<1 #define rc p<<1|1 #define INF 2e9 using namespace std; #define e
阅读全文