
codeforces
Kirito_Acmer
这个作者很懒,什么都没留下…
展开
-
A. Drazil and Date
Someday, Drazil wanted to go on date with Varda. Drazil and Varda live on Cartesian plane. Drazil's home is located in point (0, 0) and Varda's home is located in point (a, b). In each step, he can原创 2015-04-10 10:49:37 · 475 阅读 · 0 评论 -
Codeforces Round #309 (Div. 2) C. Kyoya and Colored Balls
Kyoya Ootori has a bag with n colored balls that are colored with k different colors. The colors are labeled from 1 to k. Balls of the same color are indistinguishable. He draws balls from the bag原创 2015-07-10 14:20:50 · 1392 阅读 · 0 评论 -
Codeforces Round #304 (Div. 2) D - Soldier and Number Game
D. Soldier and Number Gametime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo soldiers are playing a game.原创 2015-07-12 18:00:04 · 885 阅读 · 0 评论 -
Codeforces Round #312 (Div. 2) C. Amr and Chemistry
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAmr loves Chemistry, and specially doing experiments. He is prepa原创 2015-07-15 12:06:18 · 1294 阅读 · 0 评论 -
Codeforces Round #Pi (Div. 2) D. One-Dimensional Battle Ships
Alice and Bob love playing one-dimensional battle ships. They play on the field in the form of a line consisting of n square cells (that is, on a 1 × n table).At the beginning of the game Alice原创 2015-08-10 19:22:26 · 1146 阅读 · 0 评论 -
Codeforces Beta Round #92 (Div. 2 Only) B. Permutations
You are given n k-digit integers. You have to rearrange the digits in the integers so that the difference between the largest and the smallest number was minimum. Digits should be rearranged by the原创 2015-08-13 09:05:36 · 1594 阅读 · 0 评论 -
codeforces 574D. Bear and Blocks
Limak is a little bear who loves to play. Today he is playing by destroying block towers. He built n towers in a row. The i-th tower is made of hi identical blocks. For clarification see picture f原创 2015-09-16 19:32:41 · 737 阅读 · 0 评论 -
571A Lengthening Sticks
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given three sticks with positive integer lengths of a, b,原创 2015-09-18 17:40:00 · 462 阅读 · 0 评论 -
codeforces578C. Weakness and Poorness
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a sequence of n integers a1, a2, ..., an.Deter原创 2015-09-17 11:40:13 · 780 阅读 · 0 评论 -
codeforces626D . Jerry's Protest (概率)
Andrew and Jerry are playing a game with Harry as the scorekeeper. The game consists of three rounds. In each round, Andrew and Jerry draw randomly without replacement from a jar containing n balls,原创 2016-02-14 16:44:45 · 994 阅读 · 0 评论 -
codeforces626F Group Projects(dp)
DescriptionThere are n students in a class working on group projects. The students will divide into groups (some students may be in groups alone), work on their independent pieces, and then discuss原创 2016-02-15 21:58:19 · 949 阅读 · 0 评论 -
codeforces 86D D. 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-02-04 18:24:49 · 994 阅读 · 0 评论 -
codeforces 607B. Zuma
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-02-05 08:15:16 · 1378 阅读 · 0 评论 -
CodeForces 630Q Pyramids(数学公式)
IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The distinction原创 2016-02-20 17:43:55 · 1177 阅读 · 0 评论 -
codeforces629C 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-21 23:29:30 · 950 阅读 · 3 评论 -
codeforces Looksery Cup 2015 C. The Game Of Parity
There are n cities in Westeros. The i-th city is inhabited by ai people. Daenerys and Stannis play the following game: in one single move, a player chooses a certain town and burns it to the groun原创 2015-06-08 19:06:31 · 1148 阅读 · 2 评论 -
codeforces Looksery Cup 2015 D. Haar Features
The first algorithm for detecting a face on the image working in realtime was developed by Paul Viola and Michael Jones in 2001. A part of the algorithm is a procedure that computes Haar features. A原创 2015-06-08 14:42:39 · 1545 阅读 · 0 评论 -
codeforces Looksery Cup 2015 H Degenerate Matrix
The determinant of a matrix 2 × 2 is defined as follows:A matrix is called degenerate if its determinant is equal to zero.The norm ||A|| of a matrix A is defined as a maximum of absolute v原创 2015-06-07 13:13:40 · 1370 阅读 · 3 评论 -
B. OR in Matrix
Let's define logical OR as an operation on two logical values (i. e. values that belong to the set {0, 1}) that is equal to 1 if either or both of the logical values is set to 1, otherwise it is 0原创 2015-04-18 18:52:26 · 2190 阅读 · 0 评论 -
B. Fox And Two Dots
Fox Ciel is playing a mobile puzzle game called "Two Dots". The basic levels are played on a board of size n × m cells, like this:Each cell contains a dot that has some color. We will use differ原创 2015-04-11 22:10:28 · 1535 阅读 · 0 评论 -
A. Little Pony and Expected Maximum
Twilight Sparkle was playing Ludo with her friends Rainbow Dash, Apple Jack and Flutter Shy. But she kept losing. Having returned to the castle, Twilight Sparkle became interested in the dice that wer原创 2015-04-13 20:58:29 · 521 阅读 · 0 评论 -
Codeforces Round #296 (Div. 2B. Error Correct System
Ford Prefect got a job as a web developer for a small company that makes towels. His current work task is to create a search engine for the website of the company. During the development process, he n原创 2015-04-08 12:56:44 · 591 阅读 · 0 评论 -
C. New Year Book Reading
New Year is coming, and Jaehyun decided to read many books during 2015, unlike this year. He has n books numbered by integers from 1 to n. The weight of the i-th (1 ≤ i ≤ n) book is wi.As Jaeh原创 2015-04-14 15:57:48 · 792 阅读 · 0 评论 -
A. Crazy Town
Crazy Town is a plane on which there are n infinite line roads. Each road is defined by the equation aix + biy + ci = 0, where ai and biare not both equal to the zero. The roads divide the plane i原创 2015-04-14 20:57:59 · 494 阅读 · 0 评论 -
ZeptoLab Code Rush 2015 B. Om Nom and Dark Park
Om Nom is the main character of a game "Cut the Rope". He is a bright little monster who likes visiting friends living at the other side of the park. However the dark old parks can scare even somebo原创 2015-04-08 18:23:36 · 687 阅读 · 0 评论 -
B. Secret Combination
You got a box with a combination lock. The lock has a display showing n digits. There are two buttons on the box, each button changes digits on the display. You have quickly discovered that the firs原创 2015-04-16 21:20:15 · 570 阅读 · 0 评论 -
C. Anya and Smartphone
Anya has bought a new smartphone that uses Berdroid operating system. The smartphone menu has exactly n applications, each application has its own icon. The icons are located on different screens, o原创 2015-04-09 17:07:52 · 644 阅读 · 0 评论 -
A. Vitaly and Strings
Vitaly is a diligent student who never missed a lesson in his five years of studying in the university. He always does his homework on time and passes his exams in time.During the last lesson the原创 2015-04-09 21:11:09 · 492 阅读 · 0 评论 -
B. Queue
During the lunch break all n Berland State University students lined up in the food court. However, it turned out that the food court, too, has a lunch break and it temporarily stopped working.S原创 2015-04-16 20:17:58 · 608 阅读 · 0 评论 -
B. Modular Equations
Last week, Hamed learned about a new type of equations in his math class called Modular Equations. Lets define i modulo j as the remainder of division of i by j and denote it by . A Modular Equa原创 2015-04-17 17:13:59 · 771 阅读 · 0 评论 -
C. Table Decorations
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have r red, g green and b blue balloons. To decorate a sing原创 2015-04-26 16:10:11 · 759 阅读 · 0 评论 -
Codeforces Round #307 (Div. 2) B. 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 lette原创 2015-06-19 10:17:28 · 916 阅读 · 0 评论 -
Codeforces Round #341 (Div. 2) E. Wet Shark and Blocks
There are b blocks of digits. Each one consisting of the same n digits, which are given to you in the input. Wet Shark must chooseexactly one digit from each block and concatenate all of those digit原创 2016-02-03 09:52:13 · 650 阅读 · 0 评论