[kuangbin]1 easy search
文章平均质量分 81
mwhybmj
这个作者很懒,什么都没留下…
展开
-
kuangbin 1B简单bfs(模板题)
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原创 2017-04-04 16:54:28 · 450 阅读 · 0 评论 -
非常可乐 HDU - 1495
大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (SInput三个整数 : S 可乐的体积 , N 和 M是两个杯子的容量,以"0 0 0"结束。Output原创 2017-05-25 20:20:01 · 1879 阅读 · 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 c原创 2017-05-26 00:00:02 · 328 阅读 · 0 评论 -
Shuffle'm Up POJ - 3087
A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each stack containing C chips.原创 2017-05-07 23:17:33 · 260 阅读 · 0 评论 -
Prime Path POJ - 3126
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a matter of s原创 2017-05-06 23:45:02 · 150 阅读 · 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原创 2017-05-14 23:41:38 · 206 阅读 · 0 评论 -
poj 1426 Find The Multiple
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原创 2017-05-04 20:20:41 · 220 阅读 · 0 评论 -
poj3279 Fliptile 好题
Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate anM × N grid (1 ≤ M ≤ 15; 1 ≤ N ≤ 1原创 2017-05-02 21:59:17 · 282 阅读 · 0 评论 -
poj3414 pots 倒水模拟
You are given two pots, having the volume of A and 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 po原创 2017-05-10 21:55:25 · 271 阅读 · 0 评论 -
春季联赛,dfs水题(思路)
Description对于n个数,从中取出m个数,如何取使得这m个数的乘积最大呢?Input第一行一个数T表示数据组数。每组输入数据共2行:第1行有2个整数n、m,1,第2行有n个整数,其中每个数的绝对值小于等于4。Output对每组数据,输出1行,为最大的乘积值。Sample Input15 51原创 2017-04-18 21:35:21 · 204 阅读 · 0 评论 -
大一春季联赛,dfs简单题(思路)
Description很不幸,你的英语考试挂了。于是你打算画很多的圈圈诅咒老师。你一共画了n个圈圈,但是由于你的功力不够,有的圈圈失效了。在这里,我们用”O”表示有用的圈圈,用”X”表示无效的圈圈。为了计算出这些圈圈诅咒的力量,规定每个连续的”O”串对力量值的贡献是其长度的平方。例如,你画出了这样的一些圈圈“OOXOOOXXOO”,连续的”O”串有”OO”, “OOO”, “OO”原创 2017-04-17 16:43:44 · 323 阅读 · 0 评论 -
C : easy BFS (have a little trap)
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原创 2017-04-04 17:38:10 · 366 阅读 · 0 评论 -
A : easy dfs
在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n 当为-1 -1时表示输入结束原创 2017-04-03 09:21:24 · 319 阅读 · 0 评论 -
Fire! UVA - 11624
https://vjudge.net/problem/UVA-11624#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;const int INF = 0x3f3f3f3f;原创 2017-05-19 21:25:15 · 472 阅读 · 0 评论