摘要:
1838D. Bracket Walk (*2100) Algorithms:STL, 思维 https://codeforces.com/contest/1838/problem/D 题意 给定一个初始的括号序列 \(S\),\(q\) 次修改,每次修改一个位置 \(u\)(如果 \(S_u =\ 阅读全文
摘要:
寄!大!了! Rating -= 124. ![image](https://img2023.cnblogs.com/blog/3143679/202306/3143679-20230619222246244-5109748.png) (恼) https://codeforces.com/conte 阅读全文
摘要:
# 〇、基础位运算 ## 与运算 / AND 语法:`a & b`。 计算方法:按位计算 AND。 运算:`1 & 1 = 1, 1 & 0 = 0, 0 & 1 = 0, 0 & 0 = 0`。 ## 或运算 / OR 语法:`a | b`。 计算方法:按位计算 OR。 运算:`1 | 1 = 1 阅读全文
摘要:
https://codeforces.com/contest/1841 https://codeforces.com/contest/1841/problems # D. Pairs of Segments https://codeforces.com/contest/1841/problem/D 阅读全文
摘要:
# 一、差分约束 差分约束可以求解如下问题的一组解: $$\begin{cases}x_{a_1} + c_1 \geq x_{b_1}\\ x_{a_2} + c_2 \geq x_{b_2} \\ \dots \\ x_{a_k} + c_k \geq x_{b_k}\end{cases}$$ 阅读全文
摘要:
# 一、基环树 基环树其实 **并不是** 一棵树,而是一张 $n$ 个点 $n$ 条边的连通图。 一般的基环树就形如一棵 $n$ 个节点的树再加上一条非树边。 扩展. 如果基环树不连通,就变成多个基环树组成的森林了。 Method 1. 将环拎出来,环上的每一个节点都挂了一棵子树,将子树信息合并, 阅读全文
摘要:
https://atcoder.jp/contests/abc305/tasks_print # E - Art Gallery on Graph 冷知识:md 这题赛时没做出来 /cy 刚看到题:这是什么题啊,$K, h$ 都 $1e5$ 能做吗 /fn 确实能做。 考虑类似 SPFA 的操作。 阅读全文
摘要:
# 一个小问题 ## Statement 来源:https://www.luogu.com.cn/problem/T297472?contestId=91205 给定字符串 $S$,求最长的连续子序列满足其中每个字符都出现了偶数次,求最长长度。 $T$ 组询问,$\displaystyle \sum 阅读全文
摘要:
# ARC161D ![image](https://img2023.cnblogs.com/blog/3143679/202305/3143679-20230529205400008-198332785.png) ## 题意 定义一张简单无向图的 **密度** 为:$\displaystyle M 阅读全文
摘要:
# 我的 Codeforces 账号们 https://codeforces.com/profile/OMG_78 https://codeforces.com/profile/ptraffic1919810 https://codeforces.com/profile/ptraffic114514 阅读全文