Codeforces
文章平均质量分 80
安庆闪耀
这个作者很懒,什么都没留下…
展开
-
Codeforces 616D Longest k-Good Segment(双指针)
The array a with n integers is given. Let's call the sequence of one or more consecutive elements in a segment. Also let's call the segment k-good if it contains no more than k different values.原创 2016-01-17 21:56:07 · 1058 阅读 · 0 评论 -
codeforces 86D. Powerful array(莫队算法)
An array of positive integers a1, a2, ..., an is given. Let us consider its arbitrary subarray al, al + 1..., ar, where 1 ≤ l ≤ r ≤ n. For every positive integer s denote by Ks the number of o原创 2016-04-20 20:35:27 · 2355 阅读 · 0 评论 -
codeforces 607 B Zuma(区间dp)
Genos recently installed the game Zuma on his phone. In Zuma there exists a line of n gemstones, the i-th of which has color ci. The goal of the game is to destroy all the gemstones in the line as原创 2016-03-10 22:06:46 · 523 阅读 · 0 评论 -
codeforces 607 A Chain Reaction (二分)
There are n beacons located at distinct positions on a number line. The i-th beacon has position ai and power level bi. When the i-th beacon is activated, it destroys all beacons to its left (di原创 2016-03-10 21:43:04 · 371 阅读 · 0 评论 -
codeforces 629C Famil Door and Brackets(dp)
As Famil Door’s birthday is coming, some of his friends (like Gabi) decided to buy a present for him. His friends are going to buy a string consisted of round brackets since Famil Door loves string of原创 2016-02-26 19:26:42 · 1976 阅读 · 0 评论 -
CF 616C The Labyrinth(dfs)
You are given a rectangular field of n × m cells. Each cell is either empty or impassable (contains an obstacle). Empty cells are marked with '.', impassable cells are marked with '*'. Let's call原创 2016-01-14 12:50:07 · 868 阅读 · 0 评论 -
Codeforces 579A. Raising Bacteria(位运算)
You are a lover of bacteria. You want to raise some bacteria in a box.Initially, the box is empty. Each morning, you can put any number of bacteria into the box. And each night, every bacterium in原创 2016-04-22 17:58:33 · 466 阅读 · 0 评论 -
Codeforces 558C. Amr and Chemistry(暴搞)
Amr loves Chemistry, and specially doing experiments. He is preparing for a new interesting experiment.Amr has n different types of chemicals. Each chemical i has an initial volume of ai liters.原创 2016-04-22 18:01:22 · 1227 阅读 · 0 评论