摘要: 1032. Sharing (25) 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 wor 阅读全文
posted @ 2018-01-15 19:43 A-Little-Nut 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 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: That is 阅读全文
posted @ 2018-01-15 18:35 A-Little-Nut 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 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 progra 阅读全文
posted @ 2018-01-15 17:48 A-Little-Nut 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 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} is 12, a 阅读全文
posted @ 2018-01-15 17:47 A-Little-Nut 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Excel can sort records according to any column. Now you are supposed to imitate this function. Input Each input file contains one test case. For each 阅读全文
posted @ 2018-01-15 17:46 A-Little-Nut 阅读(110) 评论(0) 推荐(0) 编辑
摘要: People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6 digit number, wher 阅读全文
posted @ 2018-01-15 17:41 A-Little-Nut 阅读(89) 评论(0) 推荐(0) 编辑
摘要: A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open 阅读全文
posted @ 2018-01-15 17:40 A-Little-Nut 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run sim 阅读全文
posted @ 2018-01-15 17:38 A-Little-Nut 阅读(106) 评论(0) 推荐(0) 编辑
摘要: A number that will be the same when it is written forwards or backwards is known as a Palindromic Number (回文数字). For example, 1234321 is a palindromic 阅读全文
posted @ 2018-01-15 17:37 A-Little-Nut 阅读(308) 评论(0) 推荐(0) 编辑
摘要: Notice that the number 123456789 is a 9 digit number consisting exactly the numbers from 1 to 9, with no duplication (重复). Double it we will obtain 24 阅读全文
posted @ 2018-01-15 17:22 A-Little-Nut 阅读(518) 评论(0) 推荐(0) 编辑