会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Kanoon
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
23
下一页
2020年10月18日
Codeforces Round #676 (Div. 2)【ABCD】
摘要: 比赛链接:https://codeforces.com/contest/1421 #A. XORwice ##题意 给出两个正整数 \(a、b\),计算 \((a \oplus x) + (b \oplus x)\) 的最小值。 ##题解 \(\begin{equation} a+b = a \op
阅读全文
posted @ 2020-10-18 23:50 Kanoon
阅读(349)
评论(0)
推荐(0)
2020年10月17日
2020第十一届蓝桥杯第二场省赛C++A组【A-H】
摘要: #A. 门牌制作 ##答案 624 ##代码 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int cnt = 0; for (int i = 1
阅读全文
posted @ 2020-10-17 21:00 Kanoon
阅读(1328)
评论(6)
推荐(0)
2020年10月14日
Codeforces Global Round 11【ABCD】
摘要: 比赛链接:https://codeforces.com/contest/1427 #A. Avoiding Zero ##题意 将 \(n\) 个数重新排列使得不存在为 $0$ 的前缀和。 ##题解 计算正、负前缀和,如果二者和为 $0$,则不存在满足题意的排列,否则将绝对值较大的一方排在前面即可。
阅读全文
posted @ 2020-10-14 01:15 Kanoon
阅读(160)
评论(0)
推荐(0)
Codeforces Global Round 11 D. Unshuffling a Deck(构造/相邻逆序对)
摘要: 题目链接:https://codeforces.com/contest/1427/problem/D #题意 给出一个大小为 \(n\) 的排列,每次操作可以将 \(n\) 个数分为 $1 \sim n$ 个非空连续份,然后将对称的份两两交换,试给出在 \(n\) 次操作内将排列排为升序的操作过程。
阅读全文
posted @ 2020-10-14 00:50 Kanoon
阅读(244)
评论(0)
推荐(0)
Codeforces Global Round 11 C. The Hard Work of Paparazzi(dp/最长上升子序列)
摘要: 题目链接:https://codeforces.com/contest/1427/problem/C #题意 \(r\) 行与 \(r\) 列相交形成了 \(r \times r\) 个点,初始时刻记者位于左下角的 \((1,1)\) 处,接下来给出 \(n\) 个名人的出现时间和位置,出现时间严格
阅读全文
posted @ 2020-10-14 00:20 Kanoon
阅读(249)
评论(0)
推荐(0)
2020年10月13日
Codeforces Global Round 11 B. Chess Cheater(贪心)
摘要: 题目链接:https://codeforces.com/contest/1427/problem/B #题意 给出一个长为 \(n\) 由 W, L 组成的字符串,如果一个 W 左侧为 W,则它提供 2 分,否则为 1 分。最多可以将 \(k\) 个 L 变为 W,问字符串可以得到的最大分值。 #题
阅读全文
posted @ 2020-10-13 23:45 Kanoon
阅读(278)
评论(0)
推荐(0)
Codeforces Global Round 11 A. Avoiding Zero(前缀和)
摘要: 题目链接:https://codeforces.com/contest/1427/problem/A #题意 将 \(n\) 个数重新排列使得不存在为 $0$ 的前缀和。 #题解 计算正、负前缀和,如果二者和为 $0$,则不存在满足题意的排列,否则将绝对值较大的一方排在前面即可。 #代码 #incl
阅读全文
posted @ 2020-10-13 23:20 Kanoon
阅读(138)
评论(0)
推荐(0)
2020年10月11日
2020年10月ICPC & 天梯赛 选拔赛【ACFJ】
摘要: #A. 表达式 ##题意 ##题解 将所有数字替换为A,运算符替换为O,然后不断合并(AOA),判断表达式最后是否为A即可。 注意将数字替换时判断有无前导零。 ##代码 #include <bits/stdc++.h> using namespace std; int main() { ios::s
阅读全文
posted @ 2020-10-11 22:30 Kanoon
阅读(277)
评论(0)
推荐(0)
2020年10月10日
HHKB Programming Contest 2020【ABCE】
摘要: 比赛链接:https://atcoder.jp/contests/hhkb2020/tasks #A - Keyboard ##代码 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(fal
阅读全文
posted @ 2020-10-10 22:30 Kanoon
阅读(297)
评论(0)
推荐(0)
2020年10月6日
Codeforces Round #672 (Div. 2) D. Rescue Nibel!(排序)
摘要: 题目链接:https://codeforces.com/contest/1420/problem/D 前言 之前写过这场比赛的题解,不过感觉这一题还可以再单独拿出来好好捋一下思路。 题意 给出 $n$ 个闭区间,问 $k$ 个区间共区间共有多少种情况。 题解一 以区间为单位进行考虑,排序+优先队列。
阅读全文
posted @ 2020-10-06 22:30 Kanoon
阅读(226)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
23
下一页
公告