随笔分类 -  Codeforces

摘要:###A #include<iostream> #include<algorithm> using namespace std; typedef pair<int,int>PII; const int N=5100; int main() { int t;cin>>t; while(t--) { i 阅读全文
posted @ 2021-01-13 16:00 30天CF上蓝!!! 阅读(84) 评论(0) 推荐(0)
摘要:CodeForces - 1354B A - Ternary String $ 法一:dp\ 线性dp的思路,找到距离每个位置最近a..b..c的序列的长度,取最小值,如果有元素没有出现过输出0 $ #include<iostream> #include<cstring> using namespa 阅读全文
posted @ 2020-11-20 20:08 30天CF上蓝!!! 阅读(110) 评论(0) 推荐(0)
摘要:##1.Technocup 2021 - Elimination Round 1 A New Technique #include<iostream> #include<algorithm> #include<cstring> #include<vector> using namespace std 阅读全文
posted @ 2020-11-17 21:36 30天CF上蓝!!! 阅读(361) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-11-01 20:26 30天CF上蓝!!! 阅读(110) 评论(0) 推荐(0)
摘要:比赛链接:https://codeforces.com/contest/1436 ##A.Reorder ##题解 经过模拟计算,观察到 \(\sum_{i=1}^n \sum_{j=i}^n \frac{a_j}{j}=\sum_{i=1}^n a_i\) 判断每个n个数的和sum与m是否相等即可 阅读全文
posted @ 2020-11-01 17:26 30天CF上蓝!!! 阅读(133) 评论(0) 推荐(0)