摘要: E - The Morning after Halloween UVA - 1601 https://blog.csdn.net/qq_29169749/article/details/51420097 这里有双向bfs板,注意双向是搜索一层,而不是一个点。 这个提的意思是有小于三个小鬼,编号abc 阅读全文
posted @ 2019-02-28 12:07 downrainsun 阅读(146) 评论(0) 推荐(1) 编辑
摘要: hash[l...r] = (hash[r] - hash[l - 1] * (p ^ (r - l + 1))) % mod;求中间字符串的哈希值 假设一个串s,那么字串s[i, j]的Hash值就是H[i, j]=s[i]+s[i+1]*x+s[i+2]*(x^2)+...+s[j]*(x^(i 阅读全文
posted @ 2019-02-28 00:33 downrainsun 阅读(171) 评论(0) 推荐(1) 编辑