摘要:
#include1、sscanf和scanf的不同是输入来源,前者是一个字符串,后者则是标准输入设备2、sscanf的使用,以解析时间字符串为例,将字符串“2009-01-02_11:12:13”解析为整型年月日时分秒//定义char cc;tm tm_temp={0};string stime("2009-01-02_11:12:13");//(1) 必须严格按照分隔符形式匹配填写,若遇到不匹配项则终止解析sscanf(stime.c_str(), "%4d-%2d-%2d_%2d:%2d:%2d",&tm_temp.tm_year, & 阅读全文
摘要:
http://acm.nyist.net/JudgeOnline/problem.php?pid=651描述We have a rope whose length is L. We will cut the rope into two or more parts, the length of each part must be an integer, and no two parts have the same length. Your task is to calculate there exists how many results after the cutting. We say t. 阅读全文
摘要:
In the hourglass to the right a path is marked. A path always starts at the first row and ends at the last row. Each cell in the path (except the first) should be directly below to the left or right of the cell in the path in the previous row. The value of a path is the sum of the values in each cel 阅读全文
摘要:
DescriptionToday is Yukari'sn-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it's a big challenge for them to placencandles on the top of the cake. As Yukari has lived for such a long long time. Though she herself insists tha 阅读全文
摘要:
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=25019#problem/EDescriptionProf. Tigris is the head of an archaeological team who is currently in charge of an excavation in a site of ancient relics.This site contains relics of a village where civilization once flourished. One night, examining a 阅读全文
摘要:
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=25019#problem/CDescriptionmmm is learning division, she's so proud of herself that she can figure out the sum of all the divisors of numbers no larger than 100 within one day!But her teacher said "What if I ask you to give not only the s 阅读全文
摘要:
DescriptionWANGPENG is a freshman. He is requested to have a physical examination when entering the university.Now WANGPENG arrives at the hospital. Er….. There are so many students, and the number is increasing!There are many examination subjects to do, and there is a queue for every subject. The q 阅读全文
摘要:
DescriptionFor a group of people, there is an idea that everyone is equals to or less than 6 steps away from any other person in the group, by way of introduction. So that a chain of "a friend of a friend" can be made to connect any 2 persons and it contains no more than 7 persons.For exam 阅读全文
摘要:
DescriptionIn China, foreign brand commodities are often much more expensive than abroad. The main reason is that we Chinese people tend to think foreign things are better and we are willing to pay much for them. The typical example is, on the United Airline flight, they give you Haagendazs ice crea 阅读全文
摘要:
We say a sequence of characters is apalindromeif it is the same written forwards and backwards. For example, 'racecar' is a palindrome, but 'fastcar' is not.Apartitionof a sequence of characters is a list of one or more disjoint non-empty groups of consecutive characters whose concat 阅读全文