随笔分类 - hash
摘要:1014: [JSOI2008]火星人prefix Description 火星人最近研究了一种操作:求一个字串两个后缀的公共前缀。比方说,有这样一个字符串:madamimadam,我们将这个字符串的各个字符予以标号:序号: 1 2 3 4 5 6 7 8 9 10 11 字符 m a d a m
阅读全文
摘要:Sumsets Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11886 Accepted: 3273 Description Given S, a set of integers, find the largest d suc
阅读全文
摘要:E. Test time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Sometimes it is hard to prepare
阅读全文
摘要:Constellations Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 6522 Accepted: 1311 Description The starry sky in the summer night is one of
阅读全文
摘要:分析:其实就是问你有多少对a,b有且仅有两位不相同.我们可以先枚举这两位,对应ai枚举一位,对应bi枚举一位,如果ai^(1<<x) == bi^(1<<y),证明恰好有两位不一样,那么ans++. 考虑怎么快速地得出答案,我们可以用一个数组记录ai^(1<<x)出现了多少次,但是因为ai,bi可能
阅读全文