摘要:
Problem Description As a cute girl, Kotori likes playing ``Hide and Seek'' with cats particularly.Under the influence of Kotori, many girls and cats a 阅读全文
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5705 题目: Problem Description Given a time HH:MM:SS and one parameter a , you need to calculate next tim 阅读全文
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4791 题目解释:给你一组数据s1,p1,s2,p2...sn,pn,一个数字q,问你当要打印q张资料时,最少花费是多少?值得注意的是p1>p2>p3>...>pn,就是因为看清这个条件,走了很多弯路。 阅读全文
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5701 题目: Problem Description 中位数定义为所有值从小到大排序后排在正中间的那个数,如果值有偶数个,通常取最中间的两个数值的平均数作为中位数。现在有n个数,每个数都是独一无二的,求 阅读全文
摘要:
Pocky Let’s talking about something of eating a pocky. Here is a Decorer Pocky, with colorful decorative stripes in the coating, of length L. While th 阅读全文
摘要:
Description There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each v 阅读全文
摘要:
从外部环境import一个项目进入Java工作环境中,若出现以下错误,解决方法如下: 鼠标移上去,会出现以下错误提示: 解决方法: 选中该项目->右键->Build path->Configure build path->Libraries,若是因为第三个JRE System Library前方的提 阅读全文
摘要:
代码:(完全背包) 其他解法详见:http://blog.sina.com.cn/s/blog_91e2390c01014b1u.html 假如3的个数为i,则剩余的需兑换的钱有n-3*i,剩余的对2来说,有可能有0,1,2...(n-3*i)/2;即有i个3的情况有 (n-3*i)/2+1个(2从 阅读全文
摘要:
题目链接:http://poj.org/problem?id=1163 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1) Figure 1 shows a number triangle. Write a program that calculates the hig 阅读全文
摘要:
题意:彼得有n支雪茄,每k个烟头可以换一支新雪茄,问彼得最多可以吸多少支雪茄 ? 当时自己做时,错在了直接在while循环开始前,便将雪茄的初始数量给加上了,然而应该是先处理后再加上最终剩余的雪茄数量。 阅读全文