上一页 1 ··· 4 5 6 7 8
摘要: 题目: 读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 Input测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。 Output对每个测试用例输出1行, 阅读全文
posted @ 2017-07-20 08:33 山杉三 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 题目: Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ... shows the first 11 ugly numb 阅读全文
posted @ 2017-07-18 19:01 山杉三 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEelzebu 阅读全文
posted @ 2017-07-18 18:57 山杉三 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Colonel has n badges. He wants to give one badge to every of his n soldiers. Each badge has a coolness factor, which shows how much it's owner reached 阅读全文
posted @ 2017-07-18 18:54 山杉三 阅读(216) 评论(0) 推荐(0) 编辑
摘要: You are given a string consisting of parentheses () and []. A string of this type is said to be correct: (a) if it is the empty string (b) if A and B 阅读全文
posted @ 2017-07-18 14:36 山杉三 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 原题: The local tradition is that every train arriving from the direction A continues in the direction B with coaches reorganized in some way. Assume th 阅读全文
posted @ 2017-07-18 14:29 山杉三 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 题目: ay又对数字的列产生了兴趣: 现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。 Input每组数据占一行,代表四张卡片上的数字(0<=数字<=9),如果四张卡片都是0,则输入结束。 Output对每组卡片按从小到大的顺序输出所有能由这四张卡片组成的4位 阅读全文
posted @ 2017-07-17 19:45 山杉三 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 题目: 某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下: 从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢, 继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、一至三报数 阅读全文
posted @ 2017-07-17 19:20 山杉三 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 题目 我有一个很简单的问题要问你。给定两个整数A和B,你的工作是计算A + B的和。 输入 输入的第一行包含整数T(1 < = T < = 20),这意味着测试用例的数量。然后T行遵循,每一行包含两个正整数,A和b。注意整数是非常大的,这意味着你不应该用32位整数来处理它们。您可以假设每个整数的长度 阅读全文
posted @ 2017-07-17 19:04 山杉三 阅读(686) 评论(0) 推荐(0) 编辑
摘要: 头文件:#include <algorithm>如何使用: Sort函数有三个参数:Sort(start,end,排序方法) (1)第一个是要排序的数组的起始地址。 (2)第二个是结束的地址(最后一位要排序的地址) (3)第三个参数是排序的方法,可以不写第三个参数,此时默认的排序方法是从小到大排序。 阅读全文
posted @ 2017-07-17 09:28 山杉三 阅读(358) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8