# Codeforces 892 B. Wrath （递推）

Description Hands that shed innocent blood! There are n guilty people in a line, the i-th of them holds a claw with length Li. The bell rings ...

# Codeforces 892 C. Pride （枚举）

Description You have an array a with length n, you can perform operations. Each operation is like this: choose two adjacent elements from a, say x ...

# Codeforces 892 D. Gluttony （思维）

Description You are given an array a with n distinct integers. Construct an array b by permuting a such that for every non-empty subset of indices ...

# Codeforces 890 D. Boxes And Balls （哈夫曼）

Description Ivan has n different boxes. The first of them contains some balls of n different colors. Ivan wants to play a strange game. He wan...

# Codeforces 890 D. Restoration of string （技巧）

Description A substring of some string is called the most frequent, if the number of its occurrences is not less than number of occurrences of any ...

# Codeforces 890 C. Petya and Catacombs （贪心）

Description A very brave explorer Petya once decided to explore Paris catacombs. Since Petya is not really experienced, his exploration is just wal...

# 51nod 1350 斐波那契表示 （数学）

Description 每一个正整数都可以表示为若干个斐波那契数的和，一个整数可能存在多种不同的表示方法，例如：14 = 13 + 1 = 8 + 5 + 1，其中13 + 1是最短的表示（只用了2个斐波那契数）。定义F(n) = n的最短表示中的数字个数，F(14) = 2，F(100) =...

# FZU 2214 Knapsack problem （超大容量背包）

Description Given a set of n items, each with a weight w[i] and a value v[i], determine a way to choose the items into a knapsack so that the total...

# 51nod 1829 函数 （斯特林数）

Description 想知道f:A->B这个函数（其中|A|=n, |B|=m）的所有映射关系要使B的每个元素都要被A的一个元素覆盖到。 数字可能很大你只要输出方案数模1,000,000,007即可。  Input 一共一行两个数，n和m。（1<=n,m<=1...

# 51nod 1836 战忽局的手段 （期望）

Description 众所周知，有一个神秘的组织——战忽局，在暗中保护着我们。在局中任职的官员都有着极强的忽悠技巧，不只能用预言，还能用往事忽悠人。如今某外星间谍已经获得了战忽局曾经参与的n次事件的资料，局座发现了这件事，于是决定再次用忽悠来保证战忽局的安全。局座将发表m次演讲，每一天他都会...

# ZOJ 3987 Numbers （贪心）

Description DreamGrid has a nonnegative integer nn. He would like to divide nn into mm nonnegative integers a1,a2,…,ama_1, a_2, \dots, a_m and mini...

个人资料
等级：
访问量： 36万+
积分： 1万+
排名： 2006
欢迎关注 <千与梦随> 哦！
博客专栏
 那些年,我们一起追过的算法 文章：6篇 阅读：23959
最新评论