Codeforces - 1153A - Serval and Bus
地址https://codeforces.com/contest/1153/problem/A原文地址https://www.lucien.ink/archives/413代码https://pasteme.cn/6247#include <bits/stdc++.h> int main() { int n, m, min = 0x3f3f3f3f, ans, buf; ...
地址https://codeforces.com/contest/1153/problem/A原文地址https://www.lucien.ink/archives/413代码https://pasteme.cn/6247#include <bits/stdc++.h> int main() { int n, m, min = 0x3f3f3f3f, ans, buf; ...
地址https://codeforces.com/contest/1139/problem/E原文地址https://www.lucien.ink/archives/410题意$n$ 个点,$m$ 个集合,每个点都有一个权值,且只属于一个集合,每次你可以从每个集合中选定至多一个点,你的目标是使这些选出来的点权值的 $Mex$ 最大。有 $d$ 个询问,每个询问为一个数字 $k$ ,代表在上一...
地址https://codeforces.com/contest/1139/problem/D原文地址https://www.lucien.ink/archives/409题意模拟一个循环,一开始有一个空序列,之后每次循环:从 $[1, m]$ 中等概率选出一个数字添加到序列里去。检查这个序列所有元素的 $gcd$ 是否为 $1$,如果为 $1$ 则停止,若否则重复 $1$ 操作直至 $gc...
地址https://codeforces.com/contest/1139/problem/C原文地址https://www.lucien.ink/archives/408题解容斥一下。代码https://pasteme.cn/4939#include <bits/stdc++.h> typedef long long ll; const int maxn = int(2e5) ...
地址https://codeforces.com/contest/1139/problem/B原文地址https://www.lucien.ink/archives/407题意你有 $n$ 堆物品,第 $i$ 堆物品有 $a_i$ 个,如果你要从第 $i$ 堆物品中取走 $x_i$ 个,那么对于 $1 \leq j < i$ ,必须满足 $x_j < x_i \vee x_j =...