上一页 1 2 3 4 5 6 7 8 ··· 23 下一页
摘要: 第二次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 阅读(242) 评论(0) 推荐(1) 编辑
摘要: 比赛链接:https://codeforces.com/contest/1438 A. Specific Tastes of Andre 题意 构造一个任意连续子数组元素之和为子数组长度倍数的数组。 题解 构造全为同一值的任意数组即可。 代码 #include <bits/stdc++.h> usi 阅读全文
posted @ 2020-11-14 23:30 Kanoon 阅读(146) 评论(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 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 比赛链接:https://codeforces.com/contest/1443 A. Kids Seating 题意 构造一个大小为 \(n\) 的数组使得任意两个数既不互质也不相互整除,要求所有数小于 $4n$ 。 题解 因为不互质所以 \(gcd\) 至少为 $2$,又为了避免相互整除,可以从 阅读全文
posted @ 2020-11-03 22:30 Kanoon 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://codeforces.com/contest/1437/problem/E 题意 给出一个大小为 \(n\) 的数组 \(a\) 和一个下标数组 \(b\),每次操作可以选择数组 \(b\) 外的任意下标 \(i\) 并将 \(a_i\) 赋值为任意数,问能否经过操作使得数 阅读全文
posted @ 2020-10-29 17:35 Kanoon 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 比赛链接:https://codeforces.com/contest/1437 A. Marketing Scheme 题解 令 \(l = \frac{a}{2}\),那么如果 \(r < a\),每个顾客都会买更多猫粮。 代码 #include <bits/stdc++.h> using na 阅读全文
posted @ 2020-10-28 11:31 Kanoon 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 比赛链接:https://codeforces.com/contest/1436 A. Reorder 题解 模拟一下这个二重循环发现每个位置数最终都只加了一次。 代码 #include <bits/stdc++.h> using namespace std; int main() { ios::s 阅读全文
posted @ 2020-10-25 08:30 Kanoon 阅读(393) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://codeforces.com/gym/102361/problem/F ##题意 有 \(n\) 个点和 \(m\) 条边,每条边属于 $0$ 或 $1$ 个环,问去掉一些边使得图变为森林的方案个数。 ##题解 找出所有环的长度 \(c_i\),每个环可以去掉 $1,2,\ 阅读全文
posted @ 2020-10-21 22:45 Kanoon 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://codeforces.com/contest/1433/problem/G ##题解 跑 \(n\) 遍 \(dijkstra\) 得到任意两点间的距离,然后枚举哪一条边权为 $0$ 即可。 ##代码 #include <bits/stdc++.h> using names 阅读全文
posted @ 2020-10-21 11:30 Kanoon 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 比赛链接:https://codeforces.com/contest/1433 #A. Boring Apartments ##题解 模拟即可。 ##代码 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_wi 阅读全文
posted @ 2020-10-21 00:35 Kanoon 阅读(266) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 23 下一页