07 2023 档案

摘要:[比赛链接](https://ac.nowcoder.com/acm/contest/57358) # A ## 题解 **知识点:KMP,构造。** 考虑构造全 $0,1$ 串,至少有一个可行。 我们只需要考虑到 $t$ 的border $t'$ ,即 $t'+s+t'$ : 1. 当 $t'+s 阅读全文
posted @ 2023-07-31 01:57 空白菌 阅读(122) 评论(0) 推荐(0)
摘要:[比赛链接](https://codeforces.com/contest/1851) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n, m, k, H; cin >> 阅读全文
posted @ 2023-07-27 00:48 空白菌 阅读(223) 评论(0) 推荐(0)
摘要:[比赛链接](https://ac.nowcoder.com/acm/contest/57357) # A ## 题解 **知识点:数学。** 当 $x = 0$ 时,当且仅当 $y = 0$ 可行。 当 $x \neq 0$ 时,一定可行,答案为 $|x-y|$ 。 时间复杂度 $O(1)$ 空间 阅读全文
posted @ 2023-07-26 16:28 空白菌 阅读(170) 评论(0) 推荐(0)
摘要:[比赛链接](https://ac.nowcoder.com/acm/contest/57356) # D ## 题解 **知识点:贪心。** 首先,因为第一个人喜欢吃的可能会被后面的人选中,因此直接选最喜欢吃的可能会浪费机会。所以,我们考虑先看后面的人怎么选,就是倒着贪心,我们考虑证明。 假设当前 阅读全文
posted @ 2023-07-25 19:25 空白菌 阅读(51) 评论(0) 推荐(0)
摘要:[比赛链接](https://ac.nowcoder.com/acm/contest/57355) # A ## 题解 **知识点:构造。** 设任意字符串为 $t$ ,为了使得 $t = s$ 时结果不有序,考虑将其中 $s$ 一组 $01$ 固定反序,同时 $t \neq s$ 时一定不会反序。 阅读全文
posted @ 2023-07-21 02:29 空白菌 阅读(343) 评论(0) 推荐(1)
摘要:[比赛链接]() # 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; 阅读全文
posted @ 2023-07-18 23:28 空白菌 阅读(96) 评论(0) 推荐(0)
摘要:[比赛链接](https://codeforces.com/contest/1831) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n; cin >> n; for ( 阅读全文
posted @ 2023-07-16 18:55 空白菌 阅读(67) 评论(0) 推荐(0)
摘要:[比赛链接](https://codeforces.com/contest/1843) # A ## 代码 ```c++ #include using namespace std; using ll = long long; int a[57]; bool solve() { int n; cin 阅读全文
posted @ 2023-07-15 18:07 空白菌 阅读(44) 评论(0) 推荐(0)
摘要:[比赛链接](https://codeforces.com/contest/1844) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int a, b; cin >> a >> 阅读全文
posted @ 2023-07-14 22:40 空白菌 阅读(25) 评论(0) 推荐(0)
摘要:[比赛链接](https://codeforces.com/contest/1847) # A ## 代码 ```c++ #include using namespace std; using ll = long long; int a[107]; int f[107]; bool solve() 阅读全文
posted @ 2023-07-13 19:09 空白菌 阅读(102) 评论(0) 推荐(1)
摘要:# 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 阅读全文
posted @ 2023-07-11 20:10 空白菌 阅读(20) 评论(0) 推荐(0)
摘要:[比赛链接](https://codeforces.com/contest/1846) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n; cin >> n; int c 阅读全文
posted @ 2023-07-10 03:34 空白菌 阅读(231) 评论(0) 推荐(1)
摘要:[比赛链接](https://codeforces.com/contest/1842) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n, m; cin >> n >> 阅读全文
posted @ 2023-07-08 13:02 空白菌 阅读(290) 评论(0) 推荐(0)
摘要:[比赛链接](https://codeforces.com/contest/1836) # A ## 代码 ```c++ #include using namespace std; using ll = long long; int cnt[107]; bool solve() { int n; c 阅读全文
posted @ 2023-07-06 20:16 空白菌 阅读(309) 评论(0) 推荐(2)
摘要:[比赛链接](https://codeforces.com/contest/1845) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n, k, x; cin >> n 阅读全文
posted @ 2023-07-03 21:46 空白菌 阅读(54) 评论(0) 推荐(0)
摘要:[比赛链接](https://codeforces.com/contest/1838) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n; cin >> n; int m 阅读全文
posted @ 2023-07-01 17:00 空白菌 阅读(152) 评论(0) 推荐(1)