03 2023 档案
摘要:题面 考虑暴力 dp:设 表示在以 为根的子树中选的包含节点 的连通块的价值为 的方案数,转移时合并儿子的 dp 状态即可。复杂度 。 这个暴力慢在合并两个儿子的状态,因为合并两个 dp 数组是 \(O
阅读全文
摘要:洛谷P3806 #include <bits/stdc++.h> using namespace std; int read() { int s = 0, f = 1; char ch = getchar(); while (ch < '0' || ch > '9') f = (ch == '-'
阅读全文
摘要:P5357 #include <bits/stdc++.h> #define int long long #define N 200005 using namespace std; int n, cnt[N] = {0}; string s[N], t; map<string, int> apr;
阅读全文
摘要:KMP 洛谷P3375 #include <bits/stdc++.h> #define int long long using namespace std; int read() { int s = 0, f = 1; char ch = getchar(); while (ch < '0' ||
阅读全文
摘要:简介 博弈论,是经济学的一个分支,主要研究具有竞争或对抗性质的对象,在一定规则下产生的各种行为。博弈论考虑游戏中的个体的预测行为和实际行为,并研究它们的优化策略。 通俗地讲,博弈论主要研究的是:在一个游戏中,进行游戏的多位玩家的策略。 公平组合游戏 博弈论中,一般主要研究公平组合游戏。公平组合游戏(
阅读全文