11 2020 档案

摘要:比赛链接:https://codeforces.com/contest/1440 A. Buy the String 题解 枚举字符串中 $0$ 或 $1$ 的个数即可。 代码 #include <bits/stdc++.h> using namespace std; int main() { io 阅读全文
posted @ 2020-11-18 00:50 Kanoon 阅读(283) 评论(0) 推荐(0)
摘要:比赛链接:https://codeforces.com/contest/1447 A. Add Candies 题意 $1$ 到 \(n\) 个袋子里依次有 $1$ 到 \(n\) 个糖果,可以选择操作 \(m\) 次,第 \(i\) 次操作可以: 选择一个袋子,除了这个袋子外其他袋子都再放入 \( 阅读全文
posted @ 2020-11-16 22:00 Kanoon 阅读(156) 评论(0) 推荐(0)
摘要:第二次ak,纪念一下。 比赛链接:https://atcoder.jp/contests/abc183/tasks A - ReLU 题解 模拟。 代码 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with 阅读全文
posted @ 2020-11-15 23:30 Kanoon 阅读(264) 评论(0) 推荐(1)
摘要:比赛链接:https://codeforces.com/contest/1438 A. Specific Tastes of Andre 题意 构造一个任意连续子数组元素之和为子数组长度倍数的数组。 题解 构造全为同一值的任意数组即可。 代码 #include <bits/stdc++.h> usi 阅读全文
posted @ 2020-11-14 23:30 Kanoon 阅读(161) 评论(0) 推荐(0)
摘要:比赛链接:https://codeforces.com/contest/1445 A. Array Rearrangment 题意 给定两个大小均为 \(n\) 的升序数组 \(a\) 和 \(b\) ,判断能否重排数组 \(b\) 使得对任意 \(i\) 均满足 \(a_i + b_i \le x 阅读全文
posted @ 2020-11-04 11:30 Kanoon 阅读(160) 评论(0) 推荐(0)
摘要:比赛链接:https://codeforces.com/contest/1443 A. Kids Seating 题意 构造一个大小为 \(n\) 的数组使得任意两个数既不互质也不相互整除,要求所有数小于 $4n$ 。 题解 因为不互质所以 \(gcd\) 至少为 $2$,又为了避免相互整除,可以从 阅读全文
posted @ 2020-11-03 22:30 Kanoon 阅读(126) 评论(0) 推荐(0)