摘要:
2588: Spoj 10628. Count on a tree Description 给定一棵N个节点的树,每个点有一个权值,对于M个询问(u,v,k),你需要回答u xor lastans和v这两个节点间第K小的点权。其中lastans是上一个询问的答案,初始为0,即第一个询问的u是明文。 阅读全文
摘要:
2780: Poi2006 Palindromes Description A word is called a palindrome if we read from right to left is as same as we read from left to right. For exampl 阅读全文
摘要:
2770: PKU2503 Babelfish Description You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialectof a foreign lan 阅读全文
摘要:
2768: Zju1290 Word-Search Wonder Description The Pyrates Restaurant was starting to fill up as Valentine McKee walked in. She scanned the crowd for he 阅读全文
摘要:
首先给出字符串长度,其小于等于30000,接下来一个字符串 题解:就是最长连续重复子串XX,先假设有两个点相距k(k为题目答案)分别为i,j且i,j分别为第一个X和第二个X中的一个点, 那么就会有一个R和L,R+L=k-1 && for z=1 to r do s[i+z]==s[j+z] && f 阅读全文