By Fefer_Ivan, 11 years ago, translation, In English

Good night/dawn/morning/day/dusk/evening/night, Codeforces!

Today I am glad to present you the latest features of the Polygon — the system for creation and preparation of programming problems and contests. All Codeforces Rounds are made using Polygon.

New features are concentrated around test script.

Old script field

Part one. Test autonumeration

The first new feature allows you to automatically numerate tests.

Instead of this

gen_n 5 10 1 > 57
gen_n 5 10 2 > 58
gen_n 5 10 3 > 59
gen_n 5 10 4 > 60
gen_n 5 10 5 > 61

you can now write this

gen_n 5 10 1 > $
gen_n 5 10 2 > $
gen_n 5 10 3 > $
gen_n 5 10 4 > $
gen_n 5 10 5 > $

Dollar sign, used to mark autonumeration, stands for the first unused test index. So, for example:

gen 1 > $
gen 2 > $
gen 4 > $
gen 5 > $
gen 3 > 3

will be translated to

gen 1 > 1
gen 2 > 2
gen 3 > 3
gen 4 > 4
gen 5 > 5

But don't you think, that dollars will be replace with actual numbers upon saving the script. It would be too easy and boring. Of course, they stay. If you enter the script from example above and save it, you will see this:

gen 1 > $
gen 2 > $
gen 3 > 3
gen 4 > $
gen 5 > $

If you delete any test, all dollar tests will be renumerated instantly and they will still be dollars instead of exact nunbers.

Also, did you now, that you can drag and drop tests to renumerate them? For example to move 40th test to the 7th position? This feature is very old, but it is rarelly noticed, so I decided to remind you about it. Dollar tests are also drugable.

But there is always a fly in the ointment. We decied not to support dollars for generators, which generate multiple tests. They have syntax like this

gen > {5-10,12,15}

So generator must produce 7 tests and put the to files 05, 06, ..., 10, 12, 15. So if we made them dollars and delete test number 1, we will get {4-9,11,14} instead of {5-10,12,15}.But the generator is not changed and still produce files 05, 06, etc. To avoid such problems, generators with file output does not support dollars.

Part two. Scripts for generating scripts

Now you can write script using Freemarker Template Engine, that will be executed inside the Polygon and the result will be used as test scritp. So for example instead of this

gen 10 1 1 > $
gen 10 1 2 > $
gen 10 1 3 > $
gen 100 4 1 > $
gen 100 4 2 > $
gen 100 4 3 > $
gen 1000 9 1 > $
gen 1000 9 2 > $
gen 1000 9 3 > $
gen 10000 16 1 > $
gen 10000 16 2 > $
gen 10000 16 3 > $

we can just write this

<#assign n = 1>
<#list 1..4 as pow>
    <#assign n = n * 10/>
    <#list 1..3 as i>
        gen ${n} ${pow * pow} ${i} > $
    </#list>
</#list>

You can find a brief tutorial about Freemarker at https://polygon.codeforces.com/docs/freemarker-manual. To find more details about the language you can read the official documentation.

But, script must be always consistent with the test table. It adds some limitation to the use of Freemarker.

  • It is impossible to delete, edit or move script test using web-interface. To do it, you must edit the script directly.

  • It is necessary to use dollars instead of indices. This limitation allow us to move manual test to any possition without changing the script.

  • Dollars are not supported by multiple test generators, so it is impossible to use them inside Freemarker script. But, in my opinion, if you already wrote program, that generates all tests, why would you need Freemarker : )

As you will see, there are two new buttons near Save Script: Preview Script and Run Script.

Preview Script shows you the final result — which test will get which generator line.
Run Script replaces your Freemarker script with old-style script, in other words, with the sequence of generator lines. You can use this button, if you do not need Freemarker any more? but could use some of the locked features. Please note, that this button only replaces the script in the text field. You need to save it by pressing Save Script button.

That is all for now. I hope new features will make it easier for you to prepare problems for Codeforces Rounds and other contests.

With best regards, Ivan.

Full text and comments »

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

By caustique, 11 years ago, translation, In English

Hello, Codeforces!

Codeforces Round #202 will take place today, September 27 at 19:30 MSK.

The idea behind the round was born when my friends and I were interning at Facebook this summer. This round probably has the highest number of authors for a Codeforces round to date. The authors of the problems are Azizkhan Almakhan azizkhan, Michael Kolupaev al13n, Filip Hlasek fhlasek, Ivan Mandura budabudimir and myself, Igor Demidov caustique.

Maxim Korystov dark_ai, Alexander Fedulin Jughead and Ibragim Ismailov ibra, Vladimir Chalyshev cmd and Sergey Sklyanichenko Sklyack helped us with preparation of the round.

The ideas behind the 2 problems were inspired by Anton Ermilov ant.ermilov and Dmitry Krasnov navi-spb.

Testers of the round are Alexey Safronov yarrr and Alexey Shmelev ashmelev.

I would also like to thank Gerald Agapov Gerald for his help in preparing the contest.

I hope you find problems interesting and diverse. I'm sure that everyone will find the problem to their liking.

Scores are as usual 500-1000-1500-2000-2500.

Good luck and have fun!

Congratulations to the winners!

Div. 1

  1. ilyakor
  2. rng_58
  3. EnumerativeCombinatorics
  4. ftiasch
  5. phtniit
  6. SillyHook06
  7. niyaznigmatul

Div. 2

  1. zhk
  2. love_kd
  3. alex_k
  4. arpit11293

Attention! Editorial for all problems is available!

Full text and comments »

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

By MikeMirzayanov, 11 years ago, translation, In English

Recently we’ve changed the contribution formula. Now it reflects the current social activity, that’s why all votes for posts and comments are divided by two every 180 days. On the one hand it helps to distinguish the currently active Codeforces members, on the other hand it makes the contribution top more dynamic and opened for the newcomers.

For example, now Egor is the leader of the contribution top because of the (mostly) many interesting posts about ACM-ICPC World Finals. But it looks like 9 months after the World Finals, he can loose the first place.

Also I’ve made some changes with the votes:

  1. Now the negative score is not shown (just 0) if it is in range [-5,-1]. I did it because many of you downvote just because you see the negative score.
  2. Visualization of vote in comments.
  3. Changed some rules to transform votes to contribution, but it is a monotonic function anyway.
  4. A comment becomes partially transparent if it has -10 or less (it was -5).
  5. A comment becomes hidden with the message about too negative feedback if it has -25 or less (it was -10).

I hope you we will do same changes as in items 1-2 for posts.

Full text and comments »

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

By MikeMirzayanov, 11 years ago, translation, In English

Welcome to 2013-2014 CT S01E03: selected problems from 2002 Central European (CEPC 2002) + 2010 Southeast USA Region. The training duration is 5 hours. It is opened for teams as well as for individual participants. After the end you may use the practice mode to complete problem solving. Also it will be availible as a virtual contest for whose of you who can't take part today. Please, do not cheat. Only fair play!

It is possible that the problems will be too easy for some participants, it is possible that we will add some problems.

The registration will be available on the Gym page and will be opened until the end of the training. Be careful registering team: please, choose only whose members who will take part in the contest.

Good luck!

Full text and comments »

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

By UESTC_Nocturne, 11 years ago, In English

Hello everyone!

Codeforces Round #201 is scheduled to take place at Friday, Sep. 20th at 19:30 MSK(23:30 CST)

Setters are: CMHJT and me.

Testers are: error202, havaliza and tourist.

Thanks to MinakoKojima for her help in rewrite the statements into codeforces style, Delinur for her help in translating the problems to Russian, and MikeMirzayanov, who has designed such a powerful platform.

Special thanks to tourist and Gerald in giving advise about the problems so we could put them in a more proper order.


500 — 1000 — 1500 — 2000 — 2500.

We are going to use standard score distribution in both divisions. The problems are not so hard, but you need more thinking rather than coding.

Good luck!

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

DivI

1.cgy4ever

2.rng_58

3.PavelKunyavskiy

4.Egor

5.liympanda

DivII

1.Thrax

2.renannewbie

3.socksister01

4.SJTU_WengJian

5.cat_leopard

UPD2: the editorial is published here

Full text and comments »

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

By MikeMirzayanov, 11 years ago, translation, In English

Welcome to 2013-2014 CT S01E02: Extended 2003 ACM-ICPC East Central North America Regional Contest (ECNA 2003). The training duration is 5 hours. It is opened for teams as well as for individual participants. After the end you may use the practice mode to complete problem solving. Also it will be availible as a virtual contest for whose of you who can't take part today. Please, do not cheat. Only fair play!

It is possible that the problems will be too easy for some participants, it is possible that we will add some problems.

The registration is available on the Gym page and will be opened until the end of the training. Be careful registering team: please, choose only whose members who will take part in the contest.

Good luck!

Full text and comments »

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

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