随笔分类 -  *CF*

摘要:843C - Upgrading Tree 题意:给一棵n个点的树,允许不超过2*n次操作。操作:(x,y,z),删除边(x,y),添加边(y,x),要求满足三个条件(见原题) 题解: 待补~ 先贴上dalao代码: 1 #include <bits/stdc++.h> 2 3 using name 阅读全文
posted @ 2017-08-25 11:08 yijiull 阅读(298) 评论(0) 推荐(0)
摘要:843B - Interactive LowerBound 有点懵比~~ 没看懂题解说的随机数概率什么的=_= 先贴上dalao代码 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 inline pair <int, int> ask( 阅读全文
posted @ 2017-08-25 10:44 yijiull 阅读(222) 评论(0) 推荐(0)
摘要:843A - Sorting by Subsequences 还好之前了解过一点白书上的permutation! 我写的递归,其实很容易直接写成递推啊 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn=1e5+10; 阅读全文
posted @ 2017-08-25 10:00 yijiull 阅读(243) 评论(0) 推荐(0)
摘要:844B - Rectangles 最多有2^50*2个!! 我也用long long 了,可是移位的时候忘记了,导致溢出,然后一早起来发现被hack了=_=|| 1<<temp; 1LL<<temp; 1 #include <bits/stdc++.h> 2 using namespace std 阅读全文
posted @ 2017-08-25 09:45 yijiull 阅读(293) 评论(0) 推荐(0)
摘要:724G - Xor-matic Number of the Graph 题意: 待补~~ 参考http://www.cnblogs.com/ljh2000-jump/p/6443189.html 阅读全文
posted @ 2017-08-24 22:40 yijiull 阅读(157) 评论(0) 推荐(0)
摘要:845G - Shortest Path Problem? 题意:给一个树,求1到n的最短路径。这里的路径定义为异或和。 线性基~ 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define ll long long 4 struct Li 阅读全文
posted @ 2017-08-24 22:02 yijiull 阅读(238) 评论(0) 推荐(0)
摘要:845G - Shortest Path Problem? 线性基?高斯消元? 晚上再补~~ 阅读全文
posted @ 2017-08-24 17:20 yijiull 阅读(97) 评论(0) 推荐(0)
摘要:845D - Driving Test 竟然做法和题解一样~~~贪心 其实当时没想着能过,虽然并不是很难~ 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int inf=1e9; 4 const int maxn=2e5+10; 阅读全文
posted @ 2017-08-24 17:07 yijiull 阅读(228) 评论(0) 推荐(0)
摘要:845C - Two TVs 题解是用扫描线 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn=2e5+10; 4 5 struct Node{ 6 int x,v; 7 bool operator<(const N 阅读全文
posted @ 2017-08-24 16:44 yijiull 阅读(194) 评论(0) 推荐(0)
摘要:845B - Luba And The Ticket 自己写的快蠢哭了,一开始少考虑了几种情况还被hack。。。 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn=210; 4 char s[8]; 5 int a[ 阅读全文
posted @ 2017-08-24 16:33 yijiull 阅读(366) 评论(0) 推荐(0)
摘要:839D - Winter is here 题意: 题解: 那个式子我都没想着去化简~太弱了=_= 参考的dalao的代码~ 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define ll long long 4 const int ma 阅读全文
posted @ 2017-08-15 10:48 yijiull 阅读(178) 评论(0) 推荐(0)
摘要:839C - Journey 题意: 题解:dfs 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define ll long long 4 const int maxn=100010; 5 struct Edge{ 6 int v,nex 阅读全文
posted @ 2017-08-15 09:44 yijiull 阅读(202) 评论(0) 推荐(0)
摘要:839B - Game of the Rows 题意: 题解: 贪心~ 1 #include <bits/stdc++.h> 2 using namespace std; 3 int have[5],cnt[3]; 4 5 int main(){ 6 int n,k; 7 scanf("%d%d", 阅读全文
posted @ 2017-08-15 09:23 yijiull 阅读(206) 评论(0) 推荐(0)
摘要:CF831 C Jury Marks 对于任意一个b,肯定是某一个裁判打分后的结果。先由此求出所有可能的初始分数,再判断是否满足其它的b值。 1 #include <cstdio> 2 #include <bits/stdc++.h> 3 using namespace std; 4 5 int a 阅读全文
posted @ 2017-07-15 23:30 yijiull 阅读(578) 评论(0) 推荐(0)
摘要:链接:CF812 好久之前做的,掉了100多-_-|| 太忙了今天才来补题。。。。。。 A B 1 #include <cstdio> 2 #include <cstring> 3 #include <bits/stdc++.h> 4 using namespace std; 5 6 int dp[ 阅读全文
posted @ 2017-06-17 15:55 yijiull 阅读(242) 评论(0) 推荐(0)
摘要:CodeForces - 807A 这就没什么说的了,好好读题就行。 1 #include<cstring> 2 #include<cstdio> 3 #include<bits/stdc++.h> 4 using namespace std; 5 6 int main() 7 { 8 int n; 阅读全文
posted @ 2017-05-23 17:40 yijiull 阅读(231) 评论(0) 推荐(0)
摘要:题目连接:CodeForces - 510C 补题系列。。。拓扑排序 阅读全文
posted @ 2017-05-04 21:18 yijiull 阅读(173) 评论(0) 推荐(0)
摘要:题目连接:CodeForces - 543B Let's solve easiest task. We have only one pair of vertices, and we need to calculate smallest amout of edges, such that there 阅读全文
posted @ 2017-05-04 20:29 yijiull 阅读(526) 评论(0) 推荐(0)
摘要:链接:http://codeforces.com/contest/364 A:Matrix 关于矩阵。。。 Let's notice that sum in the rectangle (x1, y1, x2, y2) is sum(x1, x2)·sum(y1, y2). Where sum(l, 阅读全文
posted @ 2017-05-03 23:47 yijiull 阅读(165) 评论(0) 推荐(0)
摘要:链接:http://codeforces.com/contest/798 A:Mike and palindrome 考虑不全面wa一次,水题。 1 #include<cstdio> 2 #include<cstring> 3 char s[20]; 4 5 int main() 6 { 7 sca 阅读全文
posted @ 2017-05-02 08:13 yijiull 阅读(2012) 评论(0) 推荐(0)