Minimum Inversion Number
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 9864 Accepted Submission(s): 6069
Problem Description
T...
分类:
其他好文 时间:
2014-07-08 19:15:43
阅读次数:
232
题目链接:点击打开链接
水。。
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define ll long long
#define L(x) (x<<1)
#define R(x) (x<<1|1)
#define N 100005
i...
分类:
其他好文 时间:
2014-07-08 18:23:14
阅读次数:
164
I Hate It
Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 35417 Accepted Submission(s): 13958
Problem Description
很多学校流行一种比较的习惯。...
分类:
其他好文 时间:
2014-07-08 18:10:38
阅读次数:
221
区间颜色不一致就更新到底,否则lazy标记
#include
#include
#include
#include
using namespace std;
#define lc l,m,index<<1
#define rc m+1,r,index<<1|1
#define N 100005
#define ll __int64
struct node
{
bool same;
ll c...
分类:
其他好文 时间:
2014-07-08 18:00:56
阅读次数:
226
Billboard
Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 9632 Accepted Submission(s): 4286
Problem Description
At the entrance...
分类:
其他好文 时间:
2014-07-08 15:28:41
阅读次数:
158
Buy Tickets
Time Limit: 4000MS
Memory Limit: 65536K
Total Submissions: 12296
Accepted: 6071
Description
Railway tickets were difficult to buy around the Lunar New Y...
分类:
其他好文 时间:
2014-07-08 15:24:47
阅读次数:
160
原题: ZOJ 3686http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3686这题本来是一个比较水的线段树,结果一个mark坑了我好几个小时。。哎。太弱。先DFS这棵树,树形结构转换为线性结构,每个节点有一个第一次遍历的时间...
分类:
其他好文 时间:
2014-07-08 00:46:56
阅读次数:
295
Description
The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city counci...
分类:
其他好文 时间:
2014-07-06 10:53:28
阅读次数:
185
题目大意:
求出字典序最小,重复次数最多,的子串。
思路分析:
RMQ + height 数组可以求出任意两个后缀的lcp
我们枚举答案字符串的重复的长度。
如果这个字符串的长度为 l ,而且这个字符串出现过两次或两次以上
那么你会发现在原串中 str[0] str[l] str[2*l] ....肯定有相邻的两个被包含在重复的串中。
我们求出这两个相邻的后缀的lcp
我...
分类:
其他好文 时间:
2014-07-05 23:47:48
阅读次数:
178
买西瓜吃,每个西瓜有两个参数,一个是p代表价格,一个是t代表能吃几天,要求n天每天都能吃西瓜,而且如果你今天买了,以前买的还没吃完 那么都得扔了,求最小花费,还真想不到用线段树+DP,最后看了一下别人的标题,想了一下,DP方程挺好推的,线段树也只是单点查询,
#include
#include
#include
#include
#include
#include
//#include
...
分类:
其他好文 时间:
2014-07-05 23:01:20
阅读次数:
287