随笔分类 -  kuangbin

摘要:传送门 终于过了这道题。。 要注意标记之间的影响,和add操作时更新求和的顺序。 same 区间每个数设置为x标记 mult 区间每个数乘x标记 add 区间每个数加x标记 ①:当打same标记时,mult标记和add标记就没用了,要初始化。 ②:当打mult标记时,add标记也要乘相应的值。 求和 阅读全文
posted @ 2019-07-09 14:12 Frontierone 阅读(159) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-28 11:33 Frontierone 阅读(204) 评论(0) 推荐(0)
摘要:One day, sailormoon girls are so delighted that they intend to research about palindromic strings. Operation contains two steps: First step: girls wil 阅读全文
posted @ 2019-01-27 13:52 Frontierone 阅读(154) 评论(0) 推荐(0)
摘要:给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度. 回文就是正反读都是一样的字符串,如aba, abba等 Input输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S 两组case之间由空行隔开(该空行不用处理) 阅读全文
posted @ 2019-01-27 00:15 Frontierone 阅读(166) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-25 21:47 Frontierone 阅读(131) 评论(0) 推荐(0)
摘要:Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell me How many kinds of necklaces total have.(if two necklaces can 阅读全文
posted @ 2019-01-25 17:11 Frontierone 阅读(170) 评论(0) 推荐(0)
摘要:Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like tradema 阅读全文
posted @ 2019-01-21 21:27 Frontierone 阅读(240) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-21 17:18 Frontierone 阅读(249) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-21 16:10 Frontierone 阅读(138) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-21 14:22 Frontierone 阅读(145) 评论(0) 推荐(0)
摘要:The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of 阅读全文
posted @ 2019-01-18 23:19 Frontierone 阅读(239) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-14 21:18 Frontierone 阅读(132) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-14 19:27 Frontierone 阅读(171) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-14 15:39 Frontierone 阅读(187) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-14 13:47 Frontierone 阅读(151) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-14 12:01 Frontierone 阅读(158) 评论(0) 推荐(0)
摘要:一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。 阅读全文
posted @ 2019-01-13 20:21 Frontierone 阅读(167) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-13 18:06 Frontierone 阅读(172) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-13 17:39 Frontierone 阅读(133) 评论(0) 推荐(0)
摘要:There is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the leader of whole compa 阅读全文
posted @ 2018-11-02 11:44 Frontierone 阅读(175) 评论(0) 推荐(1)