By gen, 11 years ago, translation, In English

Hello everyone!

The anniversary Codeforces Round #200 is scheduled to take place today at 7:30 PM Moscow time. The round will be held in both divisions and will be rated.

The round problems were prepared by Evgeny Vihrov (gen), Andrey Vihrov (andreyv) and Gerald Agapov (Gerald). As always, we would like to thank Mike Mirzayanov (MikeMirzayanov) for the Codeforces and Polygon systems, and also Maria Belova (Delinur) for translating the problem statements.

In this round you will help mad scientist Mike to realise his peculiar ideas and carry out unusual experiments. The authors think that the problems constitute a good balance between mathematics and programming. We also tried to make the statements short and easy to read :] As always, we hope that every participant will find a problem to his taste.

We wish you good luck and an interesting round!

UPD1: Score distribution is standard:

DivI: 500 1000 1500 2000 2500

DivII: 500 1000 1500 2000 2500

UPD2: Congratulations to the top 5 winners in each division!

DivI

DivI

  1. tourist
  2. KADR
  3. SillyHook06
  4. niyaznigmatul
  5. Igor_Kudryashov

DivII

  1. Giraffy
  2. jzc
  3. ryad0m
  4. Kamilot
  5. API

Full text and comments »

  • Vote: I like it
  • +204
  • Vote: I do not like it

By Nickolas, 11 years ago, translation, In English

This time the language is Ada, chosen not for being particularly crazy (it's too Pascal-like to my taste) but for its name. Indeed, a language named for Ada Lovelace seems to be a perfect fit for programmers' professional holiday. I tried to balance the lack of language weirdness by problems somewhat less trivial than usual.

Here is the traditional solution for "A+B" problem (integers A and B can be given in one line):

with Ada.Integer_Text_IO;
use Ada.Integer_Text_IO;

procedure AplusB is
    A, B: Integer;

begin
    Get(Item => A);
    Get(Item => B);
    Put(Item => A + B, Width => 1);
end AplusB;

The testing system uses gnat 4.7.2. To test your programs before submitting, you can:

  • use “Custom test” tab in the contest interface.
  • use ideone, language Ada (gnat-4.6). Remember that by default programs submitted by anonymous are shown in “recent codes”; to avoid this I recommend registering and using "private" privacy option or at least use "secret" option.
  • install the compiler locally.

If you use Linux, this compiler is present in the repositories (version 4.4.3 for my Kubuntu). After installing the compiler use gnat make file.adb to compile the code and create the executable. If you have mingw installed, you can run mingw-get install ada and then compile gnatmake file.adb.


September 13th will be Friday the 13th, Programmers' Day — this year not only a professional holiday but also a Surprise Language Round!

The rules of the contest are as follows:

  • The contest is unrated for everybody.
  • The round uses ACM ICPC rules: the standing is defined by the number of solved problems, ties are resolved based on penalty time. Initially the penalty is 0, and for each solved problem it is increased by submission time (since the start of the contest) + 20 minutes for each failed submission. The solution is considered to be correct if it passes all tests from a predefined test set; you know whether the solution is right immediately after sending it. There are no hacks
  • The round has 7 problems, sorted by estimated complexity, and you have 2 hours to solve it.
  • Solutions are accepted only in one language, which will be announced at the beginning of the contest. The language was created a while ago, we didn't invent it for this occasion.
  • Please reread this post at the beginning of the contest: we will announce the language and add instructions to install the compiler (the contest interface will provide an option to run your solutions online as well) and links to useful manuals. Other than that, learning the language is up to the competitor. You can use any resources to solve the problems (as long as you remember that this is an individual competition); you don't have to limit yourself to the manuals provided in the post.

We hope that the language we chose will be unknown to most of the competitors.

Full text and comments »

  • Vote: I like it
  • +230
  • Vote: I do not like it

By MikeMirzayanov, 11 years ago, translation, In English

The new season of a collegiate team championship ACM-ICPC is about to start. For example, the registration for the Southern (Saratov) Subregional Contest is already running. I am sure that many participants of the Codeforces rounds will take part in ACM-ICPC this year.

We are launching a series of weekly practice trainings on Codeforces. Naturally, they will be held within Codeforces::Gym. Feel free to participate!

The practice starts at about 12:10 PM (UTC), which is 16:10 Moscow Time. We are going to practice using the problems of different contests of the past years. All you need is common sense and observing these simple rules:

  • We will not publish the problem source before the practice starts. We want you to solve the problems on your own in a fair competition. If you use somebody else’s code or cheat in any other way, you will be disqualified. If you don’t want to solve on your own, that’s fine, you don’t have to. But spoiling the practice for others is unacceptable.
  • Do not discuss the problems till the practice ends.
  • We will rarely answer the questions about problems. If you’ve found some obvious bug, please let me know. We will fix the bug and send everybody the note about the fix.
  • If you have a coach account (and you do not participate in the practice), we will be grateful for your help.
  • Please register for the practice with the people from your team who actually participates in it.
  • From time to time, I am going to ask some of the jury of the past contests or coaches from other higher educational institutions to help with preparing or share materials — your understanding and help will be greatly appreciated!
  • if you solved the contest problems before just switch to another training or inform us via problem questions form, we will move you to out-of-competition role.

The first practice takes place on September, 11, at about 12:10 PM (UTC).

Full text and comments »

  • Vote: I like it
  • +218
  • Vote: I do not like it

By HolkinPV, 11 years ago, translation, In English

Good day)

Welcome to regular Codeforces round #199 for Div.2 participants. As always Div.1 participants can take part out of the competition.

The problems were prepared by authors Pavel Kholkin (HolkinPV) and Gerald Agapov (Gerald). Traditionally thanks to Michael Mirzayanov (MikeMirzayanov) for Codeforces and Polygon systems and Mary Belova (Delinur) for translating the problems.

UPD: Score distribution is standard500-1000-1500-2000-2500.

We wish everyone good luck, high rating and excellent mood)

UPD2: the contest is over, hope you enjoy it)

Congratulations to winners:

1) chixianglove
2) Logvinov_Leon
3) Yoshiap
4) _moonlight

UPD3: the editorial is published here

Full text and comments »

  • Vote: I like it
  • +86
  • Vote: I do not like it

By MikeMirzayanov, 11 years ago, translation, In English

With the help of some experienced and respected members of the community (thanks!) there was formulated a rule that allows a third party code to be used under certain conditions. Please read carefully the text.

The following text will go as part of a renewed competition rules. The closest contest will be held already on the updated rules. Thus, there are about two days for further details, if something is unclear.

Solutions and test generators can only use source code completely written by you, with the following two exceptions:

  1. the code was written and published/distributed before the start of the round,
  2. the code is generated using tools that were written and published/distributed before the start of the round.

Any usage of third-party code should not violate the right holder’s license or copyright. Remember that published code is not always free to use! At the request of the right holder, any code that violates the license or copyright may be considered as violating the rules.

All the changes in the code from exceptions 1) and/or 2) must be made solely by you.

If there are any doubts about the time of publication, possible collaboration etc., a participant will have to prove his/her complete innocence by presenting compelling and satisfactory evidence.

Currently, the only reliable proof is the presence of code on the Internet and the presence of the used edition in the cache of well-known search engines.

For example, this rule accepts the use of the code from the website http://e-maxx.ru/ if the code was written and published/distributed before the start of the round. With the help of search engine caches, it can be easily shown that such code doesn't violate the rules. Similarly, it is permissible to use the code from a book/article that was published before the contest. On the other hand, using team reference code (for example, prepared for ACM-ICPC World Finals) is not allowed if there is no reliable and objective way to prove that the code was written before the contest.

This rule doesn't loosen the rules about prohibiting of communication, discussion, or any other form of communication between the contestants on any topics about the problems during the round.

Full text and comments »

  • Vote: I like it
  • +111
  • Vote: I do not like it

By fchirica, 11 years ago, In English

Hello everyone!

We invite you to participate at Codeforces Round #198, scheduled Friday, 30 August at 7:30 PM MSK. The authors of the problems are me and Linh (ll931110). We are also the authors of the Codeforces Round 191 (Div. 2). Last time, we received positive feedback for the round. We hope this round will be at least as good as the previous one.

Linh brought to you D2-C/D1-A and D2-E/D1-C. I wrote the rest of the tasks. We hope you'll spend more time writing on the paper and thinking than typing on the PC. In addition, all tasks don't require too complicated algorithms. Instead, all require some creativity, hard working and patience. BTWs, the main character of the round will be Iahub, as in the previous one.

I'd like to thank to DamianS, Gerald and Aksenov239 for testing the round. Without them, my job would have been certainly harder. Also, thanks to Delinur for translating the tasks and to MikeMirzayanov for the amazing Codeforces platform and Polygon system.

We wish everyone high rating and to have fun!

UPD1 The score distribution will be dynamic in both divisions. For more information please look here. The problems are sorted in our expected order of difficulty.

UPD2 Thanks for everyone who participated. I hope you fount problems interesting. Also, I think my prevision that you'll think more than write was correct :)

Congratulations to the winners.

Division 1

  1. yeputons
  2. KADR
  3. ftiasch
  4. Myth5
  5. huzecong
  6. R_R_
  7. Gabaum
  8. James
  9. ifsmirnov
  10. niyaznigmatul

Special congratulations to Igor_Kudryashov, the only person who solved D1-E!

Division 2

  1. Azat_Yusupov
  2. angel_of_monkey
  3. molamola.
  4. iseriohn
  5. Mato_No1
  6. silver__bullet
  7. TheDude
  8. Nero
  9. khuebeo
  10. uc-nuts

UPD3 The editorial has been finished. I'm waiting for your feedback / questions.

Full text and comments »

  • Vote: I like it
  • +207
  • Vote: I do not like it

By Fefer_Ivan, 11 years ago, translation, In English

Hello, Codeforces.

Today at 19:30 moscow time, Codeforces Round #197 will take place.

Authors of this round are me and Gerald. I'd like to thank the following people for their contribution: Delinur for translation of the statements and MikeMirzayanov for creation and supportion of Codeforces.

The score for problems: 500 — 1000 — 1500 — 2000 — 3000.

Good luck!

UPD: To make the announcement more interestiong and thrilling we decided to add a horse joke and a photo, taken during the preparation of the round.

Q: What did the teacher say when the horse walked into the class?
A: Why the long face?

Full text and comments »

  • Vote: I like it
  • +215
  • Vote: I do not like it

By gojira, 11 years ago, translation, In English

337A - Puzzles

First, let's sort the numbers f[i] in ascending order. Now assume that the smallest jigsaw puzzle which the teacher purchases consists of f[k] pieces. Obviously, she should buy the smallest n puzzles which are of size f[k] or greater to minimize the difference. These are the puzzles f[k], f[k+1], ..., f[k+n-1] (this is not correct when f[i] are not distinct and f[k]=f[k-1], but such cases can be skipped). The difference between the greatest and the least size of the puzzles in such set is f[k+n-1]-f[k].

To choose the optimal f[k], we can test every k between 1 and m-n and pick the one producing the least difference. The full algorithm is as follows:

read(n, m, f[1..m])
sort(f[1..m])
best = INFINITY
for k = 1 to m-n
  best = min(best, f[k+n-1] - f[k])
print best

Full text and comments »

  • Vote: I like it
  • +171
  • Vote: I do not like it

By gojira, 11 years ago, translation, In English

Hello everyone!

Codeforces Round #196 will begin in several hours (August 16, 20:00MSK).

You will mostly have to deal with Manao's problems, which this time range from watching movies and taking quizzes to treebuilding and battling evil undead.

I'd like to thank the following people for their contribution to this round's preparation: the Codeforces problem coordinator Gerald; Seyaua, who tested the problems; Delinur, who translated the problem statements into English; and Aksenov239, who proof-read the statements.

The points distribution in both divisons will be standard.

By the way, Sammarize mentioned he was probably the eldest author of a Codeforces round in the Russian version of his latest round's announcement. Since I'm even older, now I am holding the title ;)

The contest is over, I really hope that enjoyed it. The standings: Div1, Div2. Congratulations to top performers in Div1:

  1. tourist
  2. ilyakor
  3. al13n
  4. aa2985759
  5. rng_58

Congratulations to the winner of Div2, Ruthles, too!

The problem analysis is here.

Full text and comments »

  • Vote: I like it
  • +263
  • Vote: I do not like it

By gridnevvvit, 11 years ago, translation, In English

Hello!

Soon (on August 9 at 19:30 MSK) you are lucky to participate in Codeforces Round #195 for Div. 2 participants. Traditionally, Div. 1 participants can take part out of the competition.

Problems have been prepared by me. I want to thank Gerald Agapov (Gerald) for help in preparation of this round, Eugene Sobolev (Seyaua), Vitaly Aksenov (Aksenov239) and Sergey Sukhov (Serega) for testing of problems, Alexander Ignatyev (aiMR) for testing of problems and for translation of tutorial, Michael Mirzayanov (MikeMirzayanov) for marvelous Codeforces and Polygon systems, Mary Belova (Delinur) for translation of statements.

We wish everyone good luck and high rating!

UPD: English tutorial

UPD: Congratulations for winners:

  1. Triolossus_3
  2. WHITE2302
  3. PM2.5

Separately, I want to congratulate Egor Kulikov (Egor) — the only person who had passed the all problems!

Full text and comments »

  • Vote: I like it
  • +90
  • Vote: I do not like it