油田问题,有点像图像处理里的区域生长问题,找油田块数。BFS,DFS都可以。 1 /*BFS*/ 2 #include 3 #include 4 const int maxn=100+5,maxm=1000; 5 int m,n,vis[maxn][maxn],mat[maxn][maxn],dir...
分类:
其他好文 时间:
2014-07-18 16:19:41
阅读次数:
267
K - Kinds of Fuwas Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluDescriptionIn the year 2008, the 29th Olympic Games will be held ...
分类:
其他好文 时间:
2014-07-18 00:19:24
阅读次数:
357
E - Easy TaskDescriptionCalculating the derivation of a polynomial is an easy task. Given a function f(x) , we use (f(x))' to denote its derivation. W...
分类:
其他好文 时间:
2014-07-18 00:15:29
阅读次数:
262
F - Faster, Higher, Stronger Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit Status Practice ZOJ 2970DescriptionIn the year 2...
分类:
其他好文 时间:
2014-07-18 00:05:06
阅读次数:
253
A - Accurately Say "CocaCola"!DescriptionIn a party held by CocaCola company, several students stand in a circle and play a game.One of them...
分类:
其他好文 时间:
2014-07-18 00:01:04
阅读次数:
239
Children of the Candy Corn
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 9311
Accepted: 4039
Description
The cornfield maze is a popular Hallowee...
分类:
其他好文 时间:
2014-07-17 21:09:46
阅读次数:
319
题意:这题从二维空间扩展到三维空间了,可以上下左右前后移动,每次都只能移到相邻的空位,
每次需要花费一分钟,求从起点到终点最少要多久
#表示岩石,.表示空位,S是起点,E是终点...
分类:
其他好文 时间:
2014-07-17 19:20:47
阅读次数:
237
简单搜索
直接代码:
#include
#include
#include
#include
using namespace std;
char a,c;
int e,f;
int dx[8] = {-2, -2, -1, -1, 1, 1, 2, 2};
int dy[8] = {-1, 1, -2, 2, -2, 2, -1, 1};
int qq[9][9];
struct node
{...
分类:
其他好文 时间:
2014-07-17 19:05:30
阅读次数:
265
其实就是枚举最高点和起点,然后以最高点为源点在两张图上分别做spfa。一遍最短路,一遍最长路。暴露出来的问题:思维不够清晰,代码能力还不够#include #include #include #include #include #include #include #include #include ...
分类:
其他好文 时间:
2014-07-17 18:16:43
阅读次数:
206
这题要用BFS去做,要注意的是’x‘,这里可以有优先队列去做,会很简单;另一个要注意的是,a只有一个,r可能有很多个,所以可以用a去找最接近的r;#include #include #include "string.h"using namespace std;struct step{ int x,y...
分类:
其他好文 时间:
2014-07-17 18:13:36
阅读次数:
180