码迷,mamicode.com
首页 >  
搜索关键字:contest    ( 3128个结果
AtCoder Beginner Contest 184 题解
Problem A - Determinant 按题意来进行直接计算 时间复杂度:\(\mathcal{O}(1)\) int main() { ios_base::sync_with_stdio(false), cin.tie(0); int a, b, c, d; cin >> a >> b > ...
分类:其他好文   时间:2021-03-29 11:52:31    阅读次数:0
AtCoder Beginner Contest 195 Editorial
AtCoder Beginner Contest 195 Editorial Problem A - Health M Death(opens new window) 只要检查 \(H\equiv 0\) 即可. Time complexity is \(\mathcal{O}(1)\). Spac ...
分类:其他好文   时间:2021-03-17 14:07:28    阅读次数:0
CF1494 F. Delete The Edges
题面 先讨论没有 shift 模式的情况,显然原图是一张半欧拉图才可满足情况。 对于 mode shift 分析后,发现此模式可以完整地删完一张菊花图。 这样只要原图能分成一张半欧拉图 \(G\) 和一张菊花图 \(G'\) 就有解。 一条枚举的思路就有了。 枚举每一个节点,设其为菊花图的中心 \( ...
分类:其他好文   时间:2021-03-16 11:53:50    阅读次数:0
2019 ICPC Northwestern European(6/11)
2019-2020 ICPC Northwestern European Regional Programming Contest (NWERC 2019) A. Average Rank 大意: n 个参赛选手将进行 w 轮的比赛,每轮比赛都会有一些选手加一分,选手按照分数从大到小排名(分数相等并 ...
分类:其他好文   时间:2021-03-15 11:33:30    阅读次数:0
2019 Sichuan Province Programming Contest D - Divide a Tree
想清楚它不是DP而是贪心就好做了 首先, 我们称子树刚好包含所有某一颜色的点为临界点, 那我们要优先选择深度越深的临界点越好 用另一种方式来说, 在dfs的过程中, 第一次发现有一个点恰好为临界点,那么就选择这个点为分界线新增一个答案, 很容易想清楚, 选择越深的肯定更优, 让其它点的有更多分块的机 ...
分类:其他好文   时间:2021-03-09 13:33:11    阅读次数:0
C. K-beautiful Strings
题目链接:https://codeforces.com/contest/1493/problem/C 题意:给定字符串s 求一个字典序最小的字符串t 满足 t的字典序>=s 并且 其中出现的字母次数可以被k整除 思路:考虑枚举哪个位置变大, 再枚举变成哪一个字母 然后利用前缀和 找前面的有多少个需要 ...
分类:其他好文   时间:2021-03-08 14:05:28    阅读次数:0
【YbtOJ#608】前缀编码
题目 题目链接:https://www.ybtoj.com.cn/contest/127/problem/1 \(n,\sum|S|\leq 5\times 10^5\)。 思路 由于每一个 ? 只能填 \(0\) 或 \(1\),不难想到 2-sat。 将串安装长度排序,把每一个 ? 分别当作 \ ...
分类:其他好文   时间:2021-03-01 14:04:29    阅读次数:0
AtCoder Beginner Contest 145
A - Circle #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int r; int main(){ cin >> r; cout << r * r << end ...
分类:其他好文   时间:2021-02-24 13:15:50    阅读次数:0
Codeforces Round #702 (Div. 3)G(二分,模拟stl)
https://codeforces.com/contest/1490/problem/G 二分循环几轮,再二分哪个位置刚好够。 1 #define IO std::ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 2 #define bug(x) co ...
分类:其他好文   时间:2021-02-24 13:01:05    阅读次数:0
Codeforces Round #703 (Div. 2) C2. Guessing the Greatest(二分,交互)
https://codeforces.com/contest/1486/problem/C2 #include<cstdio> #include<iostream> #include<deque> #include<cstring> #include<cmath> #include<map> #in ...
分类:其他好文   时间:2021-02-22 12:10:32    阅读次数:0
3128条   上一页 1 2 3 4 5 6 ... 313 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!