原创 codeforces #416 div2 811A-Vladik and Courtesy

time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output

原创 hdu 1827 ---A+B again

Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If yo

原创 概率

時間限制1秒 內存限制64M 題目表述    有n個房間,標號從1到n。對於房間i,如果i是奇數(偶數),從該房間到所有偶數(奇數)的房間k(k>i)都有一條單向通道(不能從k走回i)。小強有強烈的選擇恐懼症,他選擇任何一條道路的

原创 codeforces #352(div1)-Robin Hood

time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output

原创 vector—— String Manipulation 1.0

One popular website developed an unusual username editing procedure. One can change the username only by deleting some

原创 HDU 2473——junk mails

Recognizing junk mails is a tough task. The method used here consists of two steps:  1) Extract the common characterist

原创 HDU5032--Grade

Ted is a employee of Always Cook Mushroom (ACM). His boss Matt gives him a pack of mushrooms and ask him to grade each

原创 Factorial vs Power

Consider two integer sequences f(n) = n! and g(n) = an, where n is a positive integer. For any integer a > 1 the second

原创 Benches

The city park of IT City contains n east to west paths and n north to south paths. Each east to west path crosses each

原创 HDU-5510 Bazinga

Ladies and gentlemen, please sit up straight. Don't tilt your head. I'm serious. For n n given strings S 1 ,S 2 ,⋯,S

原创 period

For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive),

原创 HDU3427-Clickomania

Clickomania Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s):

原创 Kmp簡單應用——Number Sequence

Given two sequences of numbers : a1 1, a2 2, ...... , aN N, and b1 1, b2 2, ...... , bM M (1 <= M <= 10000, 1 <=

原创 親和串

人隨着歲數的增長是越大越聰明還是越大越笨,這是一個值得全世界科學家思考的問題,同樣的問題Eddy也一直在思考,因爲他在很小的時候就知道親和串如何判斷了,但是發現,現在長大了卻不知道怎麼去判斷親和串了,於是他只好又再一次來請教聰明且樂於助人

原创 花布條

一塊花布條,裏面有些圖案,另有一塊直接可用的小飾條,裏面也有一些圖案。對於給定的花布條和小飾條,計算一下能從花布條中儘可能剪出幾塊小飾條來呢? Input輸入中含有一些數據,分別是成對出現的花布條和小飾條,其布條都是用可見ASCII字符