上一页 1 ··· 3 4 5 6 7
摘要: Problem Description Today is army day, but the servicemen are busy with the phalanx for the celebration of the 60th anniversary of the PRC. A phalanx 阅读全文
posted @ 2019-08-20 17:36 杰瑞与汤姆 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 最大连续子序列和最大连续子矩阵的关系与实现 求最长连续子序列的优化方法(非DP)//求最大连续子序列和与对应的开头元素和结束元素实现代码: 例子:81 -3 -5 2 6 -1 4 920 2 9 类似的是,在矩阵中求最大子矩阵的方法可以转化成一维求最大连续子序列和的方法。 将矩阵的行或列压缩。这里 阅读全文
posted @ 2019-08-20 16:37 杰瑞与汤姆 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Problem Description 自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都 阅读全文
posted @ 2019-08-19 16:46 杰瑞与汤姆 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Problem Description Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Be 阅读全文
posted @ 2019-08-18 20:09 杰瑞与汤姆 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Problem Description 欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路。现给定一个图,问是否存在欧拉回路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是节点数N ( 1 < N < 1000 )和边数M;随后的M行对应 阅读全文
posted @ 2019-08-18 10:23 杰瑞与汤姆 阅读(128) 评论(0) 推荐(0) 编辑
摘要: You are given agraph with n nodes and m directed edges. One lowercase letter is assigned to each node. We define a path'svalue as the number of the mo 阅读全文
posted @ 2019-08-17 16:45 杰瑞与汤姆 阅读(241) 评论(0) 推荐(0) 编辑
摘要: After hearing about the epidemic of obesity in the USA, Farmer John wants his cows to get more exercise, so he has committed to create a bovine marath 阅读全文
posted @ 2019-08-17 16:38 杰瑞与汤姆 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 考虑具有N(1 <= N <= 20,000)个节点的树T,其编号为1 ... N. 从树中删除任何节点会生成一个林:一个或多个树的集合。将节点的余额定义为通过从T中删除该节点而创建的林T中最大树的大小。 例如,考虑树: 删除节点4会生成两个树,其成员节点为{5}和{1,2,3,6,7}。这两棵树中 阅读全文
posted @ 2019-08-17 16:21 杰瑞与汤姆 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Problem Description Dandelion's uncle is a boss of a factory. As the spring festival is coming , he wants to distribute rewards to his workers. Now he 阅读全文
posted @ 2019-08-17 15:04 杰瑞与汤姆 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Problem Description 众所周知,度度熊喜欢各类体育活动。今天,它终于当上了梦寐以求的体育课老师。第一次课上,它发现一个有趣的事情。在上课之前,所有同学要排成一列, 假设最开始每个人有一个唯一的ID,从1到N,在排好队之后,每个同学会找出包括自己在内的前方所有同学的最小ID,作为自己 阅读全文
posted @ 2019-08-17 12:19 杰瑞与汤姆 阅读(122) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7