上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页
摘要: DescriptionNow and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a c... 阅读全文
posted @ 2015-03-08 15:48 TCtower 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Description现在请求你维护一个数列,要求提供以下两种操作: 1、 查询操作。语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值。限制:L不超过当前数列的长度。 2、 插入操作。语法:A n 功能:将n加上t,其中t是最近一次查询操作的答案(如果还未执行过查询操作,则... 阅读全文
posted @ 2015-03-07 15:56 TCtower 阅读(532) 评论(0) 推荐(0) 编辑
摘要: 原帖:http://www.cnblogs.com/zgmf_x20a/archive/2008/11/15/1334109.html回顾树状数组的定义,注意到有如下两条性质: 一,c[ans]=sum of A[ans-lowbit(ans)+1 ... ans];二,当ans=2^k时,c[an... 阅读全文
posted @ 2015-03-07 15:26 TCtower 阅读(205) 评论(0) 推荐(0) 编辑
摘要: DescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each ... 阅读全文
posted @ 2015-03-07 15:07 TCtower 阅读(207) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j... 阅读全文
posted @ 2015-03-07 11:42 TCtower 阅读(199) 评论(0) 推荐(0) 编辑
摘要: DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level... 阅读全文
posted @ 2015-03-07 10:53 TCtower 阅读(155) 评论(0) 推荐(0) 编辑
摘要: DescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The... 阅读全文
posted @ 2015-03-07 10:31 TCtower 阅读(255) 评论(0) 推荐(0) 编辑
摘要: As most of the ACMers, wy's next target is algorithms, too. wy is clever, so he can learn most of the algorithms quickly. After a short time, he has l... 阅读全文
posted @ 2015-03-07 10:24 TCtower 阅读(157) 评论(0) 推荐(0) 编辑
摘要: DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping ... 阅读全文
posted @ 2015-03-07 08:33 TCtower 阅读(180) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2015-01-10 16:53 TCtower 阅读(1) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页