-------搜索
文章平均质量分 64
猿的进化之路
这个作者很懒,什么都没留下…
展开
-
hdu1010
http://acm.hdu.edu.cn/showproblem.php?pid=1010Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 89573 Accepted原创 2015-08-08 10:36:09 · 273 阅读 · 0 评论 -
2016多校第6场1010 --hdu5802 搜索-剪枝+贪心
Windows 10Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 754 Accepted Submission(s): 221Problem DescriptionLong long ago, th原创 2016-08-05 13:22:45 · 679 阅读 · 0 评论 -
poj 1222
http://poj.org/problem?id=1222题意:5*6矩阵中有30个灯,操作一个灯,周围的上下左右四个灯会发生相应变化 即由灭变亮,由亮变灭,如何操 作使灯全灭? EXTENDED LIGHTS OUTTime Limit: 1000MS Memory Limit: 10000K原创 2015-09-26 10:22:40 · 391 阅读 · 0 评论 -
poj2251 搜索
B - Dungeon MasterTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 2251DescriptionYou are trapped in a 3D dungeon and need t原创 2016-03-10 21:31:40 · 270 阅读 · 0 评论 -
NCPC 2015 Problem A 树的直径
NCPC 2015Problem AAdjoin the NetworksProblem ID: adjoinWikimedia, cc-by-saOne day your boss explains to you that he has abunch of computer networks that are currently unreachablefrom eac原创 2016-09-08 19:23:15 · 551 阅读 · 0 评论 -
hdu5876 补图求最短路 2016ACM ICPC 大连网络赛
Sparse GraphTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 83 Accepted Submission(s): 27Problem DescriptionIn graph theory原创 2016-09-10 20:02:16 · 1806 阅读 · 0 评论 -
Bubble Cup 9 - Finals E. 搜索
E. Paint it really, really dark graytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputI see a pink boar and I原创 2016-09-12 19:49:09 · 558 阅读 · 0 评论 -
CF 369 div 2 —D 搜索+组合数
D. Directed Roadstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZS the Coder and Chris the Baboon has exp原创 2016-09-01 20:47:56 · 553 阅读 · 0 评论 -
hdu5887 大01背包--dfs
Herbs GatheringTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 548 Accepted Submission(s): 104Problem DescriptionCollecting o原创 2016-09-19 18:36:26 · 498 阅读 · 0 评论 -
hdu5094
This story happened on the background of Star Trek. Spock, the deputy captain of Starship Enterprise, fell into Klingon’s trick and was held as prisoner on their mother planet Qo’noS. The capt原创 2016-10-21 19:11:15 · 303 阅读 · 0 评论 -
UVALive 6908 广搜
题意很有意思,给了n段路,每段路长度不同,你有一辆车最多可以提供E的能量,你的车有四个档,最多换k次档Assist Level 0 1 2 3 Assist Power 0 4 8 110档花费能量0,走的路程长度为0,1档花费1能量,走得最大路程为4.... ,每段路用一个档,如果这个档不能使你走完这段路,那么只能自己蹬,如果超过这段路长度,超过部分不计算到下一原创 2016-10-23 21:14:22 · 294 阅读 · 0 评论 -
hdu5469 树分治
B - AntonidasTime Limit:4000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 5469Appoint description: System Crawler (Oct 19, 2016 12:13:28 PM原创 2016-10-26 15:51:30 · 391 阅读 · 0 评论 -
2016 弱校联盟 二 B 题 E 题
点击打开题目链接B题题意,在一个n*m的宫殿里,公主要逃出宫殿,出口位置用%表示,@表示公主位置,$表示士兵,#表示墙,. 表示空地,士兵和公主都可以在单位时间内向相邻的格子走一步,如果公主和士兵走到了一个格子甚至是出口位置,那么公主就会被抓住,问公主能否成功逃出宫殿 这个题计算公主到达出口的时间是否小于任何一个士兵到达出口的时间就好了,但是由于士兵多,出口唯一,所以我们以出口为起点原创 2016-10-03 20:49:21 · 329 阅读 · 0 评论 -
hdu5927 好题
Auxiliary SetTime Limit: 9000/4500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 516 Accepted Submission(s): 148Problem DescriptionGiven a rooted原创 2016-10-07 18:56:37 · 641 阅读 · 0 评论 -
2016ACM亚洲赛沈阳站 E - 暴搜
Counting CliquesTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 75 Accepted Submission(s): 0Problem DescriptionA clique is a原创 2016-10-30 16:47:50 · 1637 阅读 · 0 评论 -
hdu5118,图上的推导计算
hdu5118 GRE Words Once More!Time Limit: 5000/5000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others) Total Submission(s): 265 Accepted Submission(s): 48Problem Description Now Matt i原创 2017-06-26 20:27:51 · 747 阅读 · 0 评论 -
hdu6060斯坦纳树
hdu6060 题意:给出一颗n个节点的树,要求将2-n号节点分成k部分,然后再将每一部分加上1号节点联通的最小花费,定义为每一部分的val,为其在原图上的最小斯坦纳树,问总的val最大可能是多少。把1看成整棵树的根. 问题相当于把2∼n每个点一个[1,k]的标号. 然后根据最小斯坦纳树的定义(x,fa(x) ),(x,fa(x) ) 这条边的贡献是 x 子树内不同标号的个数目dif(i)原创 2017-08-02 14:45:15 · 539 阅读 · 0 评论 -
hdu6171 双向bfs
传送门 题意:给一个金字型塔的数列,第一行一个0,第二行两个1,。。。第6行6个5,现在金字塔数字打乱了,你只能移动0这个数字,只能向左上右上左下右下走,问在20步内能否回到原来状态。 一共21个数,每个有6种状态,没办法用一个 [21][6]维的数组记录状态,所以我们要用Hash记录状态,每个位置6种状态,那么最大是6^21的数字,long long可以存的下的。我们用bfs进行搜索,给两个起原创 2017-08-25 13:25:59 · 465 阅读 · 0 评论 -
hdu5546
Ancient GoTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 799 Accepted Submission(s): 283Problem DescriptionYu Zhou likes to原创 2016-05-05 10:30:43 · 381 阅读 · 0 评论 -
CodeForces 589J ——2015-2016 ACM-ICPC, NEERC, Southern Subregional Contest
J - Cleaner RobotTime Limit:2000MS Memory Limit:524288KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 589JDescriptionMasha has recently bought a cleaner原创 2016-05-24 11:28:40 · 640 阅读 · 0 评论 -
hdu5652
India and China OriginsTime Limit: 2000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 628 Accepted Submission(s): 212Problem DescriptionA lo原创 2016-03-27 18:54:55 · 750 阅读 · 0 评论 -
hdu1198
http://acm.hdu.edu.cn/showproblem.php?pid=1198Farm IrrigationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7199 Accepted Subm原创 2015-08-09 18:06:00 · 343 阅读 · 0 评论 -
poj 3279
http://poj.org/statusFliptileTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5366 Accepted: 2038DescriptionFarmer John knows that an intelle原创 2015-09-20 16:48:31 · 441 阅读 · 0 评论 -
hdu2181C - 哈密顿绕行世界问题
http://acm.hdu.edu.cn/showproblem.php?pid=2181这是一个dfs搜索题目,难点在于剪枝,以及路径还原;下面是给出代码及其详解/*回溯方法的深度理解9->3->2->13->5->headpre[9]=3;pre[3]=2;pre[2]=13;pre[13]=5;pre[5]=head;找到头后,开始输出head,然后回溯,输出5,回原创 2015-10-24 20:21:17 · 685 阅读 · 0 评论 -
hdu2102 bfs
http://acm.hdu.edu.cn/showproblem.php?pid=2102自己的代码 就是 不A 好伤心,借鉴 大神代码一下本题是一个三 维bfs,骑士走的最近路径小于T,就能救回公主下面是ac代码#include #include #include #include using namespace std;#define inf (0x7f7f7转载 2015-10-24 17:09:06 · 382 阅读 · 0 评论 -
poj1426
http://poj.org/problem?id=1426Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 22375 Accepted: 9190 Special JudgeDescription原创 2015-09-21 17:07:52 · 741 阅读 · 0 评论 -
poj3984
http://poj.org/problem?id=3984以前做过求路径长度的题,d[ now ]=d[ from ]+1;;now 我们 要求路径,根据 距离的启示,我们把 now的坐标 和 from 的坐标联系起来;因此 ,我们 用到结构体, mp[tot ] .x = x, mp[ tot ].y= y, mp[ tot] . next =now .s原创 2015-09-23 18:10:53 · 81 阅读 · 0 评论 -
hdu5040
InstrusiveTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1564 Accepted Submission(s): 465Problem DescriptionThe legendary mercenary Soli原创 2016-03-17 10:30:59 · 703 阅读 · 1 评论 -
poj3126 bfs
http://poj.org/problem?id=3126Prime PathTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14460 Accepted: 8159DescriptionThe ministers of the原创 2015-09-23 16:23:04 · 329 阅读 · 0 评论 -
hdu1495
M - 非常可乐Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1495Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可原创 2016-03-10 21:38:34 · 584 阅读 · 0 评论 -
poj2438 哈密顿图
Children's DiningTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4429 Accepted: 637 Special JudgeDescriptionUsually children in kindergarten like to原创 2016-03-18 19:54:48 · 752 阅读 · 0 评论 -
图论1E,cf405E
Little Chris is participating in a graph cutting contest. He's a pro. The time has come to test his skills to the fullest.Chris is given a simple undirected connected graph with n vertices (numbered原创 2016-03-19 10:20:43 · 332 阅读 · 0 评论 -
dp专题1,,hdu4568
),英雄互娱(杭州)HunterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1671 Accepted Submission(s): 504Problem Description原创 2016-03-20 19:35:52 · 290 阅读 · 0 评论 -
hdu5025
Saving Tang MonkTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1889 Accepted Submission(s): 671Problem Description《Journey t原创 2016-03-22 14:45:57 · 348 阅读 · 0 评论 -
hdu2616搜索
N - Find a wayTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2612DescriptionPass a year learning in Hangzhou, yifenfei arr原创 2016-03-10 21:29:54 · 271 阅读 · 0 评论 -
uva11624
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=65959#problem/J发个题目链接吧,文章复制不成功,就是给一个二维图,# . F J ,# 表示墙,.表示路,F表示火,J表示人,二者都是每次移动一格,(上下左右),F可能会有多个,问人是否可以走出来,只要走到边就算走出来了,解决,bfs搜索,队列实现原创 2016-03-11 14:31:22 · 482 阅读 · 0 评论 -
poj3984
K - 迷宫问题Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 3984Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0,原创 2016-03-11 14:36:39 · 261 阅读 · 0 评论 -
fzu2150 搜索
I - Fire GameTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice FZU 2150DescriptionFat brother and Maze are playing a kind of specia原创 2016-03-15 14:01:56 · 368 阅读 · 0 评论 -
poj1011 dfs
传送门 汉语题不解释#include <set>#include <map>#include <stack>#include <queue>#include <math.h>#include <vector>#include <string>#include <stdio.h>#include <iostream>#include <stdlib.h>#include <str原创 2017-09-08 14:10:14 · 263 阅读 · 0 评论