codeforces
文章平均质量分 84
Techay
我是为了c币才写的简介
展开
-
New Year Permutation
User ainta has a permutation p1, p2, ..., pn. As the New Year is coming, he wants to make his permutation as pretty as possible.Permutation a1, a2, ..., an is prettier than permu原创 2015-06-16 23:34:58 · 449 阅读 · 0 评论 -
Ice Sculptures
Ice Sculpturestime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Berland University is preparing to原创 2015-06-08 22:55:02 · 468 阅读 · 0 评论 -
Shortest path of the king
Shortest path of the kingtime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputThe king is left alone on the原创 2015-06-08 22:45:09 · 412 阅读 · 0 评论 -
Face Detection
Face Detectiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe developers of Looksery have to writ原创 2015-06-07 10:04:48 · 486 阅读 · 0 评论 -
Fixing Typos
Many modern text editors automatically check the spelling of the user's text. Some editors even suggest how to correct typos.In this problem your task to implement a small functionality to cor原创 2015-06-15 09:49:18 · 401 阅读 · 0 评论 -
cf599D Spongebob and Squares(推公式,枚举)
Spongebob is already tired trying to reason his weird actions and calculations, so he simply asked you to find all pairs of n and m, such that there are exactly x distinct squares in the table consisti原创 2015-11-21 09:31:11 · 815 阅读 · 0 评论 -
cf599C Day at the Beach(区间合并)
C. Day at the Beach time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output One day Squidward, Spongebob and Patrick decided to go to the beach. U原创 2015-11-21 09:20:18 · 645 阅读 · 0 评论 -
Maximum Absurdity(dp)
Reforms continue entering Berland. For example, during yesterday sitting the Berland Parliament approved as much as n laws (each law has been assigned a unique number from 1 to n). Today all these laws原创 2015-12-17 21:46:43 · 441 阅读 · 0 评论 -
Writing Code(DP)
Programmers working on a large project have just received a task to write exactly m lines of code. There are n programmers working on a project, the i-th of them makes exactly ai bugs in every line of原创 2015-12-17 21:40:20 · 490 阅读 · 0 评论 -
607A Chain Reaction(DP)
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 (direction原创 2016-01-02 17:04:53 · 899 阅读 · 0 评论 -
A and B and Interesting Substrings(dp)
A and B are preparing themselves for programming contests.After several years of doing sports programming and solving many problems that require calculating all sorts of abstract objects, A and B also原创 2015-12-17 21:52:39 · 394 阅读 · 0 评论 -
Flipping Game
Flipping Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub got bored, so he invented a game t原创 2015-06-08 23:01:35 · 493 阅读 · 0 评论 -
DZY Loves Chessboard
DZY loves chessboard, and he enjoys playing with it.He has a chessboard of n rows and m columns. Some cells of the chessboard are bad, others are good. For every good cell, DZY wants to pu原创 2015-06-11 20:43:09 · 401 阅读 · 0 评论 -
Preparing Olympiad
Preparing Olympiadtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have n problems. You have es原创 2015-06-05 22:03:15 · 396 阅读 · 0 评论 -
Two Substrings
Two Substringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given string s. Your task i原创 2015-06-05 21:58:50 · 335 阅读 · 0 评论 -
Matrix
You have a string of decimal digits s. Let’s define bij = si·sj. Find in matrix b the number of such rectangles that the sum bij for all cells (i, j) that are the elements of the rectangle equals a in原创 2015-06-26 22:07:16 · 627 阅读 · 0 评论 -
Cut Ribbon
Cut Ribbontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus has a ribbon, its length is n.原创 2015-06-05 23:10:46 · 529 阅读 · 0 评论 -
Divisibility by Eight
Divisibility by Eighttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a non-n原创 2015-06-05 22:07:01 · 351 阅读 · 0 评论 -
Exam
Student Valera is an undergraduate student at the University. His end of term exams are approaching and he is to pass exactly n exams. Valera is a smart guy, so he will be able to pass any exam he take原创 2015-06-06 23:47:38 · 443 阅读 · 0 评论 -
ZgukistringZ
Professor GukiZ doesn't accept string as they are. He likes to swap some letters in string to obtain a new one.GukiZ has strings a, b, and c. He wants to obtain string k by swapping some l原创 2015-06-13 22:18:36 · 495 阅读 · 0 评论 -
Number of Ways
You've got array a[1], a[2], ..., a[n], consisting of n integers. Count the number of ways to split all the elements of the array into three contiguous parts so that the sum of ele原创 2015-06-11 21:15:36 · 396 阅读 · 0 评论 -
Two Buttons
Vasya has found a strange device. On the front panel of a device there are: a red button, a blue button and a display showing some positive integer. After clicking the red button, device multi原创 2015-06-11 20:52:45 · 417 阅读 · 0 评论 -
Dreamoon and WiFi
Dreamoon is standing at the position 0 on a number line. Drazil is sending a list of commands through Wi-Fi to Dreamoon's smartphone and Dreamoon follows them.Each command is one of the foll原创 2015-06-11 20:45:41 · 576 阅读 · 0 评论 -
Caesar's Legions(记忆化搜索)
Gaius Julius Caesar, a famous general, loved to line up his soldiers. Overall the army had n1 footmen and n2 horsemen. Caesar thought that an arrangement is not beautiful if somewhere in the line there原创 2015-12-17 21:56:59 · 623 阅读 · 0 评论