哈希
junior19
abcde
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
NYOJ138:找球号(二)(Hash)
找球号(二) 时间限制:1000 ms | 内存限制:65535 KB 难度:5 描述在某一国度里流行着一种游戏。游戏规则为:现有一堆球中,每个球上都有一个整数编号i(0<=i<=100000000),编号可重复,还有一个空箱子,现在有两种动作:一种是"ADD",表示向空箱子里放m(0<m<=100)个球,另一种是"QUERY”,表示说出M(0<M<=100)个随机整原创 2017-03-31 23:21:04 · 290 阅读 · 0 评论 -
POJ1840:Eqs(Hash)
Eqs Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 16239 Accepted: 7973 Description Consider equations having the following form: a1x13+ a2x23+ a3x33+原创 2017-04-01 11:57:03 · 429 阅读 · 0 评论 -
UVA11475:Extend to Palindrome(Hash 或 KMP)
题意:给一个字符串,在后面添加最少的字符,使它变成回文串。 思路:显然要找出后缀最长的回文子串,然后加上前面的部分即可,我们可以考虑用字符串哈希,将后往前和前往后的子串匹配一下,相同的就是回文串,下面使用滚动哈希的方法,复杂度O(n)。 # include # include # include # define ULL unsigned long long using namespac原创 2017-04-02 09:49:15 · 475 阅读 · 0 评论 -
CFgym:Palindromization(字符串Hash)
K. Palindromization time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mihahim has a string s. He wants to del原创 2017-05-12 01:36:33 · 301 阅读 · 0 评论 -
CFgym:Hidden Anagrams(Hash)
题意:给两个字符串S和T,长度 思路:暴力找出S所有子串的Hash值,扔进set,从大到小枚举长度,在T中找。 //reference: weareateam # include using namespace std; typedef long long LL; typedef unsigned long long ull; char s[4008], t[4008]; LL a[40原创 2017-07-22 22:04:20 · 691 阅读 · 1 评论 -
CF798B:Mike and strings(Hash)
B. Mike and strings time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike has n strings s1, s2, ..., sn each原创 2017-08-08 21:19:44 · 533 阅读 · 0 评论 -
POI2010:ANT-Antisymmetry(二分 + HASH)
题目描述 Byteasar studies certain strings of zeroes and ones. Let be such a string. By we will denote the reversed (i.e., "read backwards") string , and by we will denote the string obtained from by...原创 2018-07-23 23:07:48 · 716 阅读 · 0 评论
分享