摘要: 题目描述 Farmer John has installed a new system of N-1N−1 pipes to transport milk between the NN stalls in his barn (2 \leq N \leq 50,0002≤N≤50,000), conv 阅读全文
posted @ 2019-08-28 21:52 WAKBGAN 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Musical Theme Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 38494 Accepted: 12654 Description A musical melody is represented as a sequen 阅读全文
posted @ 2019-08-28 20:15 WAKBGAN 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 后缀数组(倍增): struct S_array{ int s[N],sa[N],t[N],t2[N],c[N],n; int f[N][20]; void build_sa(int m){ //字符个数 int i,*x=t,*y=t2; for(i=0;i<m;i++)c[i]=0; for(i 阅读全文
posted @ 2019-08-28 16:46 WAKBGAN 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Problem Description You are given a string S consisting of only lowercase english letters and some queries.For each query (l,r,k), please output the s 阅读全文
posted @ 2019-08-28 16:43 WAKBGAN 阅读(157) 评论(0) 推荐(0) 编辑