2016年7月13日

摘要: 本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印 ***** *** * *** ***** 所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首尾符号数相等。 给定任意N个符号, 阅读全文
posted @ 2016-07-13 10:44 Annetree 阅读(422) 评论(0) 推荐(0)

2016年7月12日

摘要: 读入n名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。 输入格式:每个测试输入包含1个测试用例,格式为 其中姓名和学号均为不超过10个字符的字符串,成绩为0到100之间的一个整数,这里保证在一组测试用例中没有两个学生的成绩是相同的。 输出格式:对每个测试用例输出2行,第1行是成 阅读全文
posted @ 2016-07-12 21:55 Annetree 阅读(251) 评论(0) 推荐(0)
 
摘要: Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,glor 阅读全文
posted @ 2016-07-12 15:45 Annetree 阅读(146) 评论(0) 推荐(0)
 
摘要: Problem Description 可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯 阅读全文
posted @ 2016-07-12 14:49 Annetree 阅读(230) 评论(0) 推荐(0)
 
摘要: Problem Description My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and 阅读全文
posted @ 2016-07-12 11:02 Annetree 阅读(177) 评论(0) 推荐(0)
 
摘要: Problem Description Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking ma 阅读全文
posted @ 2016-07-12 10:02 Annetree 阅读(205) 评论(0) 推荐(0)

2016年7月11日

摘要: Problem Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.Th 阅读全文
posted @ 2016-07-11 16:38 Annetree 阅读(146) 评论(0) 推荐(0)
 
摘要: Problem Description Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square? Input The first line of input c 阅读全文
posted @ 2016-07-11 15:26 Annetree 阅读(160) 评论(0) 推荐(0)

2016年7月9日

摘要: Problem Description Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two stri 阅读全文
posted @ 2016-07-09 10:28 Annetree 阅读(135) 评论(0) 推荐(0)

2016年7月7日

摘要: Problem Description 一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。 Input 前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m<=20,m>=1.m=0退出. Ou 阅读全文
posted @ 2016-07-07 00:26 Annetree 阅读(156) 评论(0) 推荐(0)
 
摘要: Problem Description 推箱子是一个很经典的游戏.今天我们来玩一个简单版本.在一个M*N的房间里有一个箱子和一个搬运工,搬运工的工作就是把箱子推到指定的位置,注意,搬运工只能推箱子而不能拉箱子,因此如果箱子被推到一个角上(如图2)那么箱子就不能再被移动了,如果箱子被推到一面墙上,那么 阅读全文
posted @ 2016-07-07 00:24 Annetree 阅读(799) 评论(0) 推荐(0)

2016年7月5日

摘要: Problem Description Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each repres 阅读全文
posted @ 2016-07-05 20:45 Annetree 阅读(173) 评论(0) 推荐(0)

2016年7月4日

摘要: Problem Description A DFS(digital factorial sum) number is found by summing the factorial of every digit of a positive integer. For example ,consider 阅读全文
posted @ 2016-07-04 21:59 Annetree 阅读(136) 评论(0) 推荐(0)
 
摘要: Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large re 阅读全文
posted @ 2016-07-04 21:54 Annetree 阅读(137) 评论(0) 推荐(0)
 
摘要: Problem Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black til 阅读全文
posted @ 2016-07-04 21:52 Annetree 阅读(133) 评论(0) 推荐(0)