05 2023 档案

摘要:upd: 写你的网络单纯形去 最小费用最大流(原始对偶): ```cpp namespace flow{ // mcmf}{{{ using typ = int; constexpr int V = 1, E = 1; #error V,E unset constexpr int EDGE_NIL 阅读全文
posted @ 2023-05-28 21:00 383494 阅读(14) 评论(0) 推荐(0) 编辑
摘要:```cpp ll qmul(ll a, ll b, ll c){ a%=c, b%=c; ll w = (ld)a/c*b; ll r = (ull)a*b-(ull)w*c; return r<0?r+c:r; } ``` 阅读全文
posted @ 2023-05-24 16:20 383494 阅读(9) 评论(0) 推荐(0) 编辑
摘要:光速最大流: ```cpp namespace flow{ // }{{{ using typ = int; constexpr int V = 1200, E = 120000; int iv, is, it; struct Edge{int to, nxt, lf;} es[E*2+2]; co 阅读全文
posted @ 2023-05-23 10:42 383494 阅读(7) 评论(0) 推荐(0) 编辑
摘要:namespace FHQ{ #define siz(x) ({Node *_a_ = x; _a_ == np ? 0 : _a_->sz; }) struct Node{ Node *ls, *rs; char val; int pri; int sz; void updsz(){ sz = 1 阅读全文
posted @ 2023-05-14 14:02 383494 阅读(17) 评论(0) 推荐(0) 编辑
摘要:int exgcd(int a, int b, int &x, int &y){ if(!b){ x=1, y=0; return a; } int d = exgcd(b, a%b, x, y); sd swap(x, y); y -= a/b*x; return d; } 阅读全文
posted @ 2023-05-07 20:29 383494 阅读(7) 评论(0) 推荐(0) 编辑
摘要:P3426 #include <cstdio> #include <cstring> #include <vector> #define sd std:: namespace m{ // } constexpr int LEN = 1e6; sd vector<int> prepare(char* 阅读全文
posted @ 2023-05-02 14:33 383494 阅读(15) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示