随笔分类 - hash(哈希)
摘要:hash+二分求出最长公共前缀 然后马拉车+前缀和计数 1 #include <cstdio> 2 #include <cstring> 3 #include <queue> 4 #include <cmath> 5 #include <algorithm> 6 #include <set> 7 #
阅读全文
摘要:Kim is a magician, he can use n kinds of magic, number from 1 to n. We use string Si to describe magic i. Magic Si will make Wi points of damage. Note
阅读全文
摘要:Ladies and gentlemen, please sit up straight. Don't tilt your head. I'm serious. For nn given strings S1,S2,⋯,SnS1,S2,⋯,Sn, labelled from 11 to nn, yo
阅读全文
摘要:You've got string s, consisting of small English letters. Some of the English letters are good, the rest are bad. A substring s[l...r] (1 ≤ l ≤ r ≤ |s
阅读全文
摘要:C. Watto and Mechanism time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Watto, the owner
阅读全文
摘要:The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote fr
阅读全文
摘要:There are n distinct points in the plane, given by their integer coordinates. Find the number of parallelograms whose vertices lie on these points. In
阅读全文
摘要:During a discussion of problems at the Petrozavodsk Training Camp, Vova and Sasha argued about who of them could in 300 minutes find a pair of equal s
阅读全文
摘要:Censor frog is now a editor to censor so-called sensitive words (敏感词). She has a long text pp. Her job is relatively simple -- just to find the first
阅读全文
摘要:Description A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the
阅读全文
摘要:哈利波特在魔法学校的必修课之一就是学习魔咒。据说魔法世界有100000种不同的魔咒,哈利很难全部记住,但是为了对抗强敌,他必须在危急时刻能够调用任何一个需要的魔咒,所以他需要你的帮助。 给你一部魔咒词典。当哈利听到一个魔咒时,你的程序必须告诉他那个魔咒的功能;当哈利需要某个功能但不知道该用什么魔咒时
阅读全文

浙公网安备 33010602011771号