题目链接:zoj 3811 Untrusted Patrol
题目大意:给定n,m,k,表示有n个仓库,m条通道,k个传感器,现在给定n个传感器的位置和m条通道,现在要最这n个仓库进行巡逻,要求一次进过给定具有传感器的仓库,每个仓库经过的次数不限,单要求至少进过1次。
解题思路:首先判断是否为联通图,不连通的话肯定到不了。其次判断l是否等于k,如果不等于的话,说明至少有一个仓库到不了,...
分类:
其他好文 时间:
2014-09-09 13:21:58
阅读次数:
223
题目链接:zoj 3816 Generalized Palindromic Number
题目大意:给定n,找一个最大的数x,保证x小于n,并且x为palindromic number
解题思路:枚举前i个放于n相同的数,然后去构造后半部分即可。
#include
#include
#include
using namespace std;
typedef unsigned...
分类:
其他好文 时间:
2014-09-09 13:20:28
阅读次数:
131
Alternating Sum
Time Limit: 2 Seconds Memory Limit: 65536 KB
There is a digit string S with infinite length. In addition, S is periodic and it can be formed by concatenating infinite repeti...
分类:
其他好文 时间:
2014-09-09 13:10:58
阅读次数:
164
# include
# include
# include
# define MAX 55
using namespace std;
int L;
char a[MAX];
int vis[MAX];
int judge1()//ababa
{
int i,j;
int xx,yy,zz;
char x[MAX],y[MAX],z[MAX];
for(i=2...
分类:
其他好文 时间:
2014-09-09 13:05:58
阅读次数:
197
ZOJ 3810 A Volcanic Island(四色定理模板)...
分类:
其他好文 时间:
2014-09-09 13:05:18
阅读次数:
255
poj 1543 & HDU 1334 & ZOJ 1331 Perfect Cubes(数学 暴力大法好)...
分类:
其他好文 时间:
2014-09-09 13:01:48
阅读次数:
235
We Need Medicine
Time Limit: 10 Seconds Memory Limit: 65536 KB Special Judge
A terrible disease broke out! The disease was caused by a new type of virus, which will lead to lethal lymp...
分类:
其他好文 时间:
2014-09-09 12:55:12
阅读次数:
301
A Volcanic Island
Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge
An underwater volcano has erupted massively in somewhere of the deep Atlantis Ocean. This large eruption le...
分类:
其他好文 时间:
2014-09-09 12:53:58
阅读次数:
137
Pretty Poem
Time Limit: 2 Seconds Memory Limit: 65536 KB
Poetry is a form of literature that uses aesthetic and rhythmic qualities of language. There are many famous poets in the contempo...
分类:
其他好文 时间:
2014-09-09 12:48:38
阅读次数:
254
he Himalayas
Time Limit: 2 Seconds Memory Limit: 65536 KB
As an artist, Bob usually need to travel around the world. He made a lot of sketch of scenery on his journey. A famous spot he ha...
分类:
其他好文 时间:
2014-09-09 12:48:18
阅读次数:
214