![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
zpltys
中科院计算所博士
展开
-
hdu 5208 Where is Bob
题目链接 数论,或者说与异或相关的数论题貌似首选想到按位考虑,不多说了(剪枝部分需要注意) #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int solve原创 2015-07-01 10:18:53 · 364 阅读 · 0 评论 -
poj 3177 Redundant Paths
http://poj.org/problem?id=3177 题目大意:求最小的添加路径数使原图变成一个边—双连通图。(允许重复边原创 2015-06-13 15:01:58 · 411 阅读 · 0 评论 -
hdu 5278 YJC plays automaton
题目链接 足足想了我两天,向比赛中做出的大神致敬。。。 思路:先求出所有的二元组(i,j),使得该二元组满足题意。 这个可以通过建立反向边求得(bfs) 然后对于二元组(i,j),(j,k),若都不满足题意,则集合(i,j,k),(i,k)一定不满足题意(反证:假设(i,k)满足题意,则存在str使得i->x,k->null(或者反过来), 而j在这个str下不是null就是某个非nul原创 2015-07-11 14:02:58 · 435 阅读 · 0 评论 -
hdu 5277 YJC counts stars
好像别人都是根据最大团为4来判断的。。。 然而根本不要那么麻烦,随便搞搞就过了。 #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; struct edge {原创 2015-07-05 20:05:08 · 264 阅读 · 0 评论