Knight Moves
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 21919
Accepted: 10223
Description
Background
Mr Somurolov, fabulous chess-gamer indeed, asse...
分类:
其他好文 时间:
2014-08-14 14:08:59
阅读次数:
229
Description
Problem B - BFS (Binary Fibonacci String)
We are familiar with the Fibonacci sequence (1, 1, 2, 3, 5, 8, ...). What if we define a similar sequence for strings? Sounds interesting? Let...
分类:
其他好文 时间:
2014-08-14 10:45:58
阅读次数:
252
Pots
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 9963
Accepted: 4179
Special Judge
Description
You are given two pots, having the volume of A and B...
分类:
其他好文 时间:
2014-08-14 01:33:57
阅读次数:
253
飞跃原野
Time Limit: 5000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
勇敢的法里奥出色的完成了任务之后,正在迅速地向自己的基地撤退。但由于后面有着一大群追兵,所以法里奥要尽快地返回基地,否则就会被敌人逮住。
终于,法里奥来到了最后的一站:泰拉希尔原野,穿过这里就可以回到基地了。然而,敌人依然紧...
分类:
其他好文 时间:
2014-08-14 01:32:37
阅读次数:
315
UVA 12130 - Summits
题目链接
题意:给定一个h * w的图,每个位置有一个值,现在要求出这个图上的峰顶有多少个。峰顶是这样定义的,有一个d值,如果一个位置是峰顶,那么它不能走到不大于该峰顶高度 - d的位置,如果满足这个条件下,并且无法走到更高的山峰,那么它就是峰顶
思路:利用贪心的策略,把所有点丢到优先队列,每次取出最高的峰值开始找,进行广搜,搜的过程中记录...
分类:
其他好文 时间:
2014-08-14 01:29:57
阅读次数:
179
题意:一共有四个方向,从’@‘出发,找能到达‘.’的个数, #是不能通过的.
策略:广搜。
这道题属于最简单的bfs了。
代码:
#include
#include
#include
using std::queue;
bool vis[25][25];
char s[25][25];
int n, m;
int ans = 0;
struct node{
int x, y;
};
no...
分类:
其他好文 时间:
2014-08-13 22:31:17
阅读次数:
301
1 /* 2 bfs搜索!要注意的是点与点的权值是不一样的哦! 3 空地到空地的步数是1, 空地到墙的步数是2(轰一炮+移过去) 4 所以用到优先队列进行对当前节点步数的更新! 5 */ 6 #include 7 #include 8 #include 9 #inc...
分类:
其他好文 时间:
2014-08-13 22:02:27
阅读次数:
218
Catch That Cow
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 46715
Accepted: 14673
Description
Farmer John has been informed of the location of a fugitiv...
分类:
其他好文 时间:
2014-08-13 19:00:57
阅读次数:
230
一道用到优先队列的BFS题目
#include
#include
#include
#include
#include
#define N 201
using namespace std;
char maze[N][N];
int a,b,anw;
bool visit[N][N];
int dir[4][2]={{0,1},{1,0},{-1,0},{0,-1}};
int sx,s...
分类:
其他好文 时间:
2014-08-13 18:57:47
阅读次数:
201
Problem Description
XQ,one of the three Sailormoon girls,is usually playing mobile games on the class.Her favorite mobile game is called “The Princess In The Wall”.Now she give you a problem about th...
分类:
其他好文 时间:
2014-08-13 18:57:07
阅读次数:
224