
ACM_hash
文章平均质量分 80
深海沧澜夜未央
这个作者很懒,什么都没留下…
展开
-
POJ - 3349 Snowflake Snow Snowflakes hash 判断六角是否相同
You may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read information about a collection of snowflakes, and ...原创 2018-07-30 10:32:20 · 245 阅读 · 0 评论 -
CH 1401 兔子与兔子 字符串hash
描述很久很久以前,森林里住着一群兔子。有一天,兔子们想要研究自己的 DNA 序列。我们首先选取一个好长好长的 DNA 序列(小兔子是外星生物,DNA 序列可能包含 26 个小写英文字母),然后我们每次选择两个区间,询问如果用两个区间里的 DNA 序列分别生产出来两只兔子,这两个兔子是否一模一样。注意两个兔子一模一样只可能是他们的 DNA 序列一模一样。输入格式第一行一个 DNA 字符串 S...原创 2018-07-30 10:44:49 · 392 阅读 · 2 评论 -
POJ - 3974 Palindrome 最长的回文子串 3种不同的方法 字符串hash/Manacher算法
Andy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, "Can you propose an efficient algorithm to find the length of the lar...原创 2018-07-30 10:50:42 · 1206 阅读 · 0 评论 -
第13届景驰-埃森哲杯广东工业大学ACM程序设计大赛 L 用来作弊的药水 (唯一分解定理 和 哈希+快速幂)
在一个风雨交加的夜晚,来自异世界的不愿透露姓名的TMK同学获得了两种超强药水A、B。根据说明书,TMK知道了这两种药水的作用: (1)药水A能使人的生命值提高,每饮用1个单位能使他生命值变成原来的x倍,即每饮用p个单位能使他的生命值变成原来的x^p(x的p次方)倍。 (2)药水B能使人的能量值提高,每饮用1个单位能使他能量值变成原来的y倍,即每饮用q个单位能使他的能量值变成原来的y...原创 2018-03-25 13:14:54 · 323 阅读 · 0 评论