今年目标
- noip 1=
- 蓝题 200+
- 紫题 100+
名言
我不是这个,所以我是内个 --@zengxuhengps:题单皆为公开,可自取
常用
能猫
主题
JetBrains mono
Fira Code
typora
ndm
Obsidian
vscode
vscch
MinGW
事件
ps:黑题不是本人实力
2023.11.17 19.40 首
2024.5.1 16:24
2024.6.10
2024.7.16 提交破1k
2024.7.19 400
2024.7.23
2024.11.10
2025.3.2
2025.8.4
常用:
刷ATcoder点这里
vscode CPP 配置
{
"standerd Segment Tree": {
"prefix": "Segment Tree",
"body": [
"struct SegTree",
"{",
" struct TreeNode",
" {",
" int l,r;",
" ll sum,laz;",
" void tag(ll x){",
" sum += (r-l+1ll)*x; ",
" laz+=x;",
" } ",
" };",
" #define ls num<<1",
" #define rs num<<1|1",
" #define mid ((tr[num].l+tr[num].r)>>1)",
" TreeNode tr[N<<2];",
" void Up(TreeNode &a,TreeNode b, TreeNode c){",
" a.sum = b.sum + c.sum;",
" } ",
" void Down(int num){",
" ll &t=tr[num].laz;",
" if(!t) return;",
" tr[ls].tag(t);",
" tr[rs].tag(t);",
" t=0;",
" }",
" void build(int num,int L,int R){",
" tr[num].l=L,tr[num].r=R,tr[num].laz =0;",
" if(L==R){",
" tr[num].sum = a[L];",
" return;",
" }",
" build(ls,L,mid);",
" build(rs,mid+1,R);",
" Up(tr[num],tr[ls],tr[rs]);",
" }",
" void upd(int num, int L, int R, ll v)",
" {",
" if (L <= tr[num].l && tr[num].r <= R)",
" {",
" tr[num].tag(v);",
" return;",
" }",
" Down(num);",
" if (mid >= L)",
" upd(ls, L, R, v);",
" if (mid < R)",
" upd(rs, L, R, v);",
" Up(tr[num], tr[ls], tr[rs]);",
" }",
" ",
" TreeNode qry(int num,int L,int R){",
" if(L<=tr[num].l&&tr[num].r<=R){",
" return tr[num];",
" }",
" Down(num);",
" TreeNode x={0,0,0,0};",
" if(L<=mid) Up(x,x,qry(ls,L,R));",
" if(mid<R) Up(x,x,qry(rs,L,R));",
" return x;",
" }",
"}tree;",
""
],
"description": "standerd Segment Tree"
},
"subtask oi": {
"prefix": "sub oi",
"body": [
"#include<bits/stdc++.h>",
"using namespace std;",
"const int N = 1e5+4;",
"typedef long long ll;",
"",
"void sol(){",
"\t",
"}",
"",
"int main(){",
"\tios::sync_with_stdio(0);",
"\tcin.tie(0);",
"\t//freopen(\".in\",\"r\",stdin);",
"\t//freopen(\"out.out\",\"w\",stdout);",
"\tint T=1;",
"\t//cin>>T;",
"\twhile(T--){",
"\t\tsol();",
"\t}",
"\t",
"\treturn 0;",
"}"
],
"description": "standerd template of OI"
},
"Addv": {
"prefix": "addv",
"body": [
"struct Edge{int to,nxt,val;}e[N<<2];int head[N],cnt;",
"void add(int u,int v,int w){e[++cnt] = {v,head[u],w};head[u] = cnt;}"
],
"description": "Add with val"
},
"stl rt": {
"prefix": "stlrot",
"body": [
"#include<ext/pb_ds/assoc_container.hpp>",
"#include<ext/pb_ds/tree_policy.hpp>",
"using namespace __gnu_pbds;",
"tree<pii,null_type,less<pii>,rb_tree_tag,",
"tree_order_statistics_node_update> M;"
],
"description": "stl rt"
},
"template oi": {
"prefix": "default oi",
"body": [
"#include<bits/stdc++.h>",
"using namespace std;",
"typedef long long ll;",
"const int N =1e5+5,inf = 2e9,memse = 0x3f;",
"using pii = pair<int,int>;",
"",
"signed main(){",
"\tios::sync_with_stdio(0);",
"\tcin.tie(0);",
"\t//freopen(\".in\",\"r\",stdin);",
"\t//freopen(\"out.out\",\"w\",stdout);",
"\t",
"\t",
"\treturn 0;",
"}"
],
"description": "template oi"
}
}人生如此复杂,机会多得像稠密图,我们没理由认输。尽管我们走不了最短路,但图仍是连通图,TLE之前,没有一个节点叫失败。