MikeMirzayanov's blog

By MikeMirzayanov, history, 4 days ago, In English,

Hi! Yes, I see that the top-rated block and some other features not working, but I don't have the strength to deal with it right now. Also, I didn't fix the ratings because of wrong division cases issues. Since yesterday, I was working on an unexpected behavior of the system on the increased load. A lot has been done. But three hours of sleep in the last two days is too little for me and I need some rest. Tomorrow I'll return to fix the issues and hope to deal with them. What about your quarantine?

Read more »

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

By MikeMirzayanov, 12 days ago, In English,

Hello, Codeforces.

I hope you wash your hands and feel great.

I added the support of 64-bit g++. If you are using Windows, you can easily install it via our minimalistic package manager PBOX running the command line pbox install msys2-mingw64-9.

Your solutions are compiled with the command line g++ -static -DONLINE_JUDGE -Wl,--stack=268435456 -O2 -std=c++17 program.cpp.

Now you can try to use int128 and other 64-bit specific features! In fact, I am slightly worried that the presence of such features may widen the gap between C ++ and other languages. Wait and see.

Currently, support for 64-bit C++ is experimental. For example, I would not be surprised if IO on it works slower in some cases (it is necessary to test!). I invite you to join the testing and experimentations. Share your impressions in the comments!

Read more »

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

By MikeMirzayanov, 4 weeks ago, In English,

Hello Codeforces!

You may know that the crowdfunding campaign on the occasion of the 10th anniversary of Codeforces is in full swing! I am pleased to inform you that the Reply Code Challenge not only prepare a great competition but also supported Codeforces, which means all of us! Thanks!

Please pay attention to the information below. I am sure that this is a great chance to compete.

And here is the message from the Reply Code Challenge:

Hello Codeforces!

We're glad to invite you to the upcoming Reply Code Challenge, on 12 March. It's a free online team-based challenge and you can choose between:

  • Standard Edition: designed for university students and professionals.
  • Teen Edition: designed for students aged 14 to 19.

Great prizes are waiting for the winning teams:

  • Standard Edition: each member of the winning team will win a Mac Book Pro™ 16’’. Each member of the second and third place team will receive Apple Watch Series 5™ and Apple Air-pods Pro™
  • Teen Edition: 5.000€ for the first team in the leader board, 2.000€ for the second and 1.000€ for the third place team.


Online at challenges.reply.com on March 12th from 4.30pm to 8.30pm CET. To play you must form a team by March 11th.

Follow us on our Telegram Channel, WIP but ready soon for the Challenge: https://t.me/replychallenges

Read more »

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

By MikeMirzayanov, 2 months ago, translation, In English,

Hi Codeforces!

The platform recently turned 10 years old. We accept your congratulations at https://codeforces.com/10years. Please review the progress in 2019 and support the anniversary crowdfunding campaign. Your donation will be a contribution to the future of Codeforces, will help its development and work. We need resources to continue to host rounds, not to stop developing, to innovate and to maintain the existing infrastructure.

In 2019, together with numerous writers the coordinators worked on problems: KAN, 300iq, cdkrot, arsijo and recently joined isaf27. And this year, rounds coordinated by other experienced members of our community can be expected. Intrigued?

The main innovations in the platform are implemented by me and the developers: kuviman, cannor147 and geranazavr555. Una_Shem provided great organizational assistance. Thanks!

I send special rays of gratitude to problem writers and testers! This year we have had more rounds than ever before!

Time to take stock of 2019.

Partner Events

We are pleased to hold programming competitions with companies or for companies. I'm sure this is a great way to support the community of young programmers and hire talented candidates. Here is a list of our main partners this year:

  • Telegram and personally Pavel Durov is supporting Codeforces activities for many years, every regular round is held with their help, thank you!
  • Mail.Ru — Technocup and Russian AI Cup
  • VK, VK Cup — now a personal multi-track competition for Russian-speaking programmers
  • XTX Markets, Codeforces Global Rounds — a series of 6 rounds with a separate scoring and souvenirs for the best participants
  • Harbour.Space University — a series of educational rounds, the selection of summer school Tech Scouts
  • JetBrains, Kotlin Heroes Rounds — Kotlin programming language contests
  • Huawei — research competition (marathon) with elements of machine learning
  • Forethought, Forethought Future Cup — a two-level competition with the Final at Forethought headquarters (San Francisco) and the mirror contest for worldwide participants
  • Dasha.AI, Dasha Code Championship — a two-level competition with the Final at St. Peterburg and Novosibirsk (and the mirror contest for worldwide participants)
  • VeeRoute — research competition (marathon)
  • Microsoft, Microsoft Q # Coding Contest — unusual quantum computing competition

Read more »

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

By MikeMirzayanov, 3 months ago, In English,

Hello, Codeforces.

Sorry, but for a reason independent of Codeforces, we are forced to cancel the round. It was planned as a mirror of an onsite-olympiad, but suddenly it turned out that this would not work.

We will try our best to please you with other rounds. Stay tuned!

The round Educational Codeforces Round 80 (Rated for Div. 2) will start on Jan/14/2020 17:35 (Moscow time). Hope to see you as a participant!


Read more »

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

By MikeMirzayanov, 3 months ago, In English,

I am happy to wish you a Happy New Year! I wish you a great, bright, interesting New Year! Just believe that it can become so: difficulties will be left behind, and ahead of you will be a joy of victories and discoveries.

I wish all of us new interesting problems, records and achievements! Set new goals and be sure to try to achieve them! And do not go far, we will try to make your 2020 year more fun!

I thank with all my heart for the contribution to the community of coordinators, problem writers, testers, and those who wrote interesting posts and comments. Many thanks to the sponsors, partners and customers: you help the community not to stand still, give the opportunity to hold interesting events. Thanks to all visitors to the website and just not indifferent.

See you in the new year!


Read more »

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

By MikeMirzayanov, 3 months ago, translation, In English,


It seems to me that over the past few years I have been writing something right while all normal people are celebrating the New Year. It's my tradition now! Actually, most of the core functionality of Codeforces was written on the New Year holidays of 2010: authorization, blogs, basic support for competitions.

Perhaps I want to spend the next year with interest improving something in the Codeforces infrastructure (yep, how you celebrate the New Year — so you will spend it). Or maybe it's just that it's not necessary to work on New Year's and I'm doing not what you need right now, but what would be nice to do someday.

This time I took a little time to add support for parsing command line parameters in testlib. I really don't like to write such lines of code int n = atoi(argv[3]); in generators. Actually for several reasons:

  • it is unsafe that the 3rd command line parameter may be absent;
  • It is unsafe that the 3rd command line parameter may not be a valid 32-bit integer.

Now, instead, you should write this: int n = opt<int>(3);. In addition, you can write like this int64_t m = opt<int64_t>(1); or bool t = opt<bool>(2); or even string s = opt(4);.

In addition, I supported named parameters. If there are too many parameters, then the entry g 10 20000 a true is less readable than g -n10 -m200000 -t=a -increment.

In this case, now you can use the following code snippets in your generator:

int n = opt<int>("n");
long long n = opt<long long>("m");
string t = opt("t");
bool increment = opt<bool>("increment");

You can freely mix parameter reading by index and by name.

The following options for writing named parameters are supported:

  • --key = value or-key = value;
  • --key value or-key value — if value is not a start of a new parameter (does not start with a hyphen or does not follow the letter after one/two hyphens);
  • --k12345 or-k12345 — if the key k is one letter and then a digit comes;
  • -prop or--prop — to enable boolean properties.

Below are examples of how to run several fictional generators:

g1 -n1
g2 --len=4 --s=oops
g3 -inc -shuffle -n=5
g4 --length 5 --total 21 -ord

Perhaps in a hurry, I can write something not in the best way, or even with bugs. I suggest you look at my last commits. I will be glad to suggestions or fixes.

Thanks for attention.

What traditions do you have for the New Year?

Read more »

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

By MikeMirzayanov, 3 months ago, In English,

Do you already have a New Year's mood?

And we have traditional gifts!

Change Handle Feature

Hurry! Only until the 10th of January, you can change your handle (but only once)! Note that it will be possible to roll back the changes or change the handle again only after a year. Be careful what you wish for.

You can change your handle to the new one which wasn't used before by anybody or which was used by you before. The links to a profile page with an old handle would automatically redirect to the actual profile.

Again, this year if you took part in at least 10 rounds you can request a handle of an inactive participant. It means that the participant should have a period of activity on Codeforces of at most 180 days, this period should be in 2016 or earlier. The inactive participant can't have posted comments, messages and so on. It can't take part in more than 2 contests. It will be automatically renamed and informed by email. A user has the opportunity to request back his/her handle: in this case, we will roll back the change and return your previous handle to you. If you can't change your handle to another, it means that some requirement doesn't meet. Please do not ask me to do something with it. I'm not Santa Claus.

Talking about handles I always
reminisce the following story. Once a user wrote me the message: "Please change my handle from I_love_Valya to I_love_Sveta, as I no longer love Valya ..."

New Year's Masquerade of Colors and Ranks

The traditional magical tab has appeared in the profile setting. Happy New Year!

Read more »

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

By MikeMirzayanov, 3 months ago, translation, In English,

Many thanks to cannor147 and geranazavr555 for the help with the translation into English.

1259A - Happy Birthday, Polycarp!

Problem Writer: MikeMirzayanov

1259B - Make Them Odd

Problem Writer: MikeMirzayanov

1259C - As Simple as One and Two

Problem Writer: MikeMirzayanov

1259D - Let's Play the Words?

Problem Writer: MikeMirzayanov

1259E - Two Fairs

Problem Writer: MikeMirzayanov

1259F - Beautiful Rectangle

Problem Writer: MikeMirzayanov

1259G - Tree Elimination

Problem Writers: Endagorion

1276E - Four Stones

Problem Writers: Endagorion

1276F - Asterisk Substrings

Problem Writers: voidmax


Read more »

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

By MikeMirzayanov, 4 months ago, translation, In English,

This weekend, on Dec/14/2019 14:05 (Moscow time) we will hold Codeforces Round 606. It is based on problems of Technocup 2020 Elimination Round 4 that will be held at the same time.

Technocup is a major olympiad for Russian-speaking high-school students, so if you fit into this category, please register at Technocup 2020 website and take part in Technocup 2020 - Elimination Round 4.

Problem authors are me, Endagorion and voidmax. Many thanks to the testers: Kostroma, grumpy_gordon, Supermagzzz, AdvancerMan, Stepavly, unreal.eugene, cannor147 and geranazavr555!

Div. 1 and Div.2 editions are open and rated for everyone. As usual, the statements will be provided in English and in Russian. Register and enjoy the contests!

Good luck on the round

UPD 1: The scoring:

  • D1: 500-1000-1250-2000-2250-3000
  • D2: 500-1000-1500-1500-2000-2500

Read more »

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

By MikeMirzayanov, 4 months ago, In English,


Initially, the problem 1255B - Fridge Lockers was with no constraint $$$m \le n$$$ (just $$$m \le 2000$$$). Almost all participants (and me) invented wrong solution like: "make a cycle plus take the cheapest edge $$$m-n$$$ times". The counter-example is $$$n=5$$$, $$$m=6$$$ and prices are $$$3, 4, 1, 4, 5$$$. Look into the picture:

It was really unexpected for my intuition (and, of course, failed a proof).

Do you know the solution for this case?

Read more »

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

By MikeMirzayanov, 5 months ago, translation, In English,


ICPC Southern and Volga Russian Regional Contest (Northern Eurasia) 2019 has ended on October 15. There were 76 teams onsite in Saratov, most of them were invited because of their result on the qualification stage.

On Oct/27/2019 12:35 (Moscow time) will start online-mirror 2019-2020 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules, Teams Preferred).

In this contest I play a role of Cheif Judge and the jury teams consists of ex-participants of ICPC from Saratov and jury members from other cities. Many thanks to all of them! I hope you will like the problems!

I invite ICPC teams and individual participants of Codeforces competitions to take part! Sure, the contest will be unrated.


Read more »

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

By MikeMirzayanov, 5 months ago, In English,


Codeforces supports a wide range of languages. Just yesterday I supported Java 11.

On the other hand, my website is not only just open public rounds and trainings, but also an advanced system of groups, custom domains and mashups. This ecosystem makes it possible to conduct private trainings, local contests/olympiads, provides the work of computer science clubs, and so on.

Sometimes you ask me to somehow limit the languages that can be used in a particular contest. For example, an official competition is held that does not support Rust. Or this contest is a practical session specifically for classes in Python.

Now you can configure allowed programming languages (more precisely, their groups) for your mashups and private trainings. Thanks for the help to geranazavr555 who helped to realize this opportunity!

Here are some screenshots of how it looks in action.

Edit a contest settings to specify the list of allowed languages.

You can choose program languages groups your contest supports.

Hope you enjoy the feature,

Read more »

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

By MikeMirzayanov, 6 months ago, translation, In English,

Hi Codeforces!

Unfortunately, ill-wishers thwarted the round by making DDOS on our infrastructure. Neither the coordinator nor the writers of the round are subjects to blame for the failure. Please do not downvote the announcement of the round. I think that this situation is an additional reason to support the writers. They worked hard and prepared good problems!

Apparently, such an attack should be regarded as a symptom of the fact that Codeforces outgrew the youth phase and entered serious adult life. Of course, we will respond with adequate measures to protect ourselves from such incidents. Fortunately, for almost 10 years of work, a large community has formed around those who care about Codeforces. We are not worried about possible additional expenses or efforts. We can do this. The rounds must go on.


UPD 1: All three of today's rounds will be unrated.

UPD 2: Hooray! Today we've survived another DDOS attack. The round was not perfect, but it was not ruined!

Read more »

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

By MikeMirzayanov, 6 months ago, In English,


It is not an official announcement of the events. Just information: The contest on Sep/22/2019 12:05 (Moscow time) will be only for onsite finalists. The mirror round will be the next day on Sep/23/2019 17:05 (Moscow time).

Hope to see many participants. Guess, who are the main writers of the Final?

Read more »

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

By MikeMirzayanov, 7 months ago, In English,

Hello Codeforces!

I hope you enjoyed the problems. I forgot to mention the contribution of testers to the preparation of problems in the round announcement. I apologize and correct myself. Many thanks to the testers: elizarov, ashmelev, KAN, arsijo, adedalic and Roms. Also many thanks to my co-authors: 300iq and geranazavr555. Special thanks to cannor147 who helped with translations.

1211A - Three Problems

Problem writer: MikeMirzayanov


1211B - Traveling Around the Golden Ring of Berland

Problem writer: MikeMirzayanov


1211C - Ice Cream

Problem writers: MikeMirzayanov, geranazavr555


1211D - Teams

Problem writer: MikeMirzayanov


1211E - Double Permutation Inc.

Problem writers: MikeMirzayanov, geranazavr555


1211F - kotlinkotlinkotlinkotlin...

Problem writer: MikeMirzayanov


1211G - King's Path

Problem writer: MikeMirzayanov


1211H - Road Repair in Treeland

Problem writer: MikeMirzayanov


1211I - Unusual Graph

Problem writer: 300iq


Read more »

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

By MikeMirzayanov, 8 months ago, In English,


We are very pleased to cooperate with XTX Markets, thanks to whom we are able to hold the Global rounds. Four of the six of them are already passed and here are the current results.

In short, XTX Markets is a leading quantitative-driven electronic market maker Launched in 2015, XTX Markets has rapidly become the number 1 FX spot liquidity provider by volumes globally, surging ahead of global banks.

Thanks for supporting our community!

We are happy to announce that XTX recently launched the XTX Markets Global Forecasting Challenge, powered by Correlation One.

The XTX Markets Global Forecasting Challenge is an online competition for aspiring quantitative professionals, where contestants are tasked to develop a predictive model based on training data provided by XTX.

Competition highlights include:

  • Over $100,000 in total cash prizes.
  • $7,500 for the best submission from a participant aged under-25 (as of 1st July 2019).
  • Exciting job opportunities in London.
  • Opportunity to compete against the best quantitative minds from around the world.

The competition is open to all data-minded contestants from 1st of July to 30th of September, 2019.

To get started, please sign up below.


We hope you'd be interested!

Read more »

Tags xtx
  • Vote: I like it
  • +134
  • Vote: I do not like it

By MikeMirzayanov, 9 months ago, translation, In English,

Hi Codeforces.

Recently there have been several improvements on the website. A little later, I will write a short note about them. Here I want to tell about a noticeable new functionality that has recently been implemented by kuviman.

Sometimes after the end of a round there are requests in comments to add a particular test. And problem writers or coordinators add it manually. Now this process is automated.

Meet the uphacking phase!

Now, after the end of almost any contest, participants from Div.1 have the opportunity to hack any solution in this contest during the week. Yes, including official solutions from rounds. In case of successful hacking:

  • Your test will be automatically added to the problem and will be used in the future when testing new solutions for this problem;
  • If a hacked solution is a practice (i.e. upsolving), then its verdict will change to “hacked” otherwise its verdict will remain unchanged;
  • The participant whose solution has been hacked will be notified via system private message;
  • Each solution can be successfully hacked only once.

In order to add only adequate and reasonable tests, it is forbidden to hack solutions that intentionally contain a mistake. Please strictly follow this rule. It is because of the possibility of inadequate behavior that we cannot open uphacking for everyone.

I hope that this innovation will be useful and tests for problems will become even better!

  • MikeMirzayanov

UPD: Probably, later we will extend uphacking phase and reduce the rating bound.

Read more »

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

By MikeMirzayanov, history, 9 months ago, In English,


Do you remember my post New: Diagnostics of Solutions in C++? If not, please read it.

Recently, I've implemented better UI to show you diagnostics. Now in on the status pages sometimes you can notice something like this:

Click to the  and you'll see the code with the highlighted problematic line and description with the possible reason of the mistake.

Do you like it?

Read more »

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

By MikeMirzayanov, 10 months ago, In English,

In 2019, with the support of XTX Markets, 6 rounds of the new Codeforces Global Rounds will be held. These will be common rounds for both divisions of 7–9 problems each. The duration of the rounds will be 2-3 hours, depending on the number and complexity of the problems. All such rounds will be rated for all participants. At each such round, 50 brand T-shirts will be handed out, and we will be happy to give T-shirts to all authors and problem testers.

The prizes for the 6-round series in 2019:

  • In each round top-100 participants get points according to the table.
  • The final result for each participant is equal to the sum of points he gets in the four rounds he placed the highest.
  • The best 20 participants over all series get sweatshirts and place certificates.

Current standings after two rounds:

Place Contestant = Round 1 Round 2
1 tourist 1706 1000 706
2 Um_nik 1281 706 575
3 ecnerwala 1000 1000
4 mnbvmar 900 497 403
5 sunset 814 443 371
6 TLE 599 575 24
7 ksun48 569 371 198
8 fateice 518 307 211
9 Endagorion 510 13 497
10 Petr 443 443
11 lych_cys 436 218 218
12 wxhtxdy 403 403
13 yokozuna57 399 74 325
14 neal 382 211 171
15 cki86201 346 346
15 CauchySheep 346 346
17 snuke 325 325
18 jonathanirvings 323 97 226
19 realDonaldTrunp 307 307
20 V--o_o--V 291 291
20 krijgertje 291 291
22 LHiC 277 277
22 yhx-12243 277 277
24 kmjp 272 226 46
24 ania 272 198 74
26 lumibons 265 265
26 visitWorld 265 265
28 sigma425 254 254
28 leaf1415 254 254
30 stO 246 60 186
31 zemen 245 204 41
32 uwi 244 244
32 Arterm 244 244
34 whzzt 241 171 70
35 dotorya 235 235
35 Isaf27_loves_me 235 235
37 MofK 206 8 198
38 vammadur 204 204
39 mareksom 201 99 102
40 AFO_OFA 194 78 116
41 AlexDmitriev 192 192
42 yutaka1999 186 186
43 Kostroma 185 4 181
44 jiangshibiao_father 181 181
45 voover 176 176
45 hos.lyric 176 176
47 Alex_2oo8 166 166
47 yosupo 166 166
49 tlwpdus 161 161
49 supy 161 161
51 kdh_9949 157 157
51 I_love_Tanya_Romanova 157 157
53 SpyCheese 153 153
53 E869120 153 153
55 Subconscious 149 149
55 maroonrk 149 149
57 mmaxio 145 145
57 egor.lifar 145 145
59 AghaTizi 142 142
59 NeKrasnyj 142 142
61 abacabadabacaba 138 138
61 riantkb 138 138
63 VArtem 135 135
63 yuxiaogang 135 135
63 ainta 135 135
66 fyy2603 131 131
66 edisonhello 131 131
68 izban 128 128
69 voidmax 125 125
69 _rqy 125 125
69 KMAASZRAA 125 125
72 irkstepanov 122 122
73 Rzepa 119 119
73 jah_melon 119 119
75 aid 118 107 11
76 Egor 116 116
76 JOHNKRAM 116 116
78 G.Z.V.O.D.E.N 113 113
79 zhouzhidao 112 52 60
80 allllekssssa 110 110
80 kazuma 110 110
82 Maksim1744 107 107
83 Real_A_Madrid 105 105
83 UtahaSenpai 105 105
85 pobiren 102 102
86 Itst 99 99
87 TangentDay 97 97
87 chenjb 97 97
89 Merkurev 94 94
90 scanhex 92 92
90 sugim48 92 92
92 geniucos 90 90
92 dreamoon_love_AA 90 90
94 tfg 87 87
94 TimonKnigge 87 87
94 ToTLeS 87 87
97 Elegia.Inferno 85 85
98 kczno1 83 83
98 Heltion 83 83
100 _Happy_New_Year_ 80 80
100 131131yhx 80 80
102 Hazyknight 78 78
102 DEGwer 78 78
104 Roundgod 76 76
105 Radewoosh 74 74
106 Xellos 72 72
107 QAQAutoMaton 70 70
107 flying_fish 70 70
109 Vergara 68 68
109 Bugman 68 68
111 djq_fpc 66 66
112 hermano95 63 63
112 imp 63 63
114 laofudasuanbaofushehui 62 62
114 fuppy 62 62
116 ilyakor 60 60
116 Constantius 60 60
118 Farhod_Farmon 58 58
119 isaf27 56 56
120 senek_k 54 54
120 superguymj 54 54
122 zerokugi 52 52
122 cuizhuyefei 52 52
124 kf11 50 50
124 gs18115 50 50
126 imalyd 48 48
127 Reyna 46 5 41
127 Tommyr7 46 46
129 zeliboba 45 45
129 FlyToTheSky 45 45
129 kobae964 45 45
132 natsugiri 43 43
133 wzp666 41 41
133 Lily 41 41
135 camypaper 39 39
136 yfzcsc 37 37
137 orbitingflea 36 36
137 SidneyEarth 36 36
137 logicmachine 36 36
140 zhou888 34 34
141 fedoseev.timofey 32 32
141 hloya_ygrt 32 32
143 chemthan 31 31
143 Hezhu 31 31
145 satashun 29 29
145 tourist4.0 29 29
147 HanwhaEagles 27 27
147 zhangqingqi 27 27
147 PinkieRabbit 27 27
150 capra 26 26
151 LzyRapx 24 24
152 DAyamaCTF 22 22
152 athin 22 22
154 cerberus97 21 21
154 Sonechko 21 21
156 HuaJun 19 19
156 WA_TLE 19 19
158 GyojunYoun 17 17
158 he_____he 17 17
160 FizzyDavid 16 16
160 jijiang 16 16
162 cz_yixuanxu 14 14
162 gyz_gyz 14 14
162 majk 14 14
165 adadadd 11 11
165 PhoenixEclipse 11 11
167 nicklu0 10 10
168 rahulDugar 8 8
169 teapotd 7 7
169 BigBag 7 7
169 Golovanov399 7 7
172 zhouzhendongYa 4 4
173 ko_osaga 2 2
173 Sooke 2 2
175 gamegame 1 1
175 rais.fathin38 1 1

Read more »

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

By MikeMirzayanov, 10 months ago, In English,

During the past few days, we have done some internal optimizations (thanks, kuviman). Before the start of Codeforces Global Round 3, I want to be absolutely sure that everything works correctly. I ask you to help us to test the system. Please, take part in Testing Round #15 (Unrated). It is unrated, contains 1-2 easy well-known problems. The pretests will be extremely weak to increase the number of hacks. Thanks!

UPD: It seems everything works great. Thanks!

Read more »

Announcement of Testing Round #15 (Unrated)
  • Vote: I like it
  • +36
  • Vote: I do not like it

By MikeMirzayanov, 11 months ago, translation, In English,

Hello, Codeforces!

Today I’ve released an important update of the Polygon — partial support for advanced properties of resources. The main task that is being solved by this update is to support the development of problems with graders.

In most competitions, participants need to submit a complete solution code, including reading an input reading and an output writing. For example, in Codeforces rounds you solve such kind of problems. However, in some competitions another approach is using: a participant needs to implement the required function or interface.

For example, in a problem statement can be written that in a C ++ solution you need to implement a function that has prototype int sum (int a, int b) and submit the implementation. In this case, a participant has to submit a source code that contains the implementation of this function. Then, in the process of judging this solution for such a problem, an online judge should compile and link into a single executable file the file sent by the participant and a special jury-prepared file that contains the rest of the necessary code (in particular, there will be the function main).

In the case of problem ``A + B’’, such file, which is called a grader, might look like (grader.cpp):

#include <iostream>
int sum(int a, int b);
int main() {
	int a, b;
	std::cin >> a >> b;
	std::cout << sum(a, b) << std::endl;

A solution might look like:

int sum(int a, int b) {
    return a + b;

Therefore, a grader cannot be independently compiled into an executable file: it also needs a solution to the problem.

And now basic support for such problems in Polygon has been implemented (thanks to PavelKunyavskiy and cannor147 for the help!). I've started with C++ support only.

In order to add grader files, you must upload them as resources, specifying additional advanced properties: that resources are applicable to cpp.* language group, that they are compile-time resources and that solutions need to be compiled with them.

After adding such resources, while compiling solutions, they will be in the same folder with the solution, and those resources that are C++ files will be appended to the compiler command line.

Please note that all additional information for resources is available in the problem descriptor file problem.xml. Also, API is updated (see the documentation for the methods problem.files and problem.saveFile).

Later, the support of some other languages will be added. Also, I’ll add a feature to attach resources in a similar way not to solutions only, but also to validators/integrators/checkers. Of course, you can expect support for such kind of problems on Codeforces. I note that such problems can be used not only in olympiads/contests but also in the educational process. For example, I can easily imagine an exercise on Java, where you need to implement a given interface, and all other routines (unit tests and other things) are hidden in resources files.

P.S. The support of graders appeared for a special reason: today in Russia begins the IOI training camp. The best high school students will compete for the right to represent Russia on International Olympiad in Informatics. I hope, this feature will help the scientific committee to write new problems. And I wish participants every success and luck!

Read more »

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