??
题意,一个无向图,求该无向图中不小于3节点的最小奇数环。
思路bfs,但因为要求环上点的数目为奇数,所以不能简单的用一个vis数组记录点是否已访问过,可以改成二维的,
vis[u][0]表示点在偶数环中出现过,vis[u][1]表示点在奇数环中出现过
#include
#include
#include
#include
#include
#include
#...
分类:
其他好文 时间:
2015-06-26 09:23:24
阅读次数:
88
[BZOJ 1789] [BZOJ 1830] [AHOI 2008] Necklace Y型项链
分类:
其他好文 时间:
2015-06-17 21:22:22
阅读次数:
206
You’re typing a long text with a broken keyboard. Well it’s not so badly broken. The only problem with
the keyboard is that sometimes the “home” key or the “end” key gets automatically pressed (inter...
分类:
其他好文 时间:
2015-06-15 11:22:10
阅读次数:
95
题目描述
On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters
corresponding to those keys will not appear on screen.
Now given a string that you are s...
分类:
其他好文 时间:
2015-06-08 11:45:27
阅读次数:
118
openTSDB有这样的错误:ConnectionManager: Unexpected exception from downstream for [id:
0xf85323a8, /10.65.30.12:3874 => /10.65.150.117:4242]
java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatch...
分类:
数据库 时间:
2015-06-04 17:11:46
阅读次数:
682
http://acm.hdu.edu.cn/showproblem.php?pid=2660f[v][u]=max(f[v][u],f[v-1][u-w[i]]+v[i];注意中间一层必须逆序循环. 1 #include 2 #include 3 #include 4 using namesp...
分类:
其他好文 时间:
2015-06-01 22:14:32
阅读次数:
165
select job,what,failures,broken from user_jobsselect job, log_user, to_char(last_date,'yyyy-mm-dd hh24:mi:ss') last_date, t...
分类:
数据库 时间:
2015-06-01 14:41:41
阅读次数:
189
/*ID: awsd1231PROG: beadsLANG: C++*/#include#includeusingnamespace std;char necklace[500][2]={0};int num[500]={0};int n;void clearNec(){for(int i =0; ...
分类:
其他好文 时间:
2015-05-31 13:53:12
阅读次数:
102
1789: [Ahoi2008]Necklace Y型项链Time Limit: 20 SecMemory Limit: 256 MB题目连接http://www.lydsy.com/JudgeOnline/problem.php?id=1789Description欢乐岛上众多新奇的游乐项目让小可...
分类:
其他好文 时间:
2015-05-28 17:58:24
阅读次数:
173