摘要:
Every morning when they are milked, the Farmer John's cows form a rectangular grid that is R (1 <= R <= 10,000) rows by C (1 <= C <= 75) columns. As w 阅读全文
摘要:
Maximum repetition substring The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same 阅读全文
摘要:
Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concate 阅读全文
摘要:
Musical Theme A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on t 阅读全文
摘要:
//查询和修改都是log(n)//从c[1]开始进行赋值,不赋c[0],n为数的个数 //sum(x)为计算前x个数的和 #include #include #include using namespace std; const int MAXN=50010; int c[MAXN]; int n; int lowbit(int x) { return x&(-x); } vo... 阅读全文