ACM- 搜索(DFS BFS)
文章平均质量分 81
free-dancer
i am growing~!
展开
-
Highways (最小生成树)
Problem DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of th原创 2017-08-07 20:52:30 · 380 阅读 · 0 评论 -
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原创 2017-06-15 09:58:14 · 545 阅读 · 0 评论 -
pots 倒水问题(bfs)
点击打开链接 Problem DescriptionYou 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原创 2017-08-05 00:21:50 · 510 阅读 · 0 评论 -
Sudoku 数独问题(dfs)
Problem 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原创 2017-08-05 00:24:27 · 344 阅读 · 0 评论 -
Children of the Candy Corn(搜索方向变化问题)(bfs)(dfs)
点击打开链接Time Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 67 Accepted Submission(s) : 25Problem DescriptionThe cornfield maze is a popular原创 2017-08-05 00:27:42 · 273 阅读 · 0 评论 -
Prime Path 变素数问题(bfs)
点击打开链接//变 素数问题 广搜也要记得标记 ,要不然重复的元素会压到队列 筛素数 Problem DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to原创 2017-08-05 00:31:48 · 410 阅读 · 0 评论 -
Dungeon Master 三维搜索(bfs)
点击打开链接Problem DescriptionYou 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原创 2017-08-05 00:35:31 · 397 阅读 · 0 评论 -
Curling 2.0 推冰球问题(dfs)
Problem 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原创 2017-08-05 17:17:55 · 531 阅读 · 0 评论 -
Network Saboteur(dfs)
Problem Description 点击打开链接A university network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the network into two原创 2017-08-05 17:35:31 · 366 阅读 · 0 评论 -
Channel Allocation (涂颜色)(dfs)
点击打开链接Problem DescriptionWhen a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that every receiver has a strong signal. However, the c原创 2017-08-05 17:40:16 · 343 阅读 · 0 评论 -
搜索-O - 切绳子问题(二分)
//题意:有n条绳子,分成k段相等的,问能使得最长为多长思路:经典二分 输入n 段绳子的完了之后,计算 k段平均长度,在0-sum/k, 之间二分,如果分的绳子多余k 段的话,说明绳子太短了,需要调整二分区间。还有 这个题的输入输出 要用c 的方法。(keng) #if 0#include#include#include#define exp 1e-8 using原创 2017-05-25 08:50:09 · 2760 阅读 · 0 评论 -
搜索 D - 棋盘问题(dfs)
Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子原创 2017-05-20 09:44:27 · 530 阅读 · 0 评论 -
搜索 P - 入门地图题(dfs)
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 grid原创 2017-05-18 17:31:05 · 590 阅读 · 0 评论 -
搜索 Q - 素数环(dfs)
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.N原创 2017-05-18 09:35:22 · 329 阅读 · 0 评论 -
搜索 H - n的 0/1倍数(bfs)(dfs)
DescriptionGiven 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 tha原创 2017-05-18 09:21:53 · 486 阅读 · 0 评论 -
搜索 G - 农民追牛问题(bfs)
DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN (0 ≤ N ≤ 100,000) on a number line and the cow is at a point原创 2017-05-18 09:04:55 · 841 阅读 · 0 评论 -
Satellite Photographs(dfs)
Farmer John purchased satellite photos of W x H pixels of his farm (1 <= W <= 80, 1 <= H <= 1000) and wishes to determine the largest 'contiguous' (connected) pasture. Pastures are contiguous when any原创 2017-08-10 22:39:30 · 633 阅读 · 0 评论 -
Shredding Company
Problem Description点击打开链接You have just been put in charge of developing a new shredder for the Shredding Company Although a "normal" shredder would just shred sheets of paper into little pieces so原创 2017-08-09 20:41:39 · 245 阅读 · 0 评论 -
搜索 B - 跳马问题(dfs)
DescriptionBackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journeyaround the world. Whenever a knight moves, it is原创 2017-05-29 13:03:14 · 1333 阅读 · 0 评论