spoj
CMTM4
ACM退役
展开
-
SPOJ 705 子串个数 后缀数组
依然是论文里的题目…… 其中注意,答案要用LONG LONG保存……被坑了一下然后才过 #include #include #include using namespace std; const int max_n = 50000 + 10; char s[max_n]; int slen; int a[max_n], wa[max_n], wb[max_n], wv[max_原创 2015-02-08 23:18:08 · 423 阅读 · 0 评论 -
SPOJ 375 树链剖分
模板 #include #include #include #include #include using namespace std; #define lson (pos<<1) #define rson (pos<<1|1) const int maxn = 100100; const int inf = 0x7fffffff; //----建边部分 struct Ve原创 2015-11-17 01:17:52 · 422 阅读 · 0 评论