珂以叫我5002或0x138A或CNS || AFOed
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在文章《题解:CF2137D Replace with Occurrences》发表评论:
cyx还是太超标了
在讨论《如果你的 KTT 被卡常了》回复:
%%%
看到这种边的长度在变化的题一眼分层图,但一看数据范围直接放弃。 $n,m$ 都是 $10^5$ 级别的,总不能建 $10^5$ 层吧(别说时间复杂度了,空间已经炸了)。 这题巧妙的地方就在于 $\frac{1}{t - 1}$ 迭代 $3$ 次就变了回来,即: $$\frac{1}{1 - \frac{1}{1 - \…
看到这种边的长度在变化的题一眼分层图,但一看数据范围直接放弃。 $n,m$ 都是 $10^5$ 级别的,总不能建 $10^5$ 层吧(别说时间复杂度了,空间已经炸了)。 这题巧妙的地方就在于 $\frac{1}{t - 1}$ 迭代 $3$ 次就变了回来,即: $$\frac{1}{1 - \frac{1}{1 - \…
思路参考 @皎月半洒花 大佬的思路,用了一种更好理解但效率更低的实现方法。 设 $f_i$ 为以 $i$ 结尾的最长上升子序列的长度,再设 $pre_i$ 为 $\max_{j = 1} ^ i f_j$,则有 $pre_{i - 1} + 1 \geq pre_i \geq pre_{i - 1}$,记 $dif_i…
在文章《HBOI/HBTSC 2025 游记》发表评论:
%%%
在讨论《洛谷 2 月月赛 I & FTLOI Round 2 赛后总结》回复:
@[E_firework](luogu://user/488539) 求题解
```cpp #include #define int long long #define mid ((l + r) >> 1) using namespace std; inline char gc(){ static char buf[10000005],*t1 = buf,*t2 = buf; return t1…
这份代码: ```cpp #include using namespace std; const int N = 1e5 + 9,SqrtN = 502; int n,m; int a[N]; struct node{ int num,id; } tmp[N]; bool cmp(node x,node y){ ret…
```cpp #include using namespace std; const int N = 1e5 + 9,SqrtN = 502; int n,m; int a[N]; struct node{ int num,id; } tmp[N]; bool cmp(node x,node y){ return x.…
```cpp #include using namespace std; const int N = 1e5 + 9,SqrtN = 5002;//5002好闪! int n,m; int a[N]; struct node{ int num,id; } tmp[N]; bool cmp(node x,node y){…
在讨论《WA on #13 #14 求调》回复:
此帖结。 死因:双指针写错。 正确代码: ```cpp while(l > 1) || tot > m)){//这里还要判tot > m,因为可能拓展到更优解。 r++; vis[a[r].id]++; bucket[a[r].id][a[r].typ]++; if(vis[a[r].id] == 1) cnt++;…
在讨论《WA on #13 #14 求调》回复:
@[Eason_cyx](luogu://user/741244)@[Vct14](luogu://user/677609)@[_L_i_n_k_](luogu://user/757259)@[Xiang_Tiger](luogu://user/745185)@[Arc0_FishyFool](luogu://user…
```cpp #include using namespace std; const int N = 2e6 + 9; int n,m; struct card{ int num,id,typ; } a[N]; bool cmp(card c1,card c2){ return (c1.num ^ c2.num) ?…
```cpp #include using namespace std; inline char gc(){ const short SIZE = 1 '9') c = gc(); while(c >= '0' && c q2.r; } set s; long long ans[M],tmp; void add(int…
```cpp #include using namespace std; const int N = 5e5 + 9,SqrtN = 759,M = 5e5 + 9,INF = 0x3f3f3f3f; int n,m; int a[N],pos[N]; int seq[N],top; int block_len,blo…
```cpp #include using namespace std; const int N = 1e5 + 9,M = 1e5 + 9,V = 1e5 + 9; const short SqrtN = 359,SqrtV = 359; int n,m; int a[N]; int tmp[N],top; stru…
```cpp #include using namespace std; const int N = 1e5 + 9,M = 1e5 + 9,V = 1e5 + 9; const short SqrtN = 359,SqrtV = 359; int n,m; int a[N]; int tmp[N],top; stru…
```cpp #include #define int long long using namespace std; const int N = 1e5 + 9,SqrtN = 359,M = 1e5 + 9,V = 1e5 + 9,SqrtV = 359; int n,m; int a[N]; int tmp[N],…
在讨论《90pts WA on #6 玄关求调》回复:
懒得调了,放一下我的代码: ```cpp #include using namespace std; const int N = 1e5 + 9; struct node{ string s; int x; } a[N]; int n,m; int calc(int bit,int now){ for(int i =…
在讨论《90pts WA on #6 玄关求调》回复:
@[Eason_cyx](luogu://user/741244) 不应该是从高往低枚举位吗
在讨论《90pts WA on #6 玄关求调》回复:
@[Eason_cyx](luogu://user/741244) 没看懂你为什么要开一个 $\log V \times 2$ 的数组啊
```cpp #include #include #define mid ((l + r) >> 1) #define lchild (root '9') c = gc(); while(c >= '0' && c R || r 0) t[root].len = tmp[r + 1] - tmp[l]; else t[…
前言:网络流好题。 本题中只有两种“元素”(Bob 的卡牌和朋友的卡牌),不难(其实很难,我就没有独立想到)想到以 Bob 为源点和汇点,在 Bob 和自己的贴纸间连边,自己的贴纸和朋友的贴纸之间连边。 具体的建图方法如下: - 在源点 Bob 和第 $i$ 种贴纸之间连一条容量为 $A_i$ 的边,其中 $A_i$…
```cpp #include using namespace std; const int N = 59,M = (N * N q; int dep[N > n >> k; s = 0;t = n + n + 1; for(int i = 1;i > (s + 1); for(int j = 1;j = n){ co…
在讨论《树剖yyds》回复:
@[chenbs](luogu://user/766573) 怎么卡啊
# 【0】学网络流需要了解的一些东西 咕咕咕 # 【1】几种计算最大流的算法 ## 【1.0】FF 方法 咕咕咕 ## 【1.1】EK 算法 ### 【1.1.1】EK 算法大致思路 可以概括为 bfs 找增广路。 咕咕咕 EK 的复杂度是 $O(能过)$(划掉),最坏复杂度是 $O(n m ^ 2)$,但一般情况下远…