2017年10月7日
摘要: Problem Description 度熊所居住的 D 国,是一个完全尊重人权的国度。以至于这个国家的所有人命名自己的名字都非常奇怪。一个人的名字由若干个字符组成,同样的,这些字符的全排列的结果中的每一个字符串,也都是这个人的名字。例如,如果一个人名字是 ACM,那么 AMC, CAM, MAC, 阅读全文
posted @ 2017-10-07 09:23 Lslsa 阅读(89) 评论(0) 推荐(0) 编辑
2017年8月12日
摘要: Description There is a string S.S only contain lower case English character.(10≤length(S)≤1,000,000)How many substrings there are that contain at leas 阅读全文
posted @ 2017-08-12 17:03 Lslsa 阅读(167) 评论(2) 推荐(0) 编辑
2017年8月11日
摘要: Description 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 fille 阅读全文
posted @ 2017-08-11 09:59 Lslsa 阅读(114) 评论(0) 推荐(0) 编辑
2017年8月8日
摘要: Description Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and r 阅读全文
posted @ 2017-08-08 22:36 Lslsa 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Description The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A 阅读全文
posted @ 2017-08-08 09:42 Lslsa 阅读(82) 评论(0) 推荐(0) 编辑
2017年8月7日
摘要: Description Given n points (1 dimensional) and q segments, you have to find the number of points that lie in each of the segments. A point pi will lie 阅读全文
posted @ 2017-08-07 22:34 Lslsa 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Description MG is a lucky boy. He is always be able to find gold from underground. It is known that the gold is a sequence with nelements, which has i 阅读全文
posted @ 2017-08-07 09:19 Lslsa 阅读(70) 评论(0) 推荐(0) 编辑
2017年8月6日
摘要: Description Compared to wildleopard's wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in his h 阅读全文
posted @ 2017-08-06 22:34 Lslsa 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Description 对于给出的一串数字,求出该串中最长的连续并且每个数仅出现一次的子序列。 Input 1 5 1 2 3 2 1 Output 3 由于数据范围很大 0~1e9,查找到一个数遍历一遍1e9不现实,这样就需要一种快速识别这个数是否出现过的方法。 就学习了一下set这个容器。 定义 阅读全文
posted @ 2017-08-06 19:30 Lslsa 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Description 给出扔球的高度,和初速度,求球最远可以被扔出多远? Sample Input 2 0 1 1 2 Sample Output 0.10 0.99根据扔的角度不同,球飞出的角度也不同,先推导公式,然后三分角度求出极值。 #include<bits/stdc++.h> using 阅读全文
posted @ 2017-08-06 10:17 Lslsa 阅读(73) 评论(0) 推荐(0) 编辑