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) 编辑