Count the string(kmp+dp)

Count the string 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...

2018-01-31 10:40:50

阅读数 84

评论数 0

Seek the Name, Seek the Fame (kmp)

Seek the Name, Seek the Fame The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat t...

2018-01-30 22:46:08

阅读数 73

评论数 0

Power Strings

Power Strings Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" the...

2018-01-30 17:12:00

阅读数 124

评论数 0

剪花布条

剪花布条 一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input 输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCI...

2018-01-30 16:34:53

阅读数 143

评论数 0

The Great Mixing CodeForces - 788C (BFS)

The Great Mixing CodeForces - 788C Sasha and Kolya decided to get drunk with Coke, again. This time they have k types of Coke. i-th typ...

2018-01-29 18:24:43

阅读数 92

评论数 0

黄金分割数

黄金分割数 黄金分割数0.61803... 是个无理数,这个常数十分重要,在许多工程问题中会出现。有时需要把这个数字求得很精确。 对于某些精密工程,常数的精度很重要。也许你听说过哈勃太空望远镜,它首次升空后就发现了一处人工加工错误,对那样一个庞然大物,其实只是镜面加工时有比头发丝还...

2018-01-29 16:46:00

阅读数 297

评论数 0

New Year and Curling CodeForces - 908C

New Year and Curling CodeForces - 908C Carol is currently curling. She has n disks each with radius r on the 2D plane. Initially she...

2018-01-29 12:18:36

阅读数 78

评论数 0

Bellovin HDU - 5748 (最长上升子序列)

Bellovin HDU - 5748 Peter has a sequence a1,a2,...,an and he define a function on the sequence -- F(a1,a2,...,an)=(f1,f2,...,fn), where...

2018-01-28 22:45:05

阅读数 101

评论数 0

One-Dimensional Battle Ships CodeForces - 567D (二分做法+解释)

One-Dimensional Battle Ships CodeForces - 567D Alice and Bob love playing one-dimensional battle ships. They play on the field in the for...

2018-01-28 19:02:07

阅读数 146

评论数 0

Play a game (博弈论)

Play a game New Year is Coming! ailyanlu is very happy today! and he is playing a chessboard game with 8600. The size of the chessboard is...

2018-01-28 16:22:48

阅读数 200

评论数 0

F(x) HDU - 4734 (数位dp)

F(x) HDU - 4734 For a decimal number x with n digits (A nA n-1A n-2 ... A 2A 1), we define its weight as F(x) = A n * 2 n-1 + A n-1 * 2 n-...

2018-01-28 12:36:27

阅读数 79

评论数 0

不要62 HDU - 2089(数位dp)

不要62HDU - 2089杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。不吉利的数字为所有含有4或62的号码。例如: 62...

2018-01-28 11:13:53

阅读数 93

评论数 0

How Many Pieces of Land ? UVA - 10213 (计算几何公式)

How Many Pieces of Land ? UVA - 10213 Lemma If we already have n points on the circle and add one more point, we draw n lines from the ...

2018-01-28 10:01:06

阅读数 137

评论数 0

Coin Game HDU - 3951 (简单博弈)

Coin Game HDU - 3951 After hh has learned how to play Nim game, he begins to try another coin game which seems much easier. The game...

2018-01-27 15:43:19

阅读数 144

评论数 0

Bubble Sort HDU - 5775 (树状数组)

  Bubble Sort HDU - 5775         P is a permutation of the integers from 1 to N(index starting from 1). Here is the code of Bubble Sort in C+...

2018-01-27 15:23:18

阅读数 120

评论数 0

Sumdiv POJ - 1845 (数论)

  Sumdiv POJ - 1845         Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (t...

2018-01-26 23:56:36

阅读数 210

评论数 0

Appleman and Card Game CodeForces - 462B (贪心)

Appleman and Card Game CodeForces - 462B Appleman has n cards. Each card has an uppercase letter written on it. Toastman must choose k c...

2018-01-26 17:33:57

阅读数 113

评论数 0

4个数和为0 51Nod - 1267

4个数和为051Nod - 1267给出N个整数,你来判断一下是否能够选出4个数,他们的和为0,可以则输出"Yes",否则输出"No"。Input 第1行,1个数N,N为数组的长度(4 <= N &...

2018-01-26 17:31:31

阅读数 121

评论数 0

Mike and Chocolate Thieves CodeForces - 689C (二分思想)

Mike and Chocolate Thieves CodeForces - 689C Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local fac...

2018-01-26 17:24:53

阅读数 107

评论数 0

Two Cakes

Two Cakes It's New Year's Eve soon, so Ivan decided it's high time he started setting the table. Ivan has bought two cakes and cut them into p...

2018-01-26 11:01:04

阅读数 539

评论数 0

提示
确定要删除当前文章?
取消 删除
关闭
关闭