摘要:
You have two integers L and R, and you are required to find the max xor value of a and b where L <= a <= R and L <= b <= R Input Two integers in a lin 阅读全文
摘要:
更多Bitset的运用,请看这里http://www.cnblogs.com/hua-dong/p/8519739.html。 由于在学cdq分治,看到了这道题。先来看一道题目 (hihocoder1513): 问题:给出每个人(n<=100000)的五门学科成绩,求出所有人:五门学科名次都比自己靠 阅读全文
摘要:
Anton likes permutations, especially he likes to permute their elements. Note that a permutation of n elements is a sequence of numbers {a1, a2, ..., 阅读全文
摘要:
Bob has a favorite number k and ai of length n. Now he asks you to answer m queries. Each query is given by a pair li and ri and asks you to count the 阅读全文
摘要:
Given 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] = 0 (1 <= 阅读全文
摘要:
You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number 阅读全文
摘要:
Byteotian Interstellar Union (BIU) has recently discovered a new planet in a nearby galaxy. The planet is unsuitable for colonisation due to strange m 阅读全文
摘要:
Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares fo 阅读全文
摘要:
描述 给定一个字符串S,小Hi希望对S进行K次翻转操作。 每次翻转小Hi会指定两个整数Li和Ri,表示要将S[Li..Ri]进行翻转。(S下标从0开始,即S[0]是第一个字母) 例如对于S="abcdef",翻转S[2..3] 得到S="abdcef";再翻转S[0..5]得到S="fecdba"。 阅读全文
摘要:
描述 小Ho:好麻烦啊~~~~~ 小Hi:小Ho你在干嘛呢? 小Ho:我在干活啊!前几天老师让我帮忙管理一下团队的人员,但是感觉好难啊。 小Hi:说来听听? 小Ho:事情是这样的。我们有一个运动同好会,每天都有人加入或者退出,所以老师让我帮忙管理一下人员。每个成员有一个互不相同的id和他对我们同好会 阅读全文