随笔分类 - C/C++
摘要:题目 With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find ga
阅读全文
摘要:题目 To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the sam
阅读全文
摘要:题目 Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as: h d e l
阅读全文
摘要:题目 A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a pro
阅读全文
摘要:题目 Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } i
阅读全文
摘要:题目 A long distance telephone company charges its customers by the following rules: Making a long distance call costs a certain amount per minute, depe
阅读全文
摘要:题目 A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a
阅读全文
摘要:题目 To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C C Programming Language, M Math
阅读全文
摘要:题目 With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing
阅读全文
摘要:题目 Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 i
阅读全文
摘要:题目 This time, you are supposed to find A×B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case o
阅读全文
摘要:题目 The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the e
阅读全文
摘要:题目 Given a sequence of K integers { N1 , N2 , ..., NK }. A continuous subsequence is defined to be { Ni , Ni+1 , ..., Nj } where 1≤i≤
阅读全文
摘要:题目 Excel can sort records according to any column. Now you are supposed to imitate this function. Input Specification: Each input file contains one te
阅读全文
摘要:题目 At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the d
阅读全文
摘要:题目 Given a non negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specifi
阅读全文
摘要:题目 A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each
阅读全文
摘要:题目 As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some
阅读全文
摘要:题目 This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case o
阅读全文
摘要:题目 Calculate a+b and output the sum in standard format that is, the digits must be separated into groups of three by commas (unless there are less tha
阅读全文

浙公网安备 33010602011771号