随笔分类 - 其它-二分
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4715Difference Between PrimesDescriptionAll you know Goldbach conjecture.That is to say, Every even inte...
阅读全文
摘要:题目连接http://poj.org/problem?id=1840EqsDescriptionConsider equations having the following form:a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0The coefficients are g...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5101SelectDescriptionOne day, Dudu, the most clever boy, heard of ACM/ICPC, which is a very interesting ...
阅读全文
摘要:题目连接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 ...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2098分拆素数和Description把一个偶数拆成两个不同素数的和,有几种拆法呢?Input输入包含一些正的偶数,其值不会超过10000,个数不会超过500,若遇0,则结束。Output对应每个偶数,输出...
阅读全文
摘要:题目连接http://poj.org/problem?id=3061SubsequenceDescriptionA sequence of N positive integers (10 2 #include 3 #include 4 #include 5 #include 6 using std...
阅读全文
摘要:原题链接: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...
阅读全文
摘要:原题链接: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*}$由于:$\...
阅读全文
摘要:原题链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=18696方法很多,我用的是快排+二分,练习一下stl lower_bound这个函数。。。 1 #include 2 #include 3 #include 4 #in...
阅读全文

浙公网安备 33010602011771号