搜索
faithdmc
这个作者很懒,什么都没留下…
展开
-
Curling 2.0(DFS)
DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a squa原创 2014-01-28 20:30:36 · 1722 阅读 · 0 评论 -
HDU-1685-Booksort(IDA*)
Problem DescriptionThe Leiden University Library has millions of books. When a student wants to borrow a certain book, he usually submits an online loan form. If the book is available, then the next原创 2014-08-11 14:18:07 · 1362 阅读 · 0 评论 -
HDU-3309-Roll The Cube(BFS)
Problem DescriptionThis is a simple game.The goal of the game is to roll two balls to two holes each.'B' -- ball'H' -- hole'.' -- land'*' -- wallRemember when a ball rolls into a hole, the原创 2014-08-11 20:52:22 · 765 阅读 · 0 评论 -
HDU-5040-Instrusive(BFS+优先队列)
Problem DescriptionThe legendary mercenary Solid Matt gets a classic mission: infiltrate a military base.The military base can be seen as an N * N grid. Matt's target is in one of the grids an原创 2014-09-21 17:49:09 · 2114 阅读 · 0 评论 -
HDU-1195-Open the Lock(BFS)
Problem DescriptionNow an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9.Each time, you can add or minus 1 to any原创 2014-08-13 14:24:29 · 635 阅读 · 0 评论 -
HDU-3295-An interesting mobile game(BFS+DFS)
Problem DescriptionXQ,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 16:36:18 · 1694 阅读 · 0 评论 -
HDU-2437-Jerboas(BFS+优先队列)
Problem Description Jerboas are small desert-living animals, which resemble mice with a long tufted tail and very long hind legs. Jerboas shelter in well-hidden burrows. They create two types o原创 2014-08-13 09:43:44 · 1229 阅读 · 0 评论 -
HDU-2102-A计划(BFS+优先队列)
Problem Description可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定能将她救出。现据密探所报,公主被关在一个两层的迷宫里,迷宫的入口是S(0,0,0),公主的位原创 2014-08-13 10:51:11 · 576 阅读 · 0 评论 -
HDU-3533-Escape(BFS)
Problem DescriptionThe students of the HEU are maneuvering for their military training.The red army and the blue army are at war today. The blue army finds that Little A is the spy of the red ar原创 2014-08-27 17:01:13 · 1251 阅读 · 0 评论 -
HDU-3681-Prison Break(BFS+状压DP+二分)
Problem DescriptionRompire is a robot kingdom and a lot of robots live there peacefully. But one day, the king of Rompire was captured by human beings. His thinking circuit was changed by human an原创 2014-08-28 10:55:06 · 1468 阅读 · 0 评论 -
HDU-3085-Nightmare Ⅱ(双向BFS)
Problem DescriptionLast night, little erriyue had a horrible nightmare. He dreamed that he and his girl friend were trapped in a big maze separately. More terribly, there are two ghosts in the maz原创 2014-08-27 21:19:10 · 1789 阅读 · 0 评论 -
HDU-2259-Continuous Same Game (2)(BFS+DFS+模拟)
Problem DescriptionAfter repeated attempts, LL finds the greedy strategy is very awful in practice. Even there is no apparent evidence to proof it is better than a random one. So he has to drop th原创 2014-09-02 10:48:26 · 1265 阅读 · 0 评论 -
HDU-2258-Continuous Same Game (1)(DFS+模拟)
Problem DescriptionContinuous Same Game is a simple game played on a grid of colored blocks. Groups of two or more connected (orthogonally, not diagonally) blocks that are the same color may be remo原创 2014-08-13 21:15:01 · 852 阅读 · 2 评论 -
UVA-10603-Fill(BFS+优先队列)
There are three jugs with a volume of a, b and c liters. (a, b, and c are positive integers not greater than 200). The first and the second jug are initially empty, while the thirdis completely fill原创 2014-09-02 22:25:50 · 1325 阅读 · 0 评论 -
UVALive-6665-Dragons Cruller(BFS+Hash)
题目在此思路:很经典的搜索。时间比较紧,用map会T。hash函数用了 康托展开。#include #include #define INF 99999999using namespace std;struct S{int pos,mp[9],step;bool operator<(const S &p) const{ return step>p.s原创 2014-09-26 22:19:03 · 1005 阅读 · 0 评论 -
UVALive-6485-Electric Car Rally(BFS)
题目:点击打开链接思路:对于当前位置的每一个时间段都要走一遍(除了那些需要的时间比最大允许的时间还大的),用 整形 vis[当前位置][剩余油量] 标记。#include #include #include #define INF 999999999using namespace std;struct S{int pos,time,remain;bool原创 2014-10-06 10:45:07 · 1177 阅读 · 0 评论 -
HDU-5031-Lines(DFS)
Problem DescriptionYou play a game with your friend. He draws several lines on the paper with n×m square grids (see the left figure). After that, he writes down the number of lines passing through原创 2014-09-20 23:47:34 · 2236 阅读 · 3 评论 -
HDU-5077-NAND(DFS+打表)
Problem DescriptionXiaoqiang entered the “shortest code” challenge organized by some self-claimed astrologists. He was given a boolean function taking n inputs (in C++):bool f(bool x1, bool x2,原创 2014-10-25 16:58:50 · 1725 阅读 · 0 评论 -
HDU-1067-Gap(BFS+HASH)
Problem DescriptionLet's play a card game called Gap. You have 28 cards labeled with two-digit numbers. The first digit (from 1 to 4) represents the suit of the card, and the second digit (from 1原创 2014-08-12 09:42:09 · 1179 阅读 · 0 评论 -
HDU-5025-Saving Tang Monk(BFS+优先队列)
Problem Description《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Cheng'en during the Ming Dynasty. In this novel, Monke原创 2014-09-20 18:48:10 · 1776 阅读 · 0 评论 -
Prime Ring Problem(回溯)
Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.原创 2014-01-30 20:08:38 · 1143 阅读 · 0 评论 -
Sudoku(DFS)
DescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1原创 2014-01-26 01:08:39 · 1529 阅读 · 0 评论 -
Plato's Blocks(DFS+模拟)
DescriptionPlato believed what we perceive is but a shadow of reality. Recent archaeological excavations have uncovered evidence that this belief may have been encouraged by Plato's youthful amuse原创 2014-01-26 17:21:39 · 1721 阅读 · 2 评论 -
POJ 3669-Meteor Shower(BFS)
DescriptionBessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they hit. Anxious for her safety, she vows to find原创 2014-02-10 12:22:45 · 1729 阅读 · 2 评论 -
Knight Moves(BFS)
Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n原创 2014-01-27 23:51:12 · 1091 阅读 · 0 评论 -
HDU-1728-逃离迷宫(BFS)
Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,原创 2014-02-28 10:26:25 · 1221 阅读 · 2 评论 -
POJ-1324-Holedox Moving(BFS)
DescriptionDuring winter, the most hungry and severe time, Holedox sleeps in its lair. When spring comes, Holedox wakes up, moves to the exit of its lair, comes out, and begins its new life. Hol原创 2014-07-06 08:11:31 · 1216 阅读 · 0 评论 -
POJ-1475-Pushing Boxes(BFS)
DescriptionImagine you are standing inside a two-dimensional maze composed of square cells which may or may not be filled with rock. You can move north, south, east or west one cell at a step. T原创 2014-07-06 08:00:33 · 1542 阅读 · 0 评论 -
POJ-3131-Cubic Eight-Puzzle(双向BFS+哈希)
DescriptionLet’s play a puzzle using eight cubes placed on a 3 × 3 board leaving one empty square.Faces of cubes are painted with three colors. As a puzzle step, you can roll one of the cubes原创 2014-07-06 08:31:40 · 1837 阅读 · 1 评论 -
POJ-3134-Power Calculus(迭代加深DFS)
DescriptionStarting with x and repeatedly multiplying by x, we can compute x31 with thirty multiplications:x2 = x × x, x3 = x2 × x, x4 = x3 × x, …, x31 = x30 × x.The operation of squarin原创 2014-07-09 08:36:31 · 1934 阅读 · 0 评论 -
HDU-3502-Huson's Adventure Island(BFS+状压DP)
Problem DescriptionA few days ago, Tom was tired of all the PC-games, so he went back to some old FC-games. "Hudson's Adventure Island" was his favorite which he had played thousands of times. But t原创 2014-08-01 10:15:46 · 864 阅读 · 0 评论 -
HDU-4643-GSM(DFS)
Problem DescriptionXiao Ming is traveling around several cities by train. And the time on the train is very boring, so Xiao Ming will use the mobile Internet. We all know that mobile phone receives原创 2014-07-10 22:02:22 · 754 阅读 · 1 评论 -
HDU-2128-Tempter of the Bone II(BFS)
Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze was changed and the way he came in was lost.He realized that the bo原创 2014-08-02 21:31:42 · 1026 阅读 · 0 评论 -
HDU-2821-Pusher(DFS)
Problem DescriptionPusherBoy is an online game http://www.hacker.org/push . There is an R * C grid, and there are piles of blocks on some positions. The goal is to clear the blocks by pushing into t原创 2014-08-02 23:00:57 · 1177 阅读 · 0 评论 -
HDU-3839-Ancient Messages(DFS)
Problem DescriptionIn order to understand early civilizations, archaeologists often study texts written in ancient languages. One such language, used in Egypt more than 3000 years ago, is based on c原创 2014-08-04 10:01:03 · 1428 阅读 · 1 评论 -
HDU-1664-Different Digits(BFS)
Problem DescriptionGiven a positive integer n, your task is to find a positive integer m, which is a multiple of n, and that m contains the least number of different digits when represented in decim原创 2014-07-30 14:27:46 · 930 阅读 · 0 评论 -
HDU-4924-Football Manager(DFS+DP)
Problem DescriptionFootball Manager is a series of football management simulation games developed by Sports Interactive and published by Sega. In this game, you will play a role of a football club m原创 2014-08-10 21:51:59 · 1151 阅读 · 0 评论 -
ZOJ-3652-Maze(BFS)
Celica is a brave person and believer of a God in the bright side. He always fights against the monsters that endanger humans. One day, he is asked to go through a maze to do a important task.The ma原创 2014-10-26 23:02:33 · 1080 阅读 · 0 评论