线段树。段区间,终于完全自己A掉的。 1 #include 2 #include 3 4
#define MAXN 100005 5 #define lson l, mid, rt>1);20 sums[rt>1));21
adds[rt] = 0;22 ...
分类:
其他好文 时间:
2014-06-06 23:32:27
阅读次数:
279
For many SQL-related problems, obtaining a
reproducible test case makes it easier to resolve the problem. Starting with the
11gRelease 2 (11.2), Oracl...
分类:
数据库 时间:
2014-06-06 20:04:05
阅读次数:
317
http://poj.org/problem?id=1699题意:给你n个长度为L的序列,求包含这几个序列的最短长度。先预处理每两个序列之间的关系,然后dfs枚举就行。
1 #include 2 #include 3 #include 4 #define maxn 500 5 using na...
分类:
其他好文 时间:
2014-06-04 16:34:14
阅读次数:
255
POJ3080,题目链接http://poj.org/problem?id=3080题意:就是求m个长度为60的字符串的最长连续公共子串,2=3的所有连续子串找出来,然后由短到长查看所有主串是否有该子串。2.如果发现一个公共子串,那么就开始找长度+1的公共子串;如果指定长度的所有子串都找不出一条是共...
分类:
其他好文 时间:
2014-06-04 16:30:49
阅读次数:
246
When I finished reading this problem,I thought
I could solve it by scan every single subarray in the array,and the time
complexity is cubic.Every su.....
分类:
其他好文 时间:
2014-06-04 15:30:52
阅读次数:
255
title:
The following iterative sequence is defined for the set of positive integers:
n
n/2 (n is even)
n 3n + 1 (n is odd)
Using the rule above and starting with 13, we generate the followi...
分类:
其他好文 时间:
2014-06-04 13:56:33
阅读次数:
254
Emag eht htiw Em PlehDescriptionThis problem is
a reverse case of the problem 2996. You are given the output of the problem H
and your task is to find...
分类:
其他好文 时间:
2014-06-03 15:33:20
阅读次数:
347
http://poj.org/problem?id=3070矩阵的快速幂,二分 1
#include 2 #include 3 #include 4 #define maxn 10000 5 using namespace std; 6
const int mod=10000; 7 8 in...
分类:
其他好文 时间:
2014-06-02 19:07:56
阅读次数:
304
Lotto
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 1411 Accepted Submission(s): 697
Problem Description
In a Lotto I have eve...
分类:
其他好文 时间:
2014-06-02 18:52:53
阅读次数:
396
http://poj.org/problem?id=3318矩阵A*矩阵B是否等于矩阵C 1
#include 2 #include 3 #include 4 #include 5 #define maxn 1010 6 using namespace
std; 7 8 int a[max...
分类:
其他好文 时间:
2014-06-02 18:18:49
阅读次数:
255