02 2024 档案
摘要:1. 四边形不等式 1.1 小标题该怎么起阿 考虑一个形式如下的 DP: \[f_{i} = \min_{j = 1}^{i}val(j, i) \]其中 \(i\) 满足 \(1 \leq i \leq n\)。 设 \(f_{i}\) 的最优决策点为 \(oper_{i}\)。 1.2 一些概念
阅读全文
摘要:Strings Hash template < int N > struct PolyHashing { i64 s[N]; i64 mod[2] = {1610612741ll, 805306457ll}; i64 pw[N][2]; i64 w[N][2]; void init (int m)
阅读全文
摘要:Fibonacci Sequence Formula \[F_{1} = 1 \]\[F_{2} = 1 \]\[F_{i} = F_{i - 1} + F_{i - 2}(i \geq 3) \]List \[F_1 = 1 \]\[F_2 = 1 \]\[F_{3} = 2 \]\[F_{4}
阅读全文
摘要:一些前置内容 Min-Max 容斥 \[\max_{x \in S}x = \sum_{T \subseteq S}(-1)^{T - 1}\min_{x \in T}x \]\[\min_{x \in S}x = \sum_{T \subseteq S}(-1)^{T - 1}\max_{x \i
阅读全文
摘要:1. 源码 typedef long long i64; typedef unsigned long long u64; typedef __int128 i128; const i128 o = 1; template < i64 mod, i64 invpow = mod - 2 > struc
阅读全文
摘要:Some Templates Maximum Flow (Minimum Cut) template < class T, int N, int M > struct MaxFlow { int n; int cnt = 1, head[N]; struct Edge { T flow; int n
阅读全文
摘要:1929. Codeforces Round 926 (Div. 2) 寄寄寄。 A. Sasha and the Beautiful Array 容易发现 \(\displaystyle \sum_{i = 2}^{n}(a_i - a_{i - 1}) = a_n - a_1\),令 \(\di
阅读全文
摘要:数位 DP 好题!!!1 题出的好!难度适中,覆盖知识点广,题目又着切合实际的背景,解法比较自然。给出题人点赞 ! Link:https://codeforces.com/problemset/problem/1194/G Problem Statement time limit per test:
阅读全文
摘要:线段树的练手好题。 Link:https://codeforces.com/problemset/problem/1928/F Problem Statement time limit per test: 2 seconds memory limit per test: 256 megabytes
阅读全文
摘要:山东高一 OIer。 很菜。 OIerDb https://oier.baoshuo.dev/oier/124413 QQ id = 1427746949 欢迎来加! 洛谷 uid = 448881 CodeForces AtCoder
阅读全文

浙公网安备 33010602011771号