小坏蛋_千千

I was caught in a heavy rain!

51nod 1042 数字0-9的数量 (数位dp)

Description 给出一段区间 a-b ,统计这个区间内 0-9 出现的次数。 比如 10-19,1 出现 11 次(10, 11, 12, 13, 14, 15, 16, 17, 18, 19,其中 11 包括 2 个 1 ),其余数字各出现 1 次。 &am...

2018-04-10 17:19:36

阅读数:64

评论数:0

Leetcode 813 Largest Sum of Averages (区间dp)

Description We partition a row of numbers A into at most K adjacent (non-empty) groups, then our score is the sum of the average of each group. W...

2018-04-08 15:14:53

阅读数:410

评论数:0

LOJ 6160 二分图染色 (dp,组合数学)

题目描述 给定一个完全二分图,图的左右两边的顶点数目相同。我们要把图中的每条边染成红色、蓝色、或者绿色,并使得任意两条红边不共享端点、同时任意两条蓝边也不共享端点。计算所有满足条件的染色的方案数,并对 109+7109+710^9+7 取模。   输入格...

2018-04-06 21:56:38

阅读数:116

评论数:0

Codeforces 933 A. A Twisty Movement (dp)

Description A dragon symbolizes wisdom, power and wealth. On Lunar New Year’s Day, people model a dragon with bamboo strips and clothes, raise th...

2018-02-16 10:32:19

阅读数:234

评论数:0

Codeforces 834 D. The Bakery (线段树+dp)

Description Some time ago Slastyona the Sweetmaid decided to open her own bakery! She bought required ingredients and a wonder-oven which c...

2018-02-15 00:33:17

阅读数:148

评论数:0

Codeforces 919 D. Substring (记忆化搜索)

Description You are given a graph with n nodes and m directed edges. One lowercase letter is assigned to each node. We define a path’s value as t...

2018-02-03 09:38:37

阅读数:114

评论数:0

CodeChef STRMRG String Merging (dp)

Description All submissions for this problem are available. Read problems statements in Mandarin chinese, Russian and Vietnamese as well. ...

2018-01-28 17:43:40

阅读数:102

评论数:0

Codeforces 814 C. An impassioned circulation of affection (dp)

Description Nadeko’s birthday is approaching! As she decorated the room for the party, a long garland of Dianthus-shaped paper pieces was placed ...

2018-01-28 17:23:17

阅读数:71

评论数:0

Codeforces 914 C. Travelling Salesman and Special Numbers (dp)

Description The Travelling Salesman spends a lot of time travelling so he tends to get bored. To pass time, he likes to perform operations on num...

2018-01-25 12:23:46

阅读数:146

评论数:0

Codeforces 560 E. Gerald and Giant Chess (dp,组合数学)

Description Giant chess is quite common in Geraldion. We will not delve into the rules of the game, we’ll just say that the game takes place on an ...

2017-12-02 18:52:02

阅读数:135

评论数:0

51nod 1055 最长等差数列

Description N个不同的正整数,找出由这些数组成的最长的等差数列。 例如:1 3 5 6 8 9 10 12 13 14 等差子数列包括(仅包括两项的不列举) 1 3 5 1 5 9 13 3 6 9 12 3 8 13 ...

2017-10-04 22:11:42

阅读数:142

评论数:0

POJ 3368 Frequent values (RMQ)

Description You are given a sequence of n integers a1 , a2 , … , an in non-decreasing order. In addition to that, you are given several queries con...

2017-10-03 12:46:22

阅读数:189

评论数:0

Codeforces 855 C. Helga Hufflepuff’s Cup (树形dp)

Description Harry, Ron and Hermione have figured out that Helga Hufflepuff’s cup is a horcrux. Through her encounter with Bellatrix Lestrange, Herm...

2017-09-27 21:29:02

阅读数:381

评论数:0

51nod 1791 合法括号子段 (dp)

Description 有一个括号序列,现在要计算一下它有多少非空子段是合法括号序列。 合法括号序列的定义是: 空序列是合法括号序列。 如果 S 是合法括号序列,那么 (S) 是合法括号序列。 如果 A 和 B 都是合法括号序列,那么 AB 是合法括号序列。 ...

2017-09-23 10:33:26

阅读数:264

评论数:0

HDU 6201 transaction transaction transaction (树形dp)

Description Kelukin is a businessman. Every day, he travels around cities to do some business. On August 17th, in memory of a great man, citizens w...

2017-09-21 09:14:10

阅读数:123

评论数:0

51nod 1405 树的距离之和 (树形dp)

Description 给定一棵无根树,假设它有n个节点,节点编号从1到n ,求任意两点之间的距离(最短路径)之和。  Input 第一行包含一个正整数n (n <= 100000),表示节点个数。 后面(n - 1)行,每行两个整数表示树的边。  Output 每行一...

2017-09-09 10:39:34

阅读数:184

评论数:0

POJ 3254 Corn Fields (状压dp)

Description Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow s...

2017-08-31 21:57:50

阅读数:142

评论数:0

HDU 6156 Palindrome Function (数位dp)

Description As we all know,a palindrome number is the number which reads the same backward as forward,such as 666 or 747.Some numbers are not the p...

2017-08-22 21:50:10

阅读数:242

评论数:0

HDU 6170 Two strings (dp)

Description Giving two strings and you should judge if they are matched. The first string contains lowercase letters and uppercase letters. ...

2017-08-22 19:53:59

阅读数:1081

评论数:10

HDU 6146 Pokémon GO (dp)

Description 众所周知,度度熊最近沉迷于 Pokémon GO。 今天它决定要抓住所有的精灵球! 为了不让度度熊失望,精灵球已经被事先放置在一个2*N的格子上,每一个格子上都有一个精灵球。度度熊可以选择任意一个格子开始游戏,抓捕格子上的精灵球,然后移动...

2017-08-18 21:22:33

阅读数:649

评论数:0

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