![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
专题一 简单搜索
Focus5679
学生一枚
展开
-
A - 棋盘问题 POJ - 1321
A - 棋盘问题POJ - 1321 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子...原创 2018-04-13 16:57:39 · 121 阅读 · 0 评论 -
Sudoku POJ - 2676
Sudoku POJ - 2676 Sudoku 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 dig...原创 2018-04-16 19:28:52 · 182 阅读 · 0 评论 -
K - 迷宫问题 POJ - 3984
K - 迷宫问题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表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右...原创 2018-08-03 10:28:36 · 125 阅读 · 0 评论 -
L - Oil Deposits HDU - 1241
L - Oil DepositsHDU - 1241 The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and...原创 2018-04-08 21:14:06 · 152 阅读 · 0 评论 -
M - 非常可乐 HDU - 1495
M - 非常可乐HDU - 1495 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (...原创 2018-08-03 09:35:27 · 141 阅读 · 0 评论 -
H - Pots POJ - 3414
H - PotsPOJ - 3414 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; DR...原创 2018-05-19 15:09:26 · 159 阅读 · 0 评论 -
逃离迷宫 HDU - 1728
逃离迷宫 HDU - 1728 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程...原创 2018-04-15 11:46:08 · 229 阅读 · 1 评论 -
Square POJ - 2362
Square POJ - 2362 Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square?InputThe first line of input contains N, the number of test case...原创 2018-04-15 14:20:47 · 173 阅读 · 0 评论 -
F - Prime Path POJ - 3126
F - Prime PathPOJ - 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 ...原创 2018-08-01 10:13:00 · 204 阅读 · 0 评论 -
E - Find The Multiple POJ - 1426
E - Find The MultiplePOJ - 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...原创 2018-07-31 18:59:45 · 216 阅读 · 0 评论 -
J - Fire! UVA - 11624
J - Fire!UVA - 11624 Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze.Give...原创 2018-08-01 10:10:01 · 170 阅读 · 0 评论 -
D - Fliptile POJ - 3279
D - FliptilePOJ - 3279 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 an M × N g...原创 2018-07-31 17:51:29 · 209 阅读 · 0 评论 -
C - Catch That Cow POJ - 3278
C - Catch That CowPOJ - 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 c...原创 2018-07-31 16:15:09 · 136 阅读 · 0 评论 -
B - Dungeon Master POJ - 2251
B - Dungeon MasterPOJ - 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 min...原创 2018-04-06 12:43:25 · 263 阅读 · 0 评论 -
J - Welcome Party ZOJ - 4109 并查集 bfs
J - Welcome PartyZOJ - 4109此处是题面...思路:并查集分块,然后把每一块编号最小的那个人存在优先队列里,每次把此刻能进入门的人压进优先队列,按取出次序就是答案。注意:并查集par数组一定用par[i] = i初始化,否则不是爆栈就是T,别问我怎么知道的,md调了半天...AC代码//include <bits/stdc++.h&...原创 2019-05-02 15:16:01 · 116 阅读 · 0 评论