
CodeForces
文章平均质量分 88
Alex_McAvoy
想要成为渔夫的猎手
展开
-
Yet Another Walking Robot(CF-1296C)
Problem DescriptionThere is a robot on a coordinate plane. Initially, the robot is located at the point (0,0). Its path is described as a string s of length n consisting of characters 'L', 'R', 'U'...原创 2020-02-06 00:34:01 · 699 阅读 · 0 评论 -
Food Buying(CF-1296B)
Problem DescriptionMishka wants to buy some food in the nearby shop. Initially, he has s burles on his card.Mishka can perform the following operation any number of times (possibly, zero): choose...原创 2020-02-05 22:55:12 · 882 阅读 · 0 评论 -
Array with Odd Sum(CF-1296A)
Problem DescriptionYou are given an array a consisting of n integers.In one move, you can choose two indices 1≤i,j≤n such that i≠j and set ai:=aj. You can perform such moves any number of times (...原创 2020-02-05 22:47:41 · 652 阅读 · 0 评论 -
Product of Three Numbers(CF-1294C)
Problem DescriptionYou are given one integer number n. Find three distinct integers a,b,c such that 2≤a,b,c and a⋅b⋅c=n or say that it is impossible to do it.If there are several answers, you can...原创 2020-01-24 16:20:37 · 733 阅读 · 0 评论 -
Collecting Packages(CF-1294B)
Problem DescriptionThere is a robot in a warehouse and n packages he wants to collect. The warehouse can be represented as a coordinate grid. Initially, the robot stays at the point (0,0). The i-th...原创 2020-01-24 15:38:20 · 1006 阅读 · 0 评论 -
Collecting Coins(CF-1294A)
Problem DescriptionPolycarp has three sisters: Alice, Barbara, and Cerene. They're collecting coins. Currently, Alice has a coins, Barbara has b coins and Cerene has c coins. Recently Polycarp has ...原创 2020-01-24 14:26:27 · 1241 阅读 · 0 评论 -
JOE is on TV!(CF-1293B)
Problem DescriptionOur dear Cafe's owner, JOE Miller, will soon take part in a new game TV-show "1 vs. n"!The game goes in rounds, where in each round the host asks JOE and his opponents a common...原创 2020-01-21 19:39:33 · 821 阅读 · 0 评论 -
ConneR and the A.R.C. Markland-N (CF-1293A)
Problem DescriptionA.R.C. Markland-N is a tall building with n floors numbered from 1 to n. Between each two adjacent floors in the building, there is a staircase connecting them.It's lunchtime fo...原创 2020-01-20 21:59:27 · 1542 阅读 · 0 评论 -
Polycarp's Pockets(CF-1003A)
Problem DescriptionPolycarp has nn coins, the value of the i-th coin is aiai. Polycarp wants to distribute all the coins between his pockets, but he cannot put two coins with the same value into th...原创 2019-05-09 12:28:08 · 546 阅读 · 0 评论 -
Binary String Constructing(CF-1003B)
Problem DescriptionYou are given three integers aa, bb and xx. Your task is to construct a binary string ss of length n=a+b such that there are exactly aa zeroes, exactly bb ones and exactly xindi...原创 2018-08-05 20:00:58 · 360 阅读 · 0 评论 -
Intense Heat(CF-1003C)
Problem DescriptionThe heat during the last few days has been really intense. Scientists from all over the Berland study how the temperatures and weather change, and they claim that this summer is ...原创 2018-08-05 20:11:44 · 293 阅读 · 0 评论 -
Tanya and Stairways(CF-1005A)
Problem DescriptionLittle girl Tanya climbs the stairs inside a multi-storey building. Every time Tanya climbs a stairway, she starts counting steps from 1 to the number of steps in this stairway. ...原创 2018-08-05 20:17:11 · 411 阅读 · 0 评论 -
Delete from the Left(CF-1005B)
Problem DescriptionYou are given two strings s and t. In a single move, you can choose any of two strings and delete the first (that is, the leftmost) character. After a move, the length of the str...原创 2018-08-05 20:21:56 · 466 阅读 · 0 评论 -
Summarize to the Power of Two(CF-1005C)
Problem DescriptionA sequence a1,a2,…,an is called good if, for each element aiai, there exists an element ajaj (i≠j) such that ai+aj is a power of two (that is, 2d for some non-negative integer dd...原创 2018-08-06 07:54:26 · 394 阅读 · 0 评论 -
Points in Segments(CF-1015A)
Problem DescriptionYou are given a set of n segments on the axis Ox, each segment has integer endpoints between 1 and mm inclusive. Segments may intersect, overlap or even coincide with each other....原创 2018-08-06 08:35:43 · 392 阅读 · 0 评论 -
Obtaining the String(CF-1015B)
Problem DescriptionYou are given two strings s and t. Both strings have length nn and consist of lowercase Latin letters. The characters in the strings are numbered from 1 to n.You can successive...原创 2018-08-06 10:49:03 · 474 阅读 · 0 评论 -
Songs Compression(CF-1015C)
Problem DescriptionIvan has nn songs on his phone. The size of the ii-th song is ai bytes. Ivan also has a flash drive which can hold at most m bytes in total. Initially, his flash drive is empty....原创 2018-08-06 08:43:00 · 717 阅读 · 0 评论 -
Walking Between Houses(CF-1015D)
Problem DescriptionThere are n houses in a row. They are numbered from 1to nn in order from left to right. Initially you are in the house 1.You have to perform kk moves to other house. In one mo...原创 2018-08-06 11:14:08 · 380 阅读 · 0 评论 -
Adjacent Replacements(CF-1006A)
Problem DescriptionMishka got an integer array a of length nas a birthday present (what a surprise!).Mishka doesn't like this present and wants to change it somehow. He has invented an algorithm...原创 2018-08-06 08:51:37 · 351 阅读 · 0 评论 -
Polycarp's Practice(CF-1006B)
Problem DescriptionPolycarp is practicing his problem solving skill. He has a list of nn problems with difficulties a1,a2,…,an, respectively. His plan is to practice for exactly kk days. Each day h...原创 2018-08-06 08:58:47 · 366 阅读 · 0 评论 -
Three Parts of the Array(CF-1006C)
Problem DescriptionYou are given an array d1,d2,…,dn consisting of nn integer numbers.Your task is to split this array into three parts (some of which may be empty) in such a way that each elemen...原创 2018-08-06 09:07:09 · 324 阅读 · 0 评论 -
Two Strings Swaps(CF-1006D)
Problem DescriptionYou are given two strings a and b consisting of lowercase English letters, both of length n. The characters of both strings have indices from 1 to n, inclusive.You are allowed ...转载 2018-08-06 12:02:29 · 509 阅读 · 0 评论 -
Polycarp and Div3(CF-1005D)
Problem DescriptionPolycarp likes numbers that are divisible by 3.He has a huge number ss. Polycarp wants to cut from it the maximum number of numbers that are divisible by 3. To do this, he make...原创 2018-08-06 07:55:07 · 447 阅读 · 0 评论 -
Points and Powers of Two(CF-988D)
Problem DescriptionThere are n distinct points on a coordinate line, the coordinate of i-th point equals to xi. Choose a subset of the given set of points such that the distance between each pair o...原创 2018-08-07 19:36:47 · 455 阅读 · 0 评论 -
Mishka and Contest(CF-999A)
Problem DescriptionMishka started participating in a programming contest. There are nn problems in the contest. Mishka's problem-solving skill is equal to kk.Mishka arranges all problems from the...原创 2018-08-07 18:46:31 · 421 阅读 · 0 评论 -
Equalize the Remainders(CF-999D)
Problem DescriptionYou are given an array consisting of n integers a1,a2,…,an, and a positive integer m. It is guaranteed that m is a divisor of n.In a single move, you can choose any position i ...原创 2018-08-07 19:42:36 · 477 阅读 · 1 评论 -
Alphabetic Removals(CF-999C)
Problem DescriptionYou are given a string sconsisting of n lowercase Latin letters. Polycarp wants to remove exactly kcharacters (k≤n) from the string s. Polycarp uses the following algorithm kt...原创 2018-08-07 18:28:20 · 409 阅读 · 0 评论 -
Reversing Encryption(CF-999B)
Problem DescriptionA string ss of length nn can be encrypted by the following algorithm:iterate over all divisors of nn in decreasing order (i.e. from n to 1),for each divisor dd, reverse the su...原创 2018-08-07 17:36:08 · 282 阅读 · 0 评论 -
Substrings Sort(CF-988B)
Problem DescriptionYou are given n strings. Each string consists of lowercase English letters. Rearrange (reorder) the given strings in such a way that for every string, all strings that are placed...原创 2018-08-07 17:29:37 · 370 阅读 · 0 评论 -
Diverse Team(CF-988A)
Problem DescriptionThere are nn students in a school class, the rating of the i-th student on Codehorses is aiai. You have to form a team consisting of kk students (1≤k≤n) such that the ratings of ...原创 2018-08-07 17:22:25 · 549 阅读 · 0 评论 -
Equal Sums(CF-988C)
Problem DescriptionYou are given k sequences of integers. The length of the i-th sequence equals to nini.You have to choose exactly two sequences iand j(i≠j) such that you can remove exactly on...原创 2018-08-07 19:10:16 · 330 阅读 · 0 评论 -
File Name(CF-978B)
Problem DescriptionYou can not just take the file and send it. When Polycarp trying to send a file in the social network "Codehorses", he encountered an unexpected problem. If the name of the file ...原创 2018-08-09 17:27:52 · 427 阅读 · 0 评论 -
Letters(CF-978C)
Problem DescriptionThere are nn dormitories in Berland State University, they are numbered with integers from 1 to n. Each dormitory consists of rooms, there are aiai rooms in i-th dormitory. The r...原创 2018-08-09 17:32:49 · 431 阅读 · 0 评论 -
Remove Duplicates(CF-978A)
Problem DescriptionPetya has an array aa consisting of n integers. He wants to remove duplicate (equal) elements.Petya wants to leave only the rightmost entry (occurrence) for each element of the...原创 2018-08-09 17:23:21 · 342 阅读 · 0 评论 -
Divide by three, multiply by two(CF-977D)
Problem DescriptionPolycarp likes to play with numbers. He takes some integer number x, writes it down on the board, and then performs with it n−1 operations of the two kinds:divide the number x ...原创 2018-08-09 17:08:24 · 499 阅读 · 0 评论 -
Less or Equal(CF-977C)
Problem DescriptionYou are given a sequence of integers of length nand integer number k. You should print any integer number x in the range of [1;109] (i.e. 1≤x≤10^9) such that exactly k elements ...原创 2018-08-09 17:15:33 · 416 阅读 · 2 评论 -
Two-gram(CF-977B)
Problem DescriptionTwo-gram is an ordered pair (i.e. string of length two) of capital Latin letters. For example, "AZ", "AA", "ZA" — three distinct two-grams.You are given a string sconsisting o...原创 2018-08-09 17:19:53 · 460 阅读 · 0 评论 -
Almost Arithmetic Progression(CF-978D)
Problem DescriptionPolycarp likes arithmetic progressions. A sequence [a1,a2,…,an] is called an arithmetic progression if for each i (1≤i<n) the value ai+1−ai is the same. For example, the seque...原创 2018-08-10 16:47:32 · 462 阅读 · 0 评论 -
Vasya And The Mushrooms(CF-1016C)
Problem DescriptionVasya's house is situated in a forest, and there is a mushroom glade near it. The glade consists of two rows, each of which can be divided into n consecutive cells. For each cell ...原创 2018-08-14 15:46:13 · 694 阅读 · 0 评论 -
Elections(CF-1020C)
Problem DescriptionAs you know, majority of students and teachers of Summer Informatics School live in Berland for the most part of the year. Since corruption there is quite widespread, the followi...原创 2018-08-14 16:21:48 · 634 阅读 · 0 评论