随笔分类 -  其它-二分

摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4715Difference Between PrimesDescriptionAll you know Goldbach conjecture.That is to say, Every even inte... 阅读全文
posted @ 2015-09-08 21:32 GadyPu 阅读(187) 评论(0) 推荐(0)
摘要:题目连接http://poj.org/problem?id=1840EqsDescriptionConsider equations having the following form:a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0The coefficients are g... 阅读全文
posted @ 2015-08-31 15:42 GadyPu 阅读(183) 评论(0) 推荐(0)
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5101SelectDescriptionOne day, Dudu, the most clever boy, heard of ACM/ICPC, which is a very interesting ... 阅读全文
posted @ 2015-06-28 13:01 GadyPu 阅读(157) 评论(0) 推荐(0)
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2578Dating with girls(1)DescriptionEveryone in the HDU knows that the number of boys is larger than the ... 阅读全文
posted @ 2015-06-25 21:53 GadyPu 阅读(264) 评论(0) 推荐(0)
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2098分拆素数和Description把一个偶数拆成两个不同素数的和,有几种拆法呢?Input输入包含一些正的偶数,其值不会超过10000,个数不会超过500,若遇0,则结束。Output对应每个偶数,输出... 阅读全文
posted @ 2015-06-21 20:46 GadyPu 阅读(184) 评论(0) 推荐(0)
摘要:题目连接http://poj.org/problem?id=3061SubsequenceDescriptionA sequence of N positive integers (10 2 #include 3 #include 4 #include 5 #include 6 using std... 阅读全文
posted @ 2015-06-01 20:01 GadyPu 阅读(398) 评论(0) 推荐(0)
摘要:原题链接:http://ac.jobdu.com/problem.php?pid=1349二分。。 1 #include 2 #include 3 #include 4 #include 5 using std::lower_bound; 6 using std::upper_bound; 7 co... 阅读全文
posted @ 2015-05-27 12:57 GadyPu 阅读(160) 评论(0) 推荐(0)
摘要:原题链接:http://ac.jobdu.com/problem.php?pid=1554由数列的前缀和:$\begin{align*}\Large{} S_n &=\Large{}\sum_{i=1}^{n}{{a_i}} \ \ \ \ i=1,2,3...n\end{align*}$由于:$\... 阅读全文
posted @ 2015-05-27 09:52 GadyPu 阅读(283) 评论(0) 推荐(0)
摘要:原题链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=18696方法很多,我用的是快排+二分,练习一下stl lower_bound这个函数。。。 1 #include 2 #include 3 #include 4 #in... 阅读全文
posted @ 2015-05-16 17:21 GadyPu 阅读(141) 评论(0) 推荐(0)