上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 29 下一页
摘要: Problem DescriptionCalculate A * B.InputEach line will contain two integers A and B. Process to end of file.Note: the length of each integer will not ... 阅读全文
posted @ 2014-06-06 23:27 Oyking 阅读(288) 评论(0) 推荐(0) 编辑
摘要: Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,glo... 阅读全文
posted @ 2014-05-27 23:42 Oyking 阅读(1090) 评论(0) 推荐(0) 编辑
摘要: Problem Description一个{1, ..., n}的子集S被称为JZP集,当且仅当对于任意S中的两个数x,y,若(x+y)/2为整数,那么(x+y)/2也属于S。例如,n=3,S={1,3}不是JZP集,因为(1+3)/2=2不属于S。但是{1,2,3}的其他子集都属于S,所以n=3时... 阅读全文
posted @ 2014-05-25 21:17 Oyking 阅读(630) 评论(0) 推荐(0) 编辑
摘要: Problem Description小A想通过合理投资银行理财产品达到收益最大化。已知小A在未来一段时间中的收入情况,描述为两个长度为n的整数数组dates和earnings,表示在第dates[i]天小A收入earnings[i]元(0 2 #include 3 #include 4 #in... 阅读全文
posted @ 2014-05-25 20:59 Oyking 阅读(320) 评论(0) 推荐(0) 编辑
摘要: Problem Description 小度和小良最近又迷上了下棋。棋盘一共有N行M列,我们可以把左上角的格子定为(1,1),右下角的格子定为(N,M)。在他们的规则中,“王”在棋盘上的走法遵循十字路线。也就是说,如果“王”当前在(x,y)点,小度在下一步可以移动到(x+1, y), (x-1, ... 阅读全文
posted @ 2014-05-25 20:21 Oyking 阅读(296) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionFor a sequence S1, S2, ... , SN, and a pair of integers (i, j), if 1 2 #include 3 #include 4 #include 5 using namespace std... 阅读全文
posted @ 2014-05-02 22:17 Oyking 阅读(372) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionGiven n integers.You have two operations:U A B: replace the Ath number by B. (index counting from 0)Q A B: output the length of the... 阅读全文
posted @ 2014-05-02 17:11 Oyking 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Problem Description 吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺... 阅读全文
posted @ 2014-05-02 16:20 Oyking 阅读(347) 评论(0) 推荐(0) 编辑
摘要: Problem Description 吉哥这几天对队形比较感兴趣。 有一天,有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则称之为完美队形: 1、挑出的人保持他们在原队形的... 阅读全文
posted @ 2014-05-02 15:22 Oyking 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 最后更新:2014年4月30日1、位运算包括:这个我觉得大家都会我就随便说下:位与&,如 101 & 110 = 100位或|,如 100 | 110 = 110位非~,如 ~101 = 010位异或^,如 101 ^ 110 = 011左移>,如 110 >> 1 = 011其中,负数位运算的时候... 阅读全文
posted @ 2014-04-30 18:19 Oyking 阅读(300) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 29 下一页