
codeforces
huanzhizun
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #245 (Div. 2) D
D. Working outtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSummer is coming! It's time for Iahub and Ia原创 2014-05-14 19:37:50 · 587 阅读 · 0 评论 -
Codeforces Round #251 (Div. 2) D Devu and his Brother
因为答案可以看成函数,所以可以用三分来解答。原创 2014-06-05 15:08:45 · 551 阅读 · 0 评论 -
Codeforces Round #251 (Div. 2) C Devu and Partitioning of the Array
暴力。#include#include#include#includeusing namespace std;int a[100005];int b[100005],c[100005];int main(){ int i,n,m,p,k,tot,cal; cin>>n>>m>>k; for(i=0;i<n;i++){ scanf("%d"原创 2014-06-05 15:10:39 · 564 阅读 · 0 评论 -
Codeforces Round #277 (Div. 2) D题 树形dp
D. Valid Setstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you know, an undirected connected graph wit原创 2014-11-12 14:28:31 · 588 阅读 · 0 评论 -
Codeforces Round #288 (Div. 2) D Tanya and Password
裸欧拉路,至于对欧拉路不了解的同学可以看本博客里对欧拉路的解释。对于abc这个字符串,把ab、bc分别看成一个点连接一条边,然后直接欧拉路即可。下面是AC代码:#include#include#include#include#includeusing namespace std;vectorg[10005];int vis[100005];int in[10005],o原创 2015-03-23 11:20:59 · 404 阅读 · 0 评论 -
Codeforces Round #345 (Div. 1) E Clockwork Bomb
非常好的一道题首先很容易想到当你拆一条边后加边的次序是随意的然后我们可以这么想:如果在两个图中都存在的边没有任何意义,所以我们可以在结果图中先把相同边留下,把其他边删去,怎么弄呢,如果是一棵树就好办了,所以剩下就是把一堆树连起来。然后考虑开始的图,对于在结束图中不存在的边我们把它也删了,然后就是从当前节点出发有联通快,这些联通块在第二张图里面也存在,所以下面很简单了,我们只要把当前联通块的原创 2016-03-17 21:08:11 · 607 阅读 · 0 评论