![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dfs
Dreamlandzxx
这个作者很懒,什么都没留下…
展开
-
NYOJ 素数环(回溯法dfs)
素数环 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描述 有一个整数n,把从1到n的数字无重复的排列成环,且使每相邻两个数(包括首尾)的和都为素数,称为素数环。 为了简便起见,我们规定每个素数环都从1开始。例如,下图就是6的一个素数环。 输入有多组测试数据,每组输入一个n(0 输出每组第一行输出对应的Case序号原创 2016-09-21 21:49:09 · 731 阅读 · 0 评论 -
NYOJ 927 The partial sum problem
The partial sum problem 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描述One day,Tom’s girlfriend give him an array A which contains N integers and asked him:Can you choose some integers from the N原创 2016-10-24 21:45:03 · 413 阅读 · 0 评论 -
NYOJ 1058 部分和问题
部分和问题 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描述给定整数a1、a2、.......an,判断是否可以从中选出若干数,使它们的和恰好为K。 输入首先,n和k,n表示数的个数,k表示数的和。 接着一行n个数。 (1 输出如果和恰好可以为k,输出“YES”,并按输入顺序依次输出是由哪几个数的和组成,否则“NO” 样例输入原创 2016-10-24 21:54:23 · 388 阅读 · 0 评论 -
POJ 1321 棋盘问题(dfs深搜)
D - 棋盘问题 Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%lld & %llu Submit Status Practice POJ 1321 Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋原创 2016-11-06 21:01:55 · 438 阅读 · 0 评论 -
Codeforces Round #390 (Div. 2) B. Ilya and tic-tac-toe game(dfs)
B. Ilya and tic-tac-toe game time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Ilya is an experienced player in tic-tac原创 2017-01-12 19:08:16 · 589 阅读 · 0 评论 -
HDU - 5423 Rikka with Tree
As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: For a tree TT, let F(T,i)F(T,i) be the distance b原创 2017-04-12 16:24:08 · 387 阅读 · 0 评论 -
HDOJ 1010 Tempter of the Bone(dfs)
Tempter of the Bone Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 119511 Accepted Submission(s): 32287 Problem Description T原创 2017-04-13 11:05:47 · 340 阅读 · 0 评论 -
E - GirlCat
As a cute girl, Kotori likes playing ``Hide and Seek'' with cats particularly. Under the influence of Kotori, many girls and cats are playing ``Hide and Seek'' together. Koroti shots a photo. The原创 2017-04-19 21:20:24 · 741 阅读 · 0 评论 -
Fire Net HDU - 1045
Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall. A blockhouse is a small castle原创 2017-04-26 14:06:44 · 483 阅读 · 0 评论