Seek the Name,Seek the Fame 过了个年,缓了这么多天终于开始刷题了,好颓废~(-.-)~ 我发现在家真的很难去学习,因为你还要陪父母,干活,做家务等等 但是还是不能浪费时间啊,要利用所有的时间去学习啊 [题目链接]Seek the Name,Seek the Fame [题目类型]KMP &题意: 给你一个字符串S.假如为ababcababababcabab 找出这个字符串中所有的前缀等于后缀的子串,输出它们的长度. 第一个为a,最后一个为b,所以1不行. 前两个为ab…
问题 G: JS Window 时间限制: 2 Sec 内存限制: 512 MB 题目描述 JSZKC has an array A of N integers. More over, he has a Window of length M which means the Window can contain M continuous integers in the array. At the begging, the Window is at the position 1 which mea…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6025 Coprime Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 666 Accepted Submission(s): 336 Problem Description Do you know what is…
http://poj.org/problem?id=2752 Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 27512 Accepted: 14244 Description The little cat is so famous, that many couples tramp over hill and dale to Byteland, and aske…
http://acm.hdu.edu.cn/showproblem.php?pid=1358 Period Problem Description 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 prefix is a periodic string.…
Given many words, words[i] has weight i. Design a class WordFilter that supports one function, WordFilter.f(String prefix, String suffix). It will return the word with given prefix and suffix with maximum weight. If no word exists, return -1. Example…
Clairewd's message Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3228 Accepted Submission(s): 1248 Problem Description Clairewd is a member of FBI. After several years concealing in BUPT,…
You are given an array d1,d2,-,dn consisting of n integer numbers. Your task is to split this array into three parts (some of which may be empty) in such a way that each element of the array belongs to exactly one of the three parts, and each of the…
题目链接:http://codeforces.com/contest/731/problem/F F. Video Cards time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Vlad is fond of popular computer game Bota-2. Recently, the developers…
Problem Description Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as “asdf” and “sdfg”, the result of the addition between them is “asdfg”, for “sdf” is…