随笔分类 - KMP
摘要:Solutions A. Hotelier 题意: 对应$n$个位置,如果是$L$,左边第一个为$0$的位置变为$1$,如果是$R$,右边第一个为$0$的位置变为$1$,如果是数字,对应位置变为$0$。 思路: 模拟即可。但是比赛就是无语,这么辣鸡的题目,竟然用数字判字符$0$…… cpp // d
阅读全文
摘要:After an uphill battle, General Li won a great victory. Now the head of state decide to reward him with honor and treasures for his great exploit. One
阅读全文
摘要:Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven strin
阅读全文
摘要:Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like tradema
阅读全文
摘要:You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found
阅读全文
摘要:Clairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing for sending it to y
阅读全文
摘要:It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-emp
阅读全文
摘要:The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of
阅读全文
摘要:Homer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had. Marge: Yeah, what is it? Homer: Take me for example. I
阅读全文
摘要:The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies
阅读全文
摘要:Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concate
阅读全文
摘要:For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the pr
阅读全文
摘要:CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan le
阅读全文
摘要:一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。
阅读全文
摘要: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
阅读全文
摘要:Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a
阅读全文

浙公网安备 33010602011771号