
poj
文章平均质量分 80
mtxxxx
qq 1149169650
邮箱:huangxin0124@tongji.edu.cn
展开
-
poj2478 欧拉函数
#include #include #include using namespace std;const int N=1000005;long long eu[N],ans[N];void eular(){ int i,j; for(i=2;i<N;i++) if(!eu[i]) { for(j=i;j<N;j原创 2016-03-15 23:29:08 · 343 阅读 · 0 评论 -
后缀数组(二)利用height对sa数组分组的做法(poj 1743 & poj 3261 )
poj 1743 给定一个字符串,求最长重复子串,且这两个子串不重叠二分答案,判断答案k是否可行时,把后缀数组分成若干组,每组中重复子串的长度都大于或等于k(即height大于等于k),如果本组中sa的最大最小值之差大于k就满足不重复,即这个k可行#include #include #include #include using namespace std;const int m原创 2016-08-28 08:02:33 · 713 阅读 · 0 评论 -
poj 2503(map)
BabelfishTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 38460 Accepted: 16404DescriptionYou have just moved from Waterloo to a big city. The people h原创 2016-02-24 21:59:00 · 371 阅读 · 0 评论 -
poj 2236(并查集)
Wireless NetworkTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 20929 Accepted: 8795DescriptionAn earthquake takes place in Southeast Asia. The ACM (原创 2016-02-23 22:45:08 · 306 阅读 · 0 评论 -
poj 1163 the triangle(dp)
The TriangleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 42757 Accepted: 25834Description73 88 1 02 7 4 44 5 2 6 5(Figu原创 2016-02-23 22:38:45 · 295 阅读 · 0 评论 -
poj 2785 二分或者hash
4 Values whose Sum is 0Time Limit: 15000MSMemory Limit: 228000KTotal Submissions: 18896Accepted: 5619Case Time Limit: 5000MSDescriptionThe SUM problem can原创 2016-03-08 21:49:43 · 304 阅读 · 0 评论 -
poj 1022 Packing Unit 4D Cubes
Packing Unit 4D CubesTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 2281Accepted: 758DescriptionWe usually think that there are three geometri原创 2016-02-22 22:54:49 · 1100 阅读 · 0 评论 -
poj 2823 Sliding Window(单调队列)
Sliding WindowTime Limit: 12000MSMemory Limit: 65536KTotal Submissions: 50906Accepted: 14640Case Time Limit: 5000MSDescriptionAn array of size n ≤ 106 i原创 2016-02-22 22:30:43 · 305 阅读 · 0 评论 -
poj 3468 A Simple Problem with Integers(线段树)
A Simple Problem with IntegersTime Limit: 5000MSMemory Limit: 131072KTotal Submissions: 85145Accepted: 26414Case Time Limit: 2000MSDescriptionYou have原创 2016-02-21 22:45:42 · 273 阅读 · 0 评论 -
poj 2442
SequenceTime Limit: 6000MSMemory Limit: 65536KTotal Submissions: 8625Accepted: 2846DescriptionGiven m sequences, each contains n non-negative integer. Now we原创 2016-02-20 22:23:54 · 454 阅读 · 0 评论 -
poj 2566 Bound Found
Bound FoundTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 2406Accepted: 744Special JudgeDescriptionSignals of most probably extra-terrestrial or原创 2016-02-20 09:45:48 · 502 阅读 · 0 评论 -
poj1077
//1.广搜,参考网址:http://www.cnblogs.com/jackge/archive/2013/03/28/2986804.html 本来是想用数组实现队列的但是mle了///于是改着改着就和网上的一样了。。。#include #include #include #include #include #include #include using namespace st原创 2016-03-30 09:49:19 · 293 阅读 · 0 评论 -
后缀数组(一)(模板题poj2774)
#include #include #include using namespace std;const int maxn=200010;char ss[maxn];int sa[maxn],t[maxn],t2[maxn],c[maxn],n,s[maxn];int Rank[maxn],height[maxn];void get_sa(int m){ int i,*x原创 2016-08-27 08:10:53 · 668 阅读 · 0 评论