随笔分类 -  5-2-搜索-DFS

1
摘要:又是一年计蒜客,沙雕ACMer欢乐多 热心市民yzm10按捺不住冲动,在期末期间又打了一场比赛。 赛点:204(与罚时惊人的相似) 做完两题排在一百多名,以为稳了(其实后面做不动了)比到一半就开始挂机。。 吃完饭回来一看,这名次掉得有点狠啊。。好在是有惊无险地守在前400了 不管怎么说,总算是弥补了 阅读全文
posted @ 2019-06-16 19:30 yzm10 阅读(401) 评论(0) 推荐(0)
摘要:P3379 【模板】最近公共祖先(LCA) 题目描述 如题,给定一棵有根多叉树,请求出指定两个点直接最近的公共祖先。 输入输出格式 输入格式: 第一行包含三个正整数N、M、S,分别表示树的结点个数、询问的个数和树根结点的序号。 接下来N-1行每行包含两个正整数x、y,表示x结点和y结点之间有一条直接 阅读全文
posted @ 2018-10-04 22:15 yzm10 阅读(272) 评论(0) 推荐(0)
摘要:题目2 : Tomb Raider 题目2 : Tomb Raider 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 Lara Croft, the fiercely independent daughter of a missing adventurer, must 阅读全文
posted @ 2018-09-22 19:09 yzm10 阅读(381) 评论(0) 推荐(0)
摘要:BE, GE or NE 23.58% 1000ms 262144K In a world where ordinary people cannot reach, a boy named "Koutarou" and a girl named "Sena" are playing a video g 阅读全文
posted @ 2018-09-12 17:04 yzm10 阅读(317) 评论(0) 推荐(0)
摘要:Rikka with Nash Equilibrium Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1460 Accepted Subm 阅读全文
posted @ 2018-08-22 00:06 yzm10 阅读(280) 评论(0) 推荐(0)
摘要:Herbs Gathering 10.76% 1000ms 32768K Collecting one's own plants for use as herbal medicines is perhaps one of the most self-empowering things a perso 阅读全文
posted @ 2018-08-14 19:36 yzm10 阅读(182) 评论(0) 推荐(0)
摘要:Problem J. Let Sudoku Rotate Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0 Accepted Submiss 阅读全文
posted @ 2018-08-01 18:45 yzm10 阅读(368) 评论(0) 推荐(0)
摘要:FatMouse and Cheese FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is label 阅读全文
posted @ 2018-07-24 20:07 yzm10 阅读(187) 评论(0) 推荐(0)
摘要:Fibonacci-ish Yash has recently learnt about the Fibonacci sequence and is very excited about it. He calls a sequence Fibonacci-ish if You are given s 阅读全文
posted @ 2018-04-05 22:23 yzm10 阅读(267) 评论(0) 推荐(0)
摘要:1607: 正则问题 题目描述 考虑一种简单的正则表达式:只由 x ( ) | 组成的正则表达式。小明想求出这个正则表达式能接受的最长字符串的长度。 例如 ((xx|xxx)x|(x|xx))xx 能接受的最长字符串是: xxxxxx,长度是6。 输入 一个由x()|组成的正则表达式。输入长度不超过 阅读全文
posted @ 2018-03-28 21:14 yzm10 阅读(927) 评论(0) 推荐(0)
摘要:算法训练 2的次幂表示 问题描述 任何一个正整数都可以用2进制表示,例如:137的2进制表示为10001001。 将这种2进制表示写成2的次幂的和的形式,令次幂高的排在前面,可得到如下表达式:137=2^7+2^3+2^0 现在约定幂次用括号来表示,即a^b表示为a(b) 此时,137可表示为:2( 阅读全文
posted @ 2018-03-12 19:50 yzm10 阅读(248) 评论(0) 推荐(0)
摘要:问题 D: 蛇形填数 题目描述 在n*n方阵里填入1,2,...,n*n,要求填成蛇形。例如n=4时方阵为:10 11 12 19 16 13 28 15 14 37 6 5 4 输入 直接输入方阵的维数,即n的值。(n<=100) 输出 输出结果是蛇形方阵。 样例输入 样例输出 阅读全文
posted @ 2017-07-29 23:16 yzm10 阅读(274) 评论(0) 推荐(0)
摘要:C. Garland time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Once at New Year Dima had a d 阅读全文
posted @ 2017-07-29 22:45 yzm10 阅读(281) 评论(0) 推荐(0)
摘要:哈密顿绕行世界问题 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4844 Accepted Submission(s): 2909 Probl 阅读全文
posted @ 2017-07-28 21:32 yzm10 阅读(297) 评论(0) 推荐(0)
摘要:棋盘问题 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 47960 Accepted: 23210 Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋 阅读全文
posted @ 2017-07-28 21:14 yzm10 阅读(267) 评论(0) 推荐(0)
摘要:C. The Tag Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice got tired of playing the tag 阅读全文
posted @ 2017-07-27 22:48 yzm10 阅读(239) 评论(0) 推荐(1)
摘要:Sudoku 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 t 阅读全文
posted @ 2017-07-27 16:03 yzm10 阅读(214) 评论(0) 推荐(1)
摘要:Tempter of the Bone Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Tempter of the Bone Description The doggie found a bone in an 阅读全文
posted @ 2017-07-27 00:18 yzm10 阅读(221) 评论(0) 推荐(0)
摘要:Prime Ring Problem A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of num 阅读全文
posted @ 2017-07-24 20:30 yzm10 阅读(233) 评论(0) 推荐(0)
摘要:Oil Deposits The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangul 阅读全文
posted @ 2017-07-24 20:15 yzm10 阅读(207) 评论(0) 推荐(0)

1