2015年7月24日
摘要: 题目:Description某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二... 阅读全文
posted @ 2015-07-24 20:56 最爱剪刀手 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 题目:DescriptionTwo bored soldiers are playing card war. Their card deck consists of exactlyncards, numbered from1ton,all values are different. They div... 阅读全文
posted @ 2015-07-24 20:51 最爱剪刀手 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 题目: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 c... 阅读全文
posted @ 2015-07-24 18:38 最爱剪刀手 阅读(107) 评论(0) 推荐(0) 编辑
  2015年7月17日
摘要: 题目:A Ducci sequence is a sequence ofn-tuples of integers. Given ann-tuple of integers(a1,a2,...,an), the nextn-tuple in the sequence is formed by taki... 阅读全文
posted @ 2015-07-17 20:47 最爱剪刀手 阅读(135) 评论(0) 推荐(0) 编辑
  2015年7月16日
摘要: 题目:Description有三户人家共拥有一座花园,每户人家的太太均需帮忙整理花园。A 太太工作了5 天,B 太太则工作了4 天,才将花园整理完毕。C 太太因为正身怀六甲无法加入她们的行列,便出了90元。请问这笔钱如何分给A、B 二位太太较为恰当?A 应得多少元?90/(5+4)*5=$50 元?... 阅读全文
posted @ 2015-07-16 20:24 最爱剪刀手 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 题目:The Coco-Cola StoreOnce 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... 阅读全文
posted @ 2015-07-16 20:16 最爱剪刀手 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 题目:Description把十进制整数转换为十六进制,格式为0x开头,10~15由大写字母A~F表示。Input每行一个整数x,0 2 #include 3 using namespace std; 4 int main() 5 { 6 int s; 7 while(cin>>s... 阅读全文
posted @ 2015-07-16 20:07 最爱剪刀手 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 题目:DescriptionVanya gotncubes. He decided to build a pyramid from them. Vanya wants to build the pyramid as follows: the top level of the pyramid must... 阅读全文
posted @ 2015-07-16 20:03 最爱剪刀手 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目:DescriptionThere is a permutation without two numbers in it, and now you know what numbers the permutation has. Please find the two numbers it lose... 阅读全文
posted @ 2015-07-16 19:56 最爱剪刀手 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 题目:Problem GBig ChocolateMohammad has recently visitedSwitzerland. As he loves his friends very much, he decided to buy some chocolate for them, but a... 阅读全文
posted @ 2015-07-16 19:49 最爱剪刀手 阅读(112) 评论(0) 推荐(0) 编辑