上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页
摘要: Problem Description The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecuti 阅读全文
posted @ 2017-06-07 20:00 QYP_2002 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Problem Description Many geometry(几何)problems were designed in the ACM/ICPC. And now, I also prepare a geometry problem for this final exam. According 阅读全文
posted @ 2017-06-06 11:16 QYP_2002 阅读(155) 评论(0) 推荐(1) 编辑
摘要: Problem Description “ 改革春风吹满地,不会AC没关系;实在不行回老家,还有一亩三分地。谢谢!(乐队奏乐)”话说部分学生心态极好,每天就知道游戏,这次考试如此简单的题目,也是云里雾里,而且,还竟然来这么几句打油诗。好呀,老师的责任就是帮你解决问题,既然想种田,那就分你一块。这块田 阅读全文
posted @ 2017-06-06 08:38 QYP_2002 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Description Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - their child John never puts his 阅读全文
posted @ 2017-06-06 07:43 QYP_2002 阅读(165) 评论(0) 推荐(0) 编辑
摘要: zhan.jiang.ou now faced a tough problem,his english teacher quan.hong.chun gives him a string,which consists with n lower case letter,he must figure o 阅读全文
posted @ 2017-06-05 21:02 QYP_2002 阅读(150) 评论(0) 推荐(0) 编辑
摘要: }一般的,我们在字符串最后补个0,使排名从1开始。 后缀数组技巧: ①.对于可重复的最长重复子串问题,可以直接遍历height[1..n],易知排名相邻的字符串最相似。 ②.对于不可重复的最长重复子串问题,可以二分答案,遍历height[1..n]分组: 每组大于mid,若碰到一个小于mid的更新。 阅读全文
posted @ 2017-05-31 14:19 QYP_2002 阅读(384) 评论(4) 推荐(3) 编辑
摘要: Description 花匠栋栋种了一排花,每株花都有自己的高度。花儿越长越大,也越来越挤。栋栋决定把这排中的一部分花移走,将剩下的留在原地,使得剩下的花能有空间长大,同时,栋栋希望剩下的花排列得比较别致。 具体而言,栋栋的花的高度可以看成一列整数h1, h2, … , hn。设当一部分花被移走后, 阅读全文
posted @ 2017-05-31 00:34 QYP_2002 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 【题目描述】 思路{直接最大生成树+树链剖分即可。} 阅读全文
posted @ 2017-05-27 23:58 QYP_2002 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 【题目描述】 思路{ 首先贪心地想,应该是小怼小,大怼大。即A(i)<=A(i+1),B(i)<=B(i+1),这是排序不等式 证明它,我们需要使用和式恒等变换(感谢朱峰昊(朱哥)的大力支持){ 设A(i)<=A(i+1),B(i)<=B(i+1),证明: ∑A(i)*B(i)(顺序和) >=∑A( 阅读全文
posted @ 2017-05-24 13:14 QYP_2002 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Description H 国有 n 个城市,这 n 个城市用 n-1 条双向道路相互连通构成一棵树, 1 号城市是首都, 也是树中的根节点。 H 国的首都爆发了一种危害性极高的传染病。当局为了控制疫情,不让疫情扩散到边境 城市(叶子节点所表示的城市),决定动用军队在一些城市建立检查点,使得从首都到 阅读全文
posted @ 2017-05-20 11:04 QYP_2002 阅读(217) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页