摘要: Description Saruman the White must lead his army along a straight path from Isengard to Helm’s Deep. To keep track of his forces, Saruman distributes 阅读全文
posted @ 2017-07-18 09:58 limyel 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Description 73 88 1 02 7 4 44 5 2 6 5(Figure 1) Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on 阅读全文
posted @ 2017-07-18 09:10 limyel 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Problem Description 下面是512汶川大地震部分受灾学校伤亡情况(惨痛!!)1、 四川省都江堰市 聚源中学伤亡情况:遇难学生人数(含失踪)320详细说明: 一栋教学楼被震垮,该楼18个班420多名学生被埋,截至目前仅有不到100名获救。2、 四川省绵阳市 北川县北川中学伤亡情况:遇 阅读全文
posted @ 2017-07-13 13:22 limyel 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Problem Description 小明最近宅在家里无聊,于是他发明了一种有趣的游戏,游戏道具是N张叠在一起的卡片,每张卡片上都有一个数字,数字的范围是0~9,游戏规则如下: 首先取最上方的卡片放到桌子上,然后每次取最上方的卡片,放到桌子上已有卡片序列的最右边或者最左边。当N张卡片全部都放到桌子 阅读全文
posted @ 2017-07-13 12:15 limyel 阅读(249) 评论(0) 推荐(0) 编辑
摘要: Problem Description 在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数.例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图: Input 输入数据由多行组成,每行包含一个整数n,表示该测试实例的长方形方格的规格是2×n (0<n<=50 阅读全文
posted @ 2017-07-13 12:12 limyel 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Problem Description 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 阅读全文
posted @ 2017-07-12 17:28 limyel 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,00 阅读全文
posted @ 2017-07-10 16:45 limyel 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be fille 阅读全文
posted @ 2017-07-10 15:23 limyel 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 conn = pymysql.connect(host= , user= , passwd= , db= , port= , charset= ) 为了正确处理中文字符,charset的值可以设置为 utf8。 .connect返回一个连接对象(conn)。 cur = conn.cu 阅读全文
posted @ 2017-06-17 16:04 limyel 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Description 甜甜从小就喜欢画图画,最近他买了一支智能画笔,由于刚刚接触,所以甜甜只会用它来画直线,于是他就在平面直角坐标系中画出如下的图形: 甜甜的好朋友蜜蜜发现上面的图还是有点规则的,于是他问甜甜:在你画的图中,我给你两个点,请你算一算连接两点的折线长度(即沿折线走的路线长度)吧。 I 阅读全文
posted @ 2017-06-17 00:32 limyel 阅读(249) 评论(0) 推荐(0) 编辑