摘要: 题意: You are given a string consisting of parentheses()and[]. A string of this type is said to becorrect:(a)if it is the empty string(b)if A and B are ... 阅读全文
posted @ 2015-07-24 21:28 白一 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 题意: You are to find all the two-word compound words in a dictionary. A two-word compound word is aword in the dictionary that is the concatenation of ... 阅读全文
posted @ 2015-07-24 20:40 白一 阅读(650) 评论(0) 推荐(0) 编辑
摘要: 题意: Given is an ordered deck of n cards numbered 1to n with card 1 at the top and card n at thebottom.The following operation is performed aslong as t... 阅读全文
posted @ 2015-07-24 20:17 白一 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 题意: 对于一个n元组(a1,a2,……an),可以对于每个数求出它和下一个数的差的绝对值,得到一个新的n元组(|a1-a2|,|a2-a3|,……|an-a1|)。重复这个过程,得到的序列称为Ducci序列,例如:(8,11,2,7)—>(3,9,5,1)-->(6,4,4,2)-->(2,0,2... 阅读全文
posted @ 2015-07-24 19:54 白一 阅读(641) 评论(0) 推荐(0) 编辑
摘要: 题目大意:桌上有N(N 2 #include 3 using namespace std; 4 int main() 5 { 6 7 int n; 8 while (cin >> n) 9 {10 if (n > 1 && n a;13 ... 阅读全文
posted @ 2015-07-17 20:48 白一 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 题目: Once upon a time, there is a special coco-cola store. If you return three empty bottles to the shop,you’ll get a full bottle of coco-cola to drink... 阅读全文
posted @ 2015-07-16 22:15 白一 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 把十进制整数转换为十六进制,格式为0x开头,10~15由大写字母A~F表示。Input每行一个整数x,0 2 #include 3 using namespace std; 4 int main() 5 { 6 int n; 7 while (cin >> n) 8 ... 阅读全文
posted @ 2015-07-16 21:46 白一 阅读(1994) 评论(0) 推荐(0) 编辑
摘要: 题目大意:Vanya gotncubes. He decided to build a pyramid from them. Vanya wants to build the pyramid as follows: the top level of the pyramid must consist ... 阅读全文
posted @ 2015-07-16 21:28 白一 阅读(553) 评论(0) 推荐(0) 编辑
摘要: 题目大意:There is a permutation without two numbers in it, and now you know what numbers the permutation has.Please find the two numbers it lose.InputTher... 阅读全文
posted @ 2015-07-16 20:51 白一 阅读(191) 评论(0) 推荐(0) 编辑
摘要: (慢慢看题目,O(∩_∩)O~)Mohammad has recently visitedSwitzerland. As he loves his friends very much, he decided to buy some chocolate for them, but as this fi... 阅读全文
posted @ 2015-07-16 20:26 白一 阅读(156) 评论(0) 推荐(0) 编辑