ACM_搜索
ITAK
这个作者很懒,什么都没留下…
展开
-
poj 3278 Catch That Cow
Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 62146 Accepted: 19460DescriptionFarmer John has been informed of the location of a fugitiv原创 2015-09-08 20:34:12 · 484 阅读 · 0 评论 -
poj 3087 Shuffle'm Up (kuangbin带你飞--简单搜索)
Shuffle'm UpTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7739 Accepted: 3559DescriptionA common pastime for poker players at a poker table is to shuf原创 2015-09-16 21:09:05 · 560 阅读 · 0 评论 -
Fire Game [kuangbin带你飞]专题一 简单搜索
点击打开链接I - Fire GameTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice FZU 2150DescriptionFat brother and Maze are play原创 2015-09-17 21:00:15 · 805 阅读 · 0 评论 -
BFS 模板 【迷宫的最短路径】
#include #include #include #include #include #include #include #include #include #include using namespace std;#define MM(a) memset(a,0,sizeof(a))typedef long long LL;typedef unsigned lo原创 2015-11-08 12:06:30 · 800 阅读 · 0 评论 -
2015 南阳 CCPC G.Ancient Go
dfs搜索原创 2015-10-27 17:24:14 · 1288 阅读 · 0 评论 -
hdu 1241 Oil Deposits
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1241 Oil DepositsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 18297 Accepted Submission(s原创 2015-08-05 14:14:13 · 488 阅读 · 0 评论 -
迷宫的最短路径 -- BFS
#include #include #include #include #include #include #include #include #include #include using namespace std;#define MM(a) memset(a,0,sizeof(a))typedef long long LL;typedef unsigned lo原创 2015-12-07 21:02:45 · 769 阅读 · 0 评论 -
FZU Problem 1919 K-way Merging sort(大数+记忆化搜索)
传送门As we all known, merge sort is an O(nlogn) comparison-based sorting algorithm. The merge sort achieves its good runtime by a divide-and-conquer strategy, namely, that of halving the list being sorte原创 2017-10-05 21:10:30 · 1299 阅读 · 0 评论 -
计蒜客 置换的玩笑(深搜)
传送门 题目大意: 小蒜头又调皮了。这一次,姐姐的实验报告惨遭毒手。姐姐的实验报告上原本记录着从 1 到 n 的序列,任意两个数字间用空格间隔。但是“坑姐”的蒜头居然把数字间的空格都给删掉了,整个数字序列变成一个长度为 1 到 100 的且首部没有空格的数字串。现在姐姐已经怒了,蒜头找你写个程序快点把试验数据复原。输入输入文件有一行,为一个字符串——被蒜头搞乱的实验数据。字符串的长度在 1 到原创 2017-11-24 20:47:00 · 1049 阅读 · 1 评论 -
UVA - 816 Abbott's Revenge (BFS求最短路并打印路径)
The 1999 World Finals Contest included a problem based on a dice maze. At the time the problemwas written, the judges were unable to discover the original source of the dice maze concept. Shortlyaft...原创 2018-10-08 20:41:37 · 400 阅读 · 0 评论 -
牛客练习赛30 C 小K的疑惑(01分类+搜索)
传送门 题目描述 众所周知,小K是一只连NOIP2018初赛都没有过的蒟蒻,所以小K很擅长dfs序+分块树,但是本题与dfs序+分块树无关。 ...原创 2018-11-08 11:09:33 · 346 阅读 · 0 评论 -
hdu 2612 Find a way (BFS)
Find a wayTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6758 Accepted Submission(s): 2253Problem DescriptionPass a year lea原创 2015-09-16 13:16:56 · 484 阅读 · 0 评论 -
poj 3414 (POTS) (BFS)
PotsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12295 Accepted: 5190 Special JudgeDescriptionYou are given two pots, having the volume of A and原创 2015-09-16 16:47:36 · 541 阅读 · 0 评论 -
hdu 1495 非常可乐(BFS)
click here ~~Problem Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以原创 2015-09-15 21:43:27 · 564 阅读 · 0 评论 -
Poj 1321 棋盘问题
click here ~~Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n 当为-1 -1时表示输入结束。 随后的n行描述了棋盘的形状:每行有n个字符,其中 # 表示棋盘区域, . 表示空白区域(数据保证不出现多余的空白行或者空白列)。 Output对于每一组数据原创 2015-08-18 22:01:08 · 698 阅读 · 0 评论 -
hdu 1258 Sum It Up
Sum It UpTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5241 Accepted Submission(s): 2733Problem DescriptionGiven a specifie原创 2015-09-07 20:00:01 · 559 阅读 · 0 评论 -
POJ 3907 Build Your Home
传送门的连接地址 题目大意:给你一个数n ,然后给出n个坐标值(二维),让你求面积; 解题思路:求叉积,注意最后取绝对值,而且还要除以2啊。。。 上代码:#include <iostream>#include <cstdio>#include <cmath>using namespace std;const int maxn=1e4+5;struct Point{ doub原创 2015-08-04 09:26:14 · 698 阅读 · 0 评论 -
hdu 1312 Red And Black
hdu 1312 的传送门Problem Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of原创 2015-08-05 18:36:46 · 799 阅读 · 0 评论 -
poj 3126 Prime Path
Prime PathTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14374 Accepted: 8112DescriptionThe ministers of the cabinet were quite upset by the message fr原创 2015-09-09 16:36:27 · 486 阅读 · 0 评论 -
hdu 1010 Tempter of the Bone
hdu 1010 的传送门The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized th原创 2015-08-05 15:24:20 · 495 阅读 · 0 评论 -
poj 1426 Find The Multiple ( dfs )
点击打开链接Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 22234 Accepted: 9128 Special JudgeDescriptionGiven a positive int原创 2015-09-09 17:02:45 · 645 阅读 · 0 评论 -
poj 3984 迷宫问题
点击打开链接迷宫问题Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11739 Accepted: 7023Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0原创 2015-09-11 11:08:06 · 578 阅读 · 0 评论 -
poj 2251 Dungeon Master(BFS)
Dungeon MasterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 21394 Accepted: 8312DescriptionYou are trapped in a 3D dungeon and need to find the quicke原创 2015-09-08 19:47:26 · 469 阅读 · 0 评论 -
UVA 11624
点击打开链接/*2015 - 09 - 14 晚上Author: ITAKMotto:今日的我要超越昨日的我,明日的我要胜过今日的我,以创作出更好的代码为目标,不断地超越自己。*/#include #include #include #include #include #include #include #include using namespac原创 2015-09-14 21:19:51 · 569 阅读 · 0 评论 -
【LeetCode】 230. Kth Smallest Element in a BST(非递归中序遍历二叉树)
因为这是一棵二叉搜索树,所以找它的第 kkk 小值,就是这棵二叉搜索树的中序遍历之后的第 kkk 个数,所以只需要将这棵树进行中序遍历即可,下面代码是非递归形式的二叉树中序遍历。代码如下:/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; *...原创 2018-11-16 16:03:12 · 233 阅读 · 0 评论