随笔分类 - 数据结构
摘要:Using regular expression to define a numeric string is a very common thing. Generally, use the shape as follows: (0|9|7) (5|6) (2) (4|5) Above regular
阅读全文
摘要:Problem Description Nowadays, at least one wrestling match is held every year in our country. There are a lot of people in the game is "good player”,
阅读全文
摘要:Japari Park is a large zoo home to extant species, endangered species, extinct species, cryptids and some legendary creatures. Due to a mysterious sub
阅读全文
摘要:1.hdu--4513 吉哥系列故事——完美队形II http://acm.hdu.edu.cn/showproblem.php?pid=4513 题意:中文题不解释 思路:数字型的manachar算法。将模板中的比较字符改为比较数字就行了。 AC代码: 1 #include <iostream>
阅读全文
摘要:Description 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度. 回文就是正反读都是一样的字符串,如aba, abba等 Description 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度. 回文就是正反读都是一
阅读全文
摘要:关于ac自动机模板是非常重要的,在上一篇文章中已经给出了非常好用的数组类型的模板。下面的题目都是在模板之上进行略微修改就能ac的简单题 1.hdu--3065 病毒侵袭持续中 http://acm.hdu.edu.cn/showproblem.php?pid=3065 题意:统计子串在主串中出现的次
阅读全文
摘要:Description 当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋――我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~ 但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸成为受害者之一
阅读全文
摘要:Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重
阅读全文
摘要:Description During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally s
阅读全文
摘要:Description The cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on the sunny shores of Lake Superi
阅读全文
摘要:Description Given n integers. You have two operations: U A B: replace the Ath number by B. (index counting from 0) Q A B: output the length of the lon
阅读全文
摘要:Description Corrupt governors always find ways to get dirty money. Paint something, then sell the worthless painting at a high price to someone who wa
阅读全文
摘要:Description Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the
阅读全文
摘要:Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecut
阅读全文
摘要:Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工
阅读全文
摘要:Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral poste
阅读全文
摘要:Description An array of size n ≤ 10 6 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very
阅读全文
摘要:Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the leve
阅读全文
摘要:Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping
阅读全文
摘要:Description For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a g
阅读全文

浙公网安备 33010602011771号