
cf
文章平均质量分 90
星火漫天夜如昼
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
D. New Year and the Permutation Concatenation 题解翻译+思路解释(官方为主,我为补充)+普通人能看得懂的代码(我照着思路写的哈哈哈)
传送门:http://codeforces.com/contest/1091/problem/D There are two types of subarrays with length n: 有两种类型的长度为n的子序列 They are fully formed from one permutations. 所组成的元素完全就是来自某一个独立的排列 They are a concate...翻译 2019-01-01 17:31:50 · 530 阅读 · 0 评论 -
F. Graph Without Long Directed Paths 有向图不是树
从无向图中构建有向图,要求: 有向图的路径长度不能超过2 <==> 连接到同一个点的要么同时以这个点为终点,要么同时以这个点为起点 <==> 这个点要么做所有有关边的终点,要么做所有有关边的起点;与此同时,与他相邻的点必须做与它性质相反的点 <==> 所以可以用染色 + DFS 来解决 ————————————...原创 2019-04-02 18:59:05 · 213 阅读 · 0 评论 -
E. Median String 26进制数相加除2
这道题就是给两个26进制的数,然后求两个数加起来之后除以2等于多少。 如果我们定义26进制的数,那么'a'显然是0,但是一开始我觉得 ‘a’ + 'a' = 2。 很显然,我把one和first弄混了。 #include<bits/stdc++.h> using namespace std; #define sc scanf #define pt printf #...原创 2019-04-02 20:59:27 · 219 阅读 · 0 评论 -
1144G - Two Merged Sequences 官网说要dp,但是贪心就够了
参考:https://www.cnblogs.com/Dup4/p/10635933.html ———————————————————————————————————— 规则: 全部元素都要放进升序或者降序序列里面 就先考虑开头的两个数a b,假设a > b 那么应该怎么分呢? 直觉告诉我们,a放到降序,b放到升序 如果不这样做呢?a放到升序,b放...原创 2019-04-02 22:27:56 · 262 阅读 · 0 评论 -
C. Ramesses and Corner Inversion 官方题解解读
原文: One can notice that the operation does not change the total parity of the matrix. So, if the total parity ofAAandBBdo not match, then the answer isNo. However, this is not the only case ...原创 2019-04-13 09:53:29 · 270 阅读 · 0 评论