
搜索
linmory
头疼....太难了
展开
-
poj 1321 棋盘问题 dfs深搜
棋盘问题Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 52452Accepted: 25350Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可原创 2017-11-14 21:27:07 · 221 阅读 · 0 评论 -
全排列
1384 全排列 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注给出一个字符串S(可能有重复的字符),按照字典序从小到大,输出S包括的字符组成的所有排列。例如:S = "1312",输出为: 11231132121312311312132121132131231131123121321...原创 2018-07-17 18:15:00 · 161 阅读 · 0 评论 -
nyoj 1129 Salvation(搜索)
Salvation时间限制:1000 ms | 内存限制:65535 KB 难度:3描述 神秘瀑布镇是一个神秘的地方,那里有吸血鬼,狼人,巫师,二重身。 Klaus(吸血鬼祖先) 为了利用 Elena 的血液发展他的混血大军(吸血鬼&狼人),也来到了神秘瀑布镇。Stefan 因为深爱着 Elena ,于是 Stefan 决定去唤醒吸血鬼猎人,来解救 Ele原创 2018-05-05 16:56:33 · 185 阅读 · 0 评论 -
SGU - 518 Kidnapping(搜索dfs)
KidnappingBerland's Police has a serious problem. A foreign ambassador arrived to Berland with an important mission, and his daughter was kidnapped just from the Royal Palace! Inspired by adventures原创 2018-05-09 10:25:47 · 167 阅读 · 0 评论 -
Problem 2150 Fire Game (广搜+枚举)
Problem 2150 Fire Game Accept: 3225 Submit: 11130Time Limit: 1000 mSec Memory Limit : 32768 KB Problem DescriptionFat brother and Maze are playing a kind of special (hentai) game on an N原创 2018-04-20 15:00:43 · 153 阅读 · 0 评论 -
nyoj 1321信息战(九)——水淹七军(搜索bfs)
信息战(九)——水淹七军时间限制:1000 ms | 内存限制:65535 KB难度:3描述随着最后通牒的递出,C国的总攻也开始了,由于C国在地形上的优势,C国总司令下令采用水攻,剿灭A国最后的有生力量。地形图是一个M*N的矩阵,矩阵上每一个点都对应着当前点的高度。C国总司令将选择若干个点进行放水(放水……这个词很好很强大嘛……)。根据水往低处流的特性,假设原创 2018-01-10 21:29:41 · 462 阅读 · 0 评论 -
nyoj 202红黑树 (搜索)
红黑树时间限制:3000 ms | 内存限制:65535 KB 难度:3描述 什么是红黑树呢?顾名思义,跟枣树类似,红黑树是一种叶子是黑色果子是红色的树。。。当然,这个是我说的。。。《算法导论》上可不是这么说的:如果一个二叉查找树满足下面的红黑性质,那么则为一个红黑树。1)每个节点或是红的,或者是黑的。原创 2018-01-10 21:22:42 · 196 阅读 · 0 评论 -
nyoj-488 素数环 +nyoj -32 组合数 (搜索)
素数环时间限制:1000 ms | 内存限制:65535 KB 难度:2描述 有一个整数n,把从1到n的数字无重复的排列成环,且使每相邻两个数(包括首尾)的和都为素数,称为素数环。为了简便起见,我们规定每个素数环都从1开始。例如,下图就是6的一个素数环。输入有多组测试数据,每组输入一个n(0 如果存在满足题意叙述的素数环,从小原创 2018-01-09 20:09:38 · 238 阅读 · 0 评论 -
nyoj 21三个水杯(搜索)
三个水杯时间限制:1000 ms | 内存限制:65535 KB 难度:4描述 给出三个水杯,大小不一,并且只有最大的水杯的水是装满的,其余两个为空杯子。三个水杯之间相互倒水,并且水杯没有标识,只能根据给出的水杯体积来计算。现在要求你写出一个程序,使其输出使初始状态到达目标状态的最少次数。 输入第一行一个整数N(0 接下来每组测试数据有两行,第一行给出三个整数V原创 2018-01-16 20:49:47 · 218 阅读 · 0 评论 -
poj-1426 Find The Multiple 搜索
Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 36135 Accepted: 15096Special JudgeDescriptionGiven a positive integer n, write a program to find out a nonzero原创 2018-01-07 21:12:58 · 174 阅读 · 0 评论 -
nyoj-1100 WAJUEJI which home strong!(搜索bfs+优先队列)
WAJUEJI which home strong!时间限制:1000 ms | 内存限制:65535 KB 难度:2描述 在一个山沟里,姐弟俩同时考上了大学。但由于家里拮据,所以这并不是什么好消息。父亲对孩子说:我就是砸锅卖铁也要把你们姐俩供出来。 当时的姐姐已经决定放弃上学的机会。 没想到第二天天还没亮,弟弟就偷偷带著几件破衣服和几个乾巴馒头走了,在姐姐枕边留下一个纸条原创 2018-01-07 15:45:11 · 171 阅读 · 0 评论 -
nyoj-353 3D dungeon(搜索bfs)
3D dungeon时间限制:1000 ms | 内存限制:65535 KB 难度:2描述 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 f原创 2018-01-07 12:00:57 · 237 阅读 · 0 评论 -
nyoj284-坦克大战(搜索 bfs)
坦克大战时间限制:1000 ms | 内存限制:65535 KB 难度:3描述 Many of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on computer now. What we are discussing原创 2018-01-11 20:41:33 · 380 阅读 · 0 评论 -
珂朵莉的值域连续段
时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述珂朵莉给你一个有根树,求有多少个子树满足其内部节点编号在值域上连续一些数在值域上连续的意思即其在值域上构成一个连续的区间输入描述:第一行有一个整数n,表示树的节点数。接下来n–1行,每行两个整数x,y,表示存在一条从x到y的有向边。输入保证是一棵原创 2017-12-31 18:28:50 · 258 阅读 · 0 评论 -
CodeForces - 890A ACM ICPC
ACM ICPCIn a small but very proud high school it was decided to win ACM ICPC. This goal requires to compose as many teams of three as possible, but since there were only 6 students who wished to par原创 2017-12-02 21:17:26 · 324 阅读 · 0 评论 -
hdu 1045 Fire Net dfs深搜或者二分匹配
Fire NetTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12961 Accepted Submission(s): 7865Problem DescriptionSuppose that we ha原创 2017-11-14 21:23:15 · 231 阅读 · 0 评论 -
CodeForces - 845B Luba And The Ticket
Luba And The TicketLuba has a ticket consisting of 6 digits. In one move she can choose digit in any position and replace it with arbitrary digit. She wants to know the minimum number of digits she原创 2017-11-14 21:36:13 · 374 阅读 · 0 评论 -
poj 3278 Catch That Cow
Catch That CowTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 100270Accepted: 31366DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch原创 2017-11-14 21:31:06 · 203 阅读 · 0 评论 -
BE, GE or NE(记忆化搜索)
In a world where ordinary people cannot reach, a boy named "Koutarou" and a girl named "Sena" are playing a video game. The game system of this video game is quite unique: in the process of playing th...原创 2018-09-21 16:18:02 · 197 阅读 · 0 评论