
搜索
文章平均质量分 72
WA你离我远点
加油加油!!!up up up!!!
展开
-
数据结构实验之栈与队列十:走迷宫
数据结构实验之栈与队列十:走迷宫Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit StatisticProblem Description一个由n * m 个格子组成的迷宫,起点是(1, 1), 终点是(n, m),每次可以向上下左右四个方向任意走一步,并且有些格子是不能走动,求从起点到终点经过每个格子至多一次的走法数。Inpu...翻译 2018-08-10 10:03:10 · 195 阅读 · 0 评论 -
Catch That Cow POJ - 3278
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,0...原创 2018-08-24 10:50:30 · 113 阅读 · 0 评论 -
非常可乐 HDU - 1495
大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (都是没有刻度的,且 S==N+M,101>S>...翻译 2018-08-24 10:22:54 · 101 阅读 · 0 评论 -
Oil Deposits
Problem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a...翻译 2018-08-24 09:27:13 · 155 阅读 · 0 评论 -
迷宫问题 POJ - 3984
定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 ×...翻译 2018-08-24 08:52:45 · 162 阅读 · 0 评论 -
Fire Game FZU - 2150
Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this board is consisting of grass or just empty and then they start...翻译 2018-08-20 20:03:49 · 193 阅读 · 0 评论 -
Find a way HDU - 2612
Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki. Yifenfei’s home is at the co...翻译 2018-08-22 20:45:28 · 131 阅读 · 0 评论 -
Pots POJ - 3414
You are given two pots, having the volume of Aand B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap; DROP(i) empty the pot...原创 2018-08-22 09:40:38 · 269 阅读 · 0 评论 -
Find The Multiple POJ - 1426
Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there...翻译 2018-08-18 21:27:04 · 156 阅读 · 0 评论 -
Least Crucial Node UVALive - 7456
AC代码(找与k联通的点最少的那个node, dfs)Select Code#include <iostream>#include <bits/stdc++.h>#define maxn 0x3f3f3f3fusing namespace std;int mp[120][120];int vis[120];int n, m, k, ans;...翻译 2018-08-18 19:55:05 · 124 阅读 · 0 评论 -
找朋友 Time Limit: 1000 ms Memory Limit: 65536 KiB
Problem DescriptionX,作为户外运动的忠实爱好者,总是不想呆在家里。现在,他想把死宅Y从家里拉出来。问从X的家到Y的家的最短时间是多少。为了简化问题,我们把地图抽象为n*m的矩阵,行编号从上到下为1 到 n,列编号从左到右为1 到 m。矩阵中’X’表示X所在的初始坐标,’Y’表示Y的位置 , ’#’表示当前位置不能走,’ * ’表示当前位置可以通行。X每次只能向上下左右的...原创 2018-08-13 20:53:48 · 227 阅读 · 0 评论 -
Dungeon Master OpenJ_Bailian - 2251
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south...原创 2018-08-18 10:40:07 · 128 阅读 · 0 评论 -
棋盘问题 POJ - 1321
在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n...翻译 2018-08-18 08:56:56 · 143 阅读 · 0 评论 -
Catch That Cow Time Limit: 2000 ms Memory Limit: 65536 KiB
Problem DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a p...翻译 2018-08-11 10:21:33 · 174 阅读 · 0 评论 -
团战可以输、提莫必须死 Time Limit: 1000 ms Memory Limit: 65536 KiB
Problem Description 为了一些你们不知道的原因,我们把LOL的地图抽象为一个n×m的矩阵 提莫积攒了k个蘑菇准备种到地图上去,因为提莫的背篓漏了,所以每一个提莫走过的地方都会被摆下一个蘑菇,两个蘑菇同时种在一个地方的话就会爆炸,所以一旦即将出现这种情况,提莫会直接传送回家,防止自己被炸死 之前的排位赛中因为乱种蘑菇提莫已经被骂了好...翻译 2018-08-11 09:11:07 · 414 阅读 · 0 评论 -
数据结构实验之图论三:判断可达性 Time Limit: 1000 ms Memory Limit: 65536 KiB
StatisticProblem Description 在古老的魔兽传说中,有两个军团,一个叫天灾,一个叫近卫。在他们所在的地域,有n个隘口,编号为1..n,某些隘口之间是有通道连接的。其中近卫军团在1号隘口,天灾军团在n号隘口。某一天,天灾军团的领袖巫妖王决定派兵攻打近卫军团,天灾军团的部队如此庞大,甚至可以填江过河。但是巫妖王不想付出不必要的代价,他想知道在不修建任何通道的前提下,...原创 2018-08-10 10:08:56 · 1161 阅读 · 0 评论 -
数据结构实验之图论五:从起始点到目标点的最短步数(BFS) Time Limit: 1000 ms Memory Limit: 65536 KiB
Problem Description 在古老的魔兽传说中,有两个军团,一个叫天灾,一个叫近卫。在他们所在的地域,有n个隘口,编号为1..n,某些隘口之间是有通道连接的。其中近卫军团在1号隘口,天灾军团在n号隘口。某一天,天灾军团的领袖巫妖王决定派兵攻打近卫军团,天灾军团的部队如此庞大,甚至可以填江过河。但是巫妖王不想付出不必要的代价,他想知道在不修建任何通道的前提下,部队是否可以通过隘口及其...转载 2018-08-10 10:06:32 · 136 阅读 · 0 评论 -
深度优先搜索练习之神奇的矩环 Time Limit: 1000 ms Memory Limit: 65536 KiB
Problem Description小鑫的女朋友被魔王抢走了!魔王留给小鑫一张n*m大的表,上面有各种各样的颜色,用A-Z这26个字母来表示。魔王留给他一个任务,如果小鑫可以在这张表中找出任意一个长度大于1的环,并且这个环的颜色是相同的,魔王就把小鑫的女朋友还给他。为了从魔王手中夺回他的女朋友,小鑫请你帮忙,你能帮帮他吗?Input多组输入。每组的第一行有两个整数n,m。代表表的...翻译 2018-08-10 10:05:10 · 475 阅读 · 0 评论 -
单源最大权路径 CSU - 1960
有一棵由N个结点构成的树,每一条边上都有其对应的权值。现在给定起点,求从该点出发的一条路径(至少有一条边)使得这条路径上的权值之和最大,并输出这个最大值。Input第一行一个正整数T,代表数据组数。每组数据第一行两个正整数n(2<=n<=10^5),s(1<=s<=n),分别表示树结点数目以及给定的起点,点的编号从1至N。接下来M行,每行三个整数x,y,z,(1&l...翻译 2018-09-06 10:39:52 · 149 阅读 · 0 评论