摘要:
代码 struct DLX { int n,id; int L[maxn],R[maxn],U[maxn],D[maxn]; int C[maxn],S[maxn],loc[maxn][2]; int H[ms]; void init(int nn=0) //传列长 { n=nn; for(int 阅读全文
摘要:
Problem Description sevenzero liked Warcraft very much, but he haven't practiced it for several years after being addicted to algorithms. Now, though 阅读全文
摘要:
代码 struct DLX { int n,id; int L[maxn],R[maxn],U[maxn],D[maxn]; int C[maxn],S[maxn],loc[maxn][2]; void init(int nn=0) //传列长 { n=nn; for(int i=0;i<=n;i+ 阅读全文
摘要:
Description Ponyo and Garfield are waiting outside the box-office for their favorite movie. Because queuing is so boring, that they want to play a gam 阅读全文
摘要:
代码 //先init,然后Build_tree(hd[0],左,右),接下来Update(hd[前一个],hd[当前],左,右,数,数量) //可支持在线。最后可查询 #define e tree[rt] #define p tree[pre] int hd[maxn]; struct Tree{ 阅读全文
摘要:
Problem Description Alice get a string S. She thinks palindrome string is interesting. Now she wanna know how many three tuple (i,j,k) satisfy 1≤i≤j<k 阅读全文
摘要:
Problem Description In this problem, you are given a string s and q queries.For each query, you should answer that when all distinct substrings of str 阅读全文