07 2023 档案
摘要:[比赛链接](https://ac.nowcoder.com/acm/contest/57358) # A ## 题解 **知识点:KMP,构造。** 考虑构造全 串,至少有一个可行。 我们只需要考虑到 的border ,即 : 1. 当 $t'+s
阅读全文
摘要:[比赛链接](https://codeforces.com/contest/1851) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n, m, k, H; cin >>
阅读全文
摘要:[比赛链接](https://ac.nowcoder.com/acm/contest/57357) # A ## 题解 **知识点:数学。** 当 时,当且仅当 可行。 当 时,一定可行,答案为 。 时间复杂度 空间
阅读全文
摘要:[比赛链接](https://ac.nowcoder.com/acm/contest/57356) # D ## 题解 **知识点:贪心。** 首先,因为第一个人喜欢吃的可能会被后面的人选中,因此直接选最喜欢吃的可能会浪费机会。所以,我们考虑先看后面的人怎么选,就是倒着贪心,我们考虑证明。 假设当前
阅读全文
摘要:[比赛链接](https://ac.nowcoder.com/acm/contest/57355) # A ## 题解 **知识点:构造。** 设任意字符串为 ,为了使得 时结果不有序,考虑将其中 一组 固定反序,同时 时一定不会反序。
阅读全文
摘要:[比赛链接]() # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n, m, k; cin >> n >> m >> k; int x, y; cin >> x >> y;
阅读全文
摘要:[比赛链接](https://codeforces.com/contest/1831) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n; cin >> n; for (
阅读全文
摘要:[比赛链接](https://codeforces.com/contest/1843) # A ## 代码 ```c++ #include using namespace std; using ll = long long; int a[57]; bool solve() { int n; cin
阅读全文
摘要:[比赛链接](https://codeforces.com/contest/1844) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int a, b; cin >> a >>
阅读全文
摘要:[比赛链接](https://codeforces.com/contest/1847) # A ## 代码 ```c++ #include using namespace std; using ll = long long; int a[107]; int f[107]; bool solve()
阅读全文
摘要:# A ## 代码 ```c++ #include using namespace std; using ll = long long; int p[507]; bool solve() { int n; cin >> n; for (int i = 1;i > p[i]; int pos1 = 0
阅读全文
摘要:[比赛链接](https://codeforces.com/contest/1846) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n; cin >> n; int c
阅读全文
摘要:[比赛链接](https://codeforces.com/contest/1842) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n, m; cin >> n >>
阅读全文
摘要:[比赛链接](https://codeforces.com/contest/1836) # A ## 代码 ```c++ #include using namespace std; using ll = long long; int cnt[107]; bool solve() { int n; c
阅读全文
摘要:[比赛链接](https://codeforces.com/contest/1845) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n, k, x; cin >> n
阅读全文
摘要:[比赛链接](https://codeforces.com/contest/1838) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n; cin >> n; int m
阅读全文