Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

MikeMirzayanov's blog

By MikeMirzayanov, 15 years ago, translation, In English

This post is no longer relevant; it has become significantly outdated. You should read the post at https://mirror.codeforces.com/blog/entry/121114.

Later you'll be introduced to the rules of the Codeforces contests, which differ from those of ACM-ICPC, TopCoder, GCJ, and I hope they'll bring some difference to the world of programming competitions. Most of the official competitions will be carried out according to these rules, though there will be more traditional contests. For example, Codeforces Beta Round #1 will be carried out according to the familiar ACM-ICPC rules. For some time testing will be based on Windows, but things might change in future, fortunately, the system supports testing on different platforms, even within one contest.

At the present time the system is configured to support the following programming languages (the compilation and/or the launching line is shown for each language):

  1. GNU C++ 4
    g++.exe -static -DONLINE_JUDGE -lm -s -x c++ -Wl,--stack=268435456 -O2 -o {filename}.exe {file}

  2. GNU C++11 4
    g++.exe -static -DONLINE_JUDGE -lm -s -x c++ -Wl,--stack=268435456 -O2 -std=c++11 -D__USE_MINGW_ANSI_STDIO=0 -o {filename}.exe {file}

  3. GNU C 4
    gcc.exe -static -fno-optimize-sibling-calls -fno-strict-aliasing -DONLINE_JUDGE -fno-asm -lm -s -Wl,--stack=268435456 -O2 -o {filename}.exe {file}

  4. MS VS C++
    cl /W4 /F268435456 /EHsc /O2 /DONLINE_JUDGE {file}

  5. Free Pascal 2
    -n -O2 -Xs -Sgic -viwn -dONLINE_JUDGE -Cs67107839 -Mdelphi -XS {file} -o{filename}.exe

  6. Delphi 7
    dcc32 -Q -$M1048576,67107839 -DONLINE_JUDGE -cc {file}

  7. C# Mono 2
    dmcs -define:ONLINE_JUDGE -o+ -out:{filename}.exe {file}

  8. C# .NET
    csc.exe /o+ /d:ONLINE_JUDGE /r:System.Numerics.dll /out:{filename}.exe {file}

  9. Java 6, 7
    javac -cp ".;*" {file}
    и
    java.exe -Xmx512M -Xss64M -DONLINE_JUDGE=true -Duser.language=en -Duser.region=US -Duser.variant=US -jar %s

  10. Ruby
    ruby.exe %s

  11. Python 2, Python 3
    python.exe %s

  12. PHP 5
    php.exe -n -d ONLINE_JUDGE=true -d display_errors=Off -d error_reporting=0 %s

  13. Haskell GHC 7
    ghc --make -O %s

  14. D
    dmd -L/STACK:268435456 -version=ONLINE_JUDGE -O -release -inline -noboundscheck {file}

  15. OCaml
    ocamlopt nums.cmxa str.cmxa -pp camlp4o -unsafe -o {filename}.exe-ocaml {file}

  16. Scala
    As Java

  17. JavaScript V8
    d8 {file}

It is not guaranteed that all the problems will have solutions in all the given languages (it's especially about the scripting ones). Probably, I'll later introduce equalizing coefficients for the working time for some languages. A "plus" next to the version name means that the testing system can use older versions. If you have suggestions about the possible ways to change the compilation or the launching line, write about them in your commentaries.

It should be mentioned that apart from standard verdicts, you can get "Denial of judgement", which usually means that your solution can't be launched, or it has unexpectedly failed. For example, is the Delphi array is too big, the compiler compiles the code, but the result will be the incorrect win32 exe-file. Solutions with the verdicts like "Compilation failed", "Denial of judgement", "Judgement failed" will be ignored while summing the results.

Moreover, pay attention, please, that the problems will be given in English as well as in Russian.

That's it, see you at Codeforces Beta Round#1.

UPD: GCC compiler has been added.

UPD 2: Added Haskell and F#.

UPD 3.2: Actual compiler versions are

  • Mono C# compiler version 3.2.3
  • DMD32 D Compiler v2.064.2
  • Delphi 7 [Borland Delphi Version 15.0]
  • Free Pascal Compiler version 2.6.2
  • MinGW g++.exe (GCC) 4.9.2
  • Haskell Glorious Glasgow, version 7.6.1
  • Java 6 javac 1.6.0_45
  • Java 7 javac 1.7.0_72
  • Java 8 javac 1.8.0_25
  • Ocaml ocamlopt 4.00.1
  • Perl v5.12.2
  • PHP 5.3.8
  • Python 2.7.8
  • Python 3.4.1
  • Ruby 2.0.0p353
  • Scala compiler version 2.11.1
  • MS VS C++ 2010
  • JavaScript V8 3.23.0

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English

I will briefly enumerate the changes at Codeforces:

  • Codeforces beta Round #1 is announced. It will go according to the ACM-ICPC rules, but will last for 2 hours. You shouldn't expect much from the problems - in the first place it is organized to check the system function and your feedback. The problems will be in two language: Russian and English. If I finish all the preparatory work earlier, I'll bring the Round some two days forward. It's planned to have the rating system at Codeforces similar to that at TopCoder. If the beta-competition goes without system failures, the participants will get ratings. To take part you are to register first.
  • The visual organization of “Recent actions” has been changed - "new comment" and "compose/edit text" can be seen in the sidebar. Blog entries are sorted by the date of events, it means the last 15 entries are displayed.
  • A new “Recent actions” detailed page, from which you can clearly see who has been doing what in recent time, is introduced.
  • The algorithm of your "contribution" evaluation has been changed. For more details see below. I think I might change something again later.
  • I've fixed some bugs.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English
After a two-day stop in Beijing we're leaving for Moscow. The flight is tomorrow, a bit earlier then 2 p.m. Maybe someone else is flying with us? We land at about 6 p.m., and then we'll have to go to the Paveletsky station, it would be great to catch train 17 that leaves at 19:56. Taking into consideration the number of suitcases we have, it seems that the bus/minibus+underground variant isn't for us. Taxi is the only suitable thing, by the way, does someone know how much it costs to take taxi from the Sheremetyevo 2 Airport to the Paveletsky station?

And if everything goes according to the plan, and we catch the train, we'll arrive at Saratov on February 10 at 12:04. As Antonina Gavrilovna says "tired, but hungry". Wait for us.

Full text and comments »

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

By MikeMirzayanov, 15 years ago, translation, In English

The results are announced - thanks to Ivan Romanov for being so quick. Thanks to everyone who supported us and followed the contest events. My apologies the system break-down, but if everything was stable in Codeforces, I wouldn't have called it beta. Unfortunately, I had no Internet during the day.


Congratulations to the medalists. The competition was tough.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English
I think I won't find any strength to describe the finishing day. I will only tell you that it was quite tiring - before the trial contest the guys had to wait for about an hour. Then there was a contest almost as long as the real one.

And now about the most important. The official site of the contest is http://icpc.baylor.edu/, and as for the traditional textual broadcast, you'll find it at Snarknews (In Russian)

You start rooting for us on February 5 at 5 o'clock (Moscow time)

Let's express our thoughts and emotions about the contest in the commentaries under this post. I'm not sure, if I'm going to have the Internet during the contest, but if I have such a chance, I'll write something.

UPD: I've nearly forgotten the most important. Today Bill Poucher announced sad news - the finals in Malaysia are postponed, and where they are next year is still kept secret. Rumors say in Cairo (Egypt).

UPD 2: At the informal tournament ICPC Challenge our team advanced to the finals and took the 4th prize. The Final competition is going to take place tomorrow at the closing ceremony.

UPD 3: I think you'll be able to see the results here. Thank you vici, plus for you!

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English
Line to open ceremony

The third day was marked by rises and falls of Harbin in our eyes. Everything started with the opening ceremony - it was badly organized, protracted and boring. Right before the opening ceremony the audience went to the assembly hall of the Harbin Engineering University, but the participants were less privileged and had to suffer. We were all gathered in a long basement room, we had to form a line according to predetermined numbers, and wait. As you know, 103 teams take part in the finals, so, about 450 people (coaches and volunteers included) packed into that basement. It was stuffy and crowded there. The Russian teams demonstrated their inherent quick-wittedness, they decided not to stand in the crowd, and moved closer to the entrance, it was cooler and there was more room there.

Finally, to solemn music (be careful, phonogram!) the teams one by one climbed the stage, took pictures and went down to join the audience. As after that according to the program some outdoor activities were planned, many participants had prepared sensibly beforehand, they had put on the presented warm trousers, sweaters, etc. With such a "formal" look they got to the opening ceremony and the shoot. My standing ovation.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English
Перед рейсом

The second day we spent sightseeing - we went to the excursions organized by the host country, some places we visited on our own.

In the morning we had some free time, and we went to the local Arbat (or Kirov Avenue, as you wish). Actually, when we walked not far away from the hotel, we found out that we vaguely knew how to get back. But still we didn't want to go back, that's why we went on moving away, guided by little information we had. It was really cold - but we were well-prepared. I put on a down-filled coat, that we'd got on the first day, over my proper one, foe example. Vova put on the presented trousers over his own jeans, and seemed happy. The parts that got cold were our faces.

On our way to that avenue we asked for the directions many times. The problem was that we didn't remember its name. 80% of passers-by said they didn't speak English, 20% said they did, but it was the only thing they could say in English. Finally, using the international language of gestures, we got the direction and found the avenue. Personally I was disappointed, there was nothing to look at there. Of course, it was interesting to walk past old buildings, but we had no desire to "Russian goods" shops. They sold home-made vodka, chocolate called "Russian fir (pets)" (they meant "pelts"), and other goods of doubtful quality.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English
Set of warm clothes
Everyone got a set of warm clothes. The hats in the photo looked more like scarves at closer inspection. Moreover, we got a set of mustard plasters, which are recommended to be worn under your clothes to keep the body warm.

Three Koothrappali
The Indian team got very excited, when I asked them how popular the TV series The Big Bang Theory is in India.

Full text and comments »

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

By MikeMirzayanov, 15 years ago, translation, In English
Перед рейсом
The flight went well, without any problems. I always regret that I can't sleep on the plane, and I envy my fellow passengers the ability to sleep their fill during the flight. I managed to fall asleep at the beginning of the first flight only, don't remember how we took off, but didn't miss the meal. After that I didn't sleep at all. The guys seemed to have rested a bit, though, of course, the rest was far from normal. I tried to derive the meaning of some hieroglyphs by comparing the city names in English and in Chinese, but even this didn't help me fall asleep.

We flew 7 hours to Beijing, and 2 more hours from Beijing to Harbin. At Sheremetyevo Airport we met several other Russian teams. The teams from Samara, Izhevsk, and, it seems, Ural were on the same plane. And some other teams. Moreover, we flew with Andrey Styskin, who works for Yandex, and will take part in the conference in the context of the contest. Separate teams could be clearly distinguished on the plane: 3 young people, each with a laptop, or a netbook. However there were exceptions.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English

The team captain Natalia Bondarenko
The team captain Natalia Bondarenko
January 30, 2010 the delegation of the Saratov State University is leaving for the World Finals of the International Collegiate Programming Contest. This year it's held in Harbin (hi, China), and that means that apart from an interesting contest, we have cold weather, ice statues, fried rice with prawns, and as I hope, Beijing Duck.

Our University will take part in the Contest for the 7th time, and for the team Saratov SU#1 this will be the 2nd Finals. It seems to be high time to introduce myself. I'm Mike Mirzayanov, and I'm this team's coach (and also all other teams from my university). In reality I'm the director of Programming Competitions Training Center, but in this case it doesn't matter. I became a part of this so-called olympic movement quite long ago, but since that time I've managed to take part in the finals of the ICPC, and in the finals of Google Code Jam, and onsite competitions by TopCoder (TCO and TCCC both). In brief, I do know what computer programming competitions are, but we won't speak about me.

We will speak about our team Saratov SU#1 and their participation in the coming World Finals. I plan to write a series of articles about our trip to China. No one knows, on whom Lady Luck will smile, and whether we'll return triumphant or defeated, but I hope my account will seem interesting to someone. Any questions? Ask them in your commentaries, and I'll answer them with pleasure.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English
Paveletsky station met us as usual. Taxi, taxi, where are going young man? In the subway suspicious persons sell cellphones near the proclamation: "unauthorized trade is prohibited, fine of 10000 rubles". Fortunately the queue for tickets in the subway has flown by quickly - well, that we got up at first in two, as one moving twice as fast. 

Dima Matov quickly noticed that in Moscow we have arrived too early - beginning tomorrow at Mu-Mu cafes begin discounts of 50%. And when you try to change rubles into something more international we noticed that today is Sunday and banks do not work. Yes, we have arrived in Moscow too early :).

I went to Starbucks and sold Internet for 100 rubles. It was constantly falling off - so I hasten to write these lines before it disconnects again.

In the evening we will sit in the airplane, fly through Beijing, there will be 2.5 hours connection and "Hello, Harbin".

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English
If you write solutions on C++ it regularly happens than input reading through std::cin appears to be slow because of the large input size. Certainly is more correct in such cases to write data reading more effectively - at least using scanf. But if the testing system uses GNU C++ (checked on MinGW 4.4.1, but I think it works on other versions too), and you don't want to rewrite input reading, it is possible to improve performance by only one line placed in the beginning of the program: ios_base::sync_with_stdio(0).

On my example where it was required to find the sum of one million integers, it has accelerated the program in 4.5 times. Tried to do the same test on MS Visual C ++ 9.0 - but it hasn't accelerated the reading.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English

The World Finals of the 33rd International Collegiate Programming Contest for was held in the capital of Sweden, Stockholm. The contest was held in Europe for the third time: in 1999 it was held in Eindhoven (the Netherlands), in 2004 - in Prague (the Czech Republic). It was the first time the key role in the competition had been played by the University: it was held in the library of the Royal Technological University. One hundred best teams of the world took part in the final, while the preliminary rounds saw 7109 teams from 1838 Universities and 88 countries competing. It was the sixth time the Saratov State University had took part in ACM-ICPC World Finals.

The participants were placed in two hotels in the historic centre of Stockholm, Gamla Stan district. Our team was placed in the Grand Hotel Stockholm, the city's oldest hotel, built in 1874. The breathtaking view on the Old City and the Royal Palace made this hotel the favourite place for many film stars, politicians and other celebrities. The Grand Hotel is the only hotel in Sweden with the prestigious status The Leading Hotels of the World.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By MikeMirzayanov, 15 years ago, translation, In English
I noticed long ago, that all the websites about computer programming contests work on Web 1.0 principles. But the 21st century has come, the 30th International Programming Contest took place, and Google celebrated its 10th anniversary. Something has to be done! As Software-as-a-Service is conquering the world, contests administrators are still copying tests into judge systems. Something has to be done!

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it