Alex_KPR's blog

By Alex_KPR, history, 20 months ago, translation, In English

Hi there!

2006-2010, when I was training a lot and solving many problems, the algorithms and ideas transmitted in myths, as folklore. Russian e-maxx website was an awesome source of knowledge. Then Codeforces appeared, Petrozavodsk Training Camp became very reachable and the total amount of contests increased dramatically. But the main training cycle feels always the same: stumbling of a difficult problem -> learning how to solve it -> highlighting the fundamental ideas -> searching for other problems based on the same ideas.

I see the following values of e-maxx website (let's take as an example the article of Lyndon decomposition):

  1. Non-trivial, valuable topic. Not just straightforward dfs or prime numbers in $$$O(n^2)$$$.
  2. Common method which is useful in different problems. Not an editorial to a specific, limited task.
  3. Shortly and clearly. Not 100500 pages filled with proofs and deep maths.
  4. A text. Not audio/video, just a text where I can reach any point easily.
  5. A working code example. It proofs that the author implemented his words into reality.
  6. A link to the online judge problem where I can train to apply the idea of the topic.

I wonder about any changes to the late of 2019. What does actually work for you? Any other sources which are close to e-maxx by values? Any new kinds of training/learning which work better? (I've heard about courses at edx and coursera.) How the issue is solved by foreign colleagues?

I will be happy to read your answers in comments!

Read more »

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

By Alex_KPR, 6 years ago, translation, In English

Hi everybody!

The VK Cup is in full action down here!

Zlobober has already given a quick look at the main activity of the guys who got to warm summer St.Petersburg yesterday and checked in the luxurous Courtyard Marriott hotel. Yes, the program is eventful and madly entertaining: yesterday they walked on the rooftops in the heart of the cultural capital of Russia. Today they had lunch on a little ship during a tour along rivers and canals. Besides, the weather has been really good to us!

This time, all the serious events take place opposite the Kazan Cathedral in coworking with VK, in the freedom space. And the morning started with a crazy test round with two spectacular problems, where the first problem was a quiz problem with ten test questions. SobolevTeam achieved a landslide victory. They used a cool idea: according to the Codeforces contest rules, hacks show the contestant's response. The most important thing here is the expected valid result. That's why the team quickly sent and blocked their solution and in the end, didn't submit the problem :P. But their hacks helped them to quickly find the correct responses and then they hacked everybody whose response does not match the correct one. And what do we have in the end? 19 successful hacks!

During the tour the guys had fun reaching for metallic structures of bridges and feasted on tasty food. The most responsible ones studied the rules of the forthcoming CodeGame, thinking through non-trivial strategies. Oh yes, right now the CodeGame Coding phase is in progress!

The guys need to think through the strategy of controlling a battle mage: collect heal and mana potions, cast all sorts of stuff correctly. I love such game-based events as it is a great opportunity to get used to the work place and get our hands working. =)

In the evening, after a small tour around the VK office, the participants will have a TechTalk with the developers and a CodeGame Show that will determine the team with the most effective mage-controlling strategy.

Let's follow the updates on the event together!

Read more »

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

By Alex_KPR, 8 years ago, translation, In English

In 2013 Yandex will host an open programming championship on the new Yandex.Contest system, with original rules, prizes, monetary awards and an exciting final round in St. Petersburg, Russia. But the most important part will be great problem sets, made by Belarusian, Japanese and Polish problem setters.

Registration opens on May 30. Full information about the schedule of events is available on the Schedule webpage.

Specifics of the tournament

Yandex.Algorithm 2013 will be scored using the TCM/Time system and consists of six rounds: test, qualification, three elimination and final rounds. The final will be held on August 21-23, with the main event taking place in St. Petersburg’s Vladimir Palace. Each round will last 100 minutes and include a set of algorithmic problems.

The test round will give you an opportunity to try out the new Yandex.Contest system and familiarise yourself with the TCM/Time system. Two hundred and fifty participants will qualify from the test round directly to the elimination stage of the contest.
All who have registered for the Yandex.Algorithm competition can take part in the qualification round. The 2,000 best contestants who have solved at least one problem will advance to the elimination stage.

The elimination stage consists of three rounds, with each round starting at a different time to give contestants from each time zone the opportunity to choose a comfortable participation time. A complex advancing system will determine the best of the best.

Participants of the elimination stage earn score points based on their performance in each elimination round according to the Grand Prix 30 system. You can read the full description of the system on the Rules webpage.

The top 4 contestants from each elimination round (of those who have not yet advanced to the final round) will be invited to the final. Another top 9 contestants based on the cumulative score of two best out-of-three elimination rounds will also join the top contestants in the final round. Of all those who have not yet advanced to the final round, the top 4 participants according to the cumulative score of the whole elimination stage will be invited to the final round, giving a total of 25 finalists: 12 based on one round score, 9 – on two best rounds, 4 – on the overall performance in the elimination stage.

The Grand Prix 30 system allows the finalists to include not only the top participants of each round, but also stable performers who have participated in multiple rounds.


TCM/Time rules are similar to ICPC rules with the difference of “blind” submissions. Upon submission, blindly submitted solutions are tested only on a sample test set, and the overall result on the problem is shown only after the end of the contest. There is a bonus for the risk – successful blind submissions will subtract penalty time based on the number of contestants who have solved the given problem. As a result, total penalty time can even be negative! You can read the full description of the TCM/Time system on the Rules webpage. Read them carefully.


The testing system supports the following list of compilers:

  • Delphi
  • Free Pascal
  • GNU С++  (4.6)
  • GNU С++ 0x (4.6)
  • GNU С++ 0x x32 (4.6)
  • GNU С++ x32 (4.6)
  • Java 7
  • Java 6
  • GNU С (4.6)
  • GNU С x32 (4.6)
  • Python 2.7
  • Python 3.2

More information is available on the Compiler settings webpage.

Final round

The final will take place on August 21-23 in St. Petersburg, Russia, in the former palace of Grand Duke Vladimir, built in 1870 on the Neva River embankment near the Hermitage museum. In the palace halls there is a significant collection of Russian paintings as well as the library of Emperor Alexander II.

Prizes and awards

The top 3 finalists will gain 300,000, 150,000 and 90,000 rubles respectively.

All 25 finalists and top 75 participants based on the cumulative score of the elimination stage will receive a Yandex.Algorithm 2013 T-shirt.

Take part in the contest and win! Good luck!

Read more »

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

By Alex_KPR, 9 years ago, translation, In English

Translated by Delinur.

The VK Cup 2012 Big Day has come. The main tour day. The participants have had a good rest and were slowly getting out of their gorgeous apartments and were getting themselves comfortable in the hall, talking, laughing.

We came out early enough, so the guys had half an hour more left before the contest. Everybody found their seats, turned the computers on, prepared themselves physically and morally. There was no limit like ''Don't touch the keyboard!!1'', so the start began a little nervously but smoothly.

Now then, what can a blogger do to while away the time? I did not plan to interfere with the contest so I was taking photos of the Griboyedov canal embankment and was watching the contest being monitored. The dynamic evaluation system of the problems’ complexity shifted the table in a quite amusing manner. Oh I wouldn't like to be in a participant's shoes there! Komaki made a dramatic advance as he made the first D problem submit; top 10 jumped here and there due to the constantly changing complexities of problems B and C. Judging by the submits, E was probably the easiest, B and C had approximately the same average difficulty, D was a more difficult problem, and A was as hard as the hell's bottom. tourist filled us with pleasant hope as he was the only person who submitted problem A, 15 minutes to the end, and got to the first place before the final tests.

Closer to the end of the contest the acm-icpc executive editor Bill Poucher arrived. I can't speak for the others but I personally wasn't particularly surprised by his presence: the codeforcers had blabbed about it. Right after the finish the participants started sharing impressions, running towards each other with happy and not exactly happy faces. The lunch time was approaching.

Lunch? Nah, that's boring. We can eat some other time, but the open question is — will we ever visit the Vkontakte office again. Encouraged by -XraY-'s stories, anton.bannykh and I climbed dangerous spiral stairs up, to the dome. The view was splendid from up there. We got our dose of adrenaline and descended from the heavens to the earth.

A little later dzhulgakov, his girlfriend and I did our best and something more to get a precious pass card and rushed along the conference rooms of the second floor. The couple got carried away in a small cozy dimly lit room, but the potential softcore porn was reduced to filming series of kisses. By the way, I've discovered the talent on an adult movie operator in me!

The rumor has it that in the next conference room efficient communication with equipment suppliers took place. A skeleton, tortured on an iron frame by the wall, smiled through all its thirty two teeth, a nice spiky platform hung above. The torture chair amused me greatly with its perverse complexity and the many ways to injure a victim. Cool!

We got to the lunch in time; we had it in the same place as yesterday — on the sixth floor, in Terrassa. The dinner transformed to a walking excursion along St. Petersburg centre. The female tour guide took the initiative and checked the participants' profound knowledge in the city's history. Enriching our minds was difficult due to the noise, the absence of a loudspeaker, stgatilov's trumpet (respect to you, Stepan!). Judging by the photos, the guys even visited some cathedrals, but I escaped on the first turn and returned to the hotel, so I can't tell you anything about it.

In the evening a festive dinner begun. The event's host was a KOTEHOK, it turned out an unusually good toastmaster. ''Do you like VK Cup?'' — ''Yeeeees!'', chanted the participants. Bill Poucher delivered an emotional speech and a show began. Frankly speaking, I was waiting for some problem to get expensive ALL OF A SUDDEN and the table to have lots and lots of swaps. But that was out of the question; too many solutions passed the final tests.

All contest participants were awarded with hp laptops, certificates, and somebody got large (literally large) checks. My congratulations to the winners: sevenkplus, s-quark and tourist, who got the first three places.

Here the official part was over and the time has come for a photo riot, uncontrolled communication and simply good mood. Charismatic Pavel Durov gathered two dozens of participants, together they examined the laptops and watched the photos of Vkontakte data centre. MikeMirzayanov was looking for potential authors of future Codeforces contests, using free T-shirts as bait.

Despite the late hour, we did not want to lose the festive feeling. Our loud company sat in the hall, visited the restaurant on the ninth floor, watched the views of the evening St. Petersburg.

That's how the VK Cup 2012 event ended. Waiting for the next year, huh? ;)

Don't be shy and watch the photos!

Read more »

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

By Alex_KPR, 9 years ago, translation, In English

Translated by Delinur.

...and we slowly move on to the next VK Cup day — the day dedicated to CodeGame and the trial tour.

Strange as it is, the morning began with breakfast in the hotel. Fresh grapefruit juice and still hot buns raised our mood perfectly. By eleven o’clock the participants gathered in the hall to transport to the Vkontakte office.

The clouds hung in the sky threateningly, however, there was no rain. Everybody coped with a short walk, quickly got to the seventh floor and took their working seats waiting for the trial tour. The actual trial tour, consisting of three problems and conducted by the Codeforces rules with dynamic assessment of costs, began a little late. The results are available by this link.

tourist took the bull by the horns immediately. He hacked severely the solutions sent for problem C. At some point the situation reached its climax: it was clear that even if Gennady fails all problems on the final contest, he won’t be able to fall lower than the second place.

The participants rushed to have lunch, discussing the problems vivaciously. The meal was organized in a restaurant on the sixth floor with a beautiful view on Kazan Cathedral. The waitresses did their best but our hungry crowd exceeded all their expectations. On the plus side, we had plenty of free time to conduct photo sessions! So the new album, dedicated to the second day of VK Cup, will have photos made by dzhulgakov, -XraY- and, traditionally, me. :)

And then, according to the timetable, began the stage of writing artificial intellect for the CodeGame cars. In a nutshell, the rules are like that: four cars pick flags, have a go at each other now and then, sometimes spit out a BelAz wheel. If they manage to get to the base in time, they are fixed; if the number of lives drops below zero, they burn in a hellfire. Correct me if I’m wrong but for some reason all CG, connected with Saratov in this or that way, turn out surprisingly like each other. Five years ago our tank called ‘‘Pedalny’’ (Rus. ‘’Pedalled’’) won the honorous last place in absolutely identical tank races, but that’s a whole different story.

In the evening the dinner was followed by the CodeGame Show, predicted by the good old schedule. The cars rushed to earn points, accompanied by cheerful Mortal Kombat OST music. I think that the most powerful bots were created by rudradevbasak and iwiwi. ilyakor was a real laugh, he called his can ‘’SheremetyevoTaxi’’ (Sheremetyevo is an airport in Moscow). Everybody watched the event interestedly and applauded to the leaders.

tourist, iwiwi, yeputons and rudradevbasak got to the finals. iwiwi chose the most aggressive tactics for his car, this decision earned him some heavy hits in his car hood. It’s easy to judge somebody when you aren’t in this person’s shoes but I would say that he suffered from his own lack of caution: he let himself get killed in two of three final battles, while other players tactfully and cautiously retreated to the base when they had few lives left. rudradevbasak endowed his car with predicting talent and picked a flag only if he managed to get to it in time, tourist dazzled us with his car’s maneuverability, and yeputons successfully shot the opponents with the wheel, one by one.

The four finalists played three games with each other and got the following places:

  1. rudradevbasak (rudradevbasak), 462

  2. luckerH4 (tourist), 453

  3. YeputonsPlayer06 (yeputons), 391

  4. iwiwiwiwiwiwi (iwiwi), 380

The first three places were awarded with brand new ipads and photo cameras. And we are about to face the most important day of VK Cup — the day of the final round.

The link to the photo album of the second day is here.

Read more »

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

By Alex_KPR, 9 years ago, translation, In English

Translated by Delinur.

Let's continue with our chat. :)

The scheme of the opening was absolutely unusual. The participants were invited into a hall with several round tables, each table had enough room for eight people. There we were offered dinner. Just like that, no onerous introductions. The breakfast was far back in the morning and there was no dinner per se in the schedule (and some participants didn't even make it to the breakfast). So the precious tables full of morsels gathered huge queues.

When the food was finished, the drowsy-eyed and now much better disposed guys were addressed to by MikeMirzayanov who delivered the introductory speech, wished everybody not to see any confusing messages about failed final tests and of course, good luck. Soon the souvenirs started to be given out: VK Cup and Codeforces prize T-shirts, notebooks, pens. While a participant was walking solemnly through the whole hall, the screen showed his photo, often a rather funny one. The organizers must have asked to send it beforehand. That was a splendid idea and we've got a splendid spectacular ceremony instead of a standard boring greeting.

I personally remembered the gorgeous photos of TomConerly, immediatel nicknamed as ''why so serious?'', meret in military uniform and Ra16bit, shouting into a payphone, wearing a google kerchief, tied in an ''industrious gardener'' style. Soon the heavy artillery of Vkontakte came in. After Pavel Durov's short but vivid speech we had only about 20 minutes left before the start of the boat adventures.

Boating meant travelling along St. Petersburg canals, listening to the tourist guide's monologue. The participants were justly separated into Russian-speaking and non-Russian speaking and seated into two small vessels. Everything started quite plainly: cold St. Petersburg weather, the monotonous voice of a woman who talked about numerous deaths, wet waves that were about to splash on those of us who sat close to the edge. However, the vessel's lower part was much warmer and everybody cheered up a bit. Fefer_Ivan used the time in-between his frequent arguments with Edvard to play the troll against the tour guide woman, but she had her revenge on him too, -XraY- learned to operate his new photo camera, ilyakor confidently acted for the camera.

We went up again, this time in a small company headed by dzhulgakov, we decided to watch the city's sights, make some photos, and listen to the tour guide.

Pelicans have been considered sacrifice birds since ancient times. In Tsarist Russia people couldn't understand how pelicans feed their young, since, as you know, there was no Internet or TV...

On that point we, figuratively speaking, fell down and rolled on the floor laughing for like ten minutes. Not that's a real problem — feeding the young without TV or the Internet!

And Pavel Durov, with his talent to transform from an official figure to 'one of the lads' by putting on his 'Vkontakte' labeled cap, produced an absolutely marvelous impression. He managed to click with everybody immediately, support conversation on the subjects that were interesting for the participants, he made jokes but listened to others carefully. What else can I say? He's a really charismatic person.

So we got to our rooms in a wonderful mood. I hope that after such rest the participants will be morally prepared to Code Game Challenge and the test contest. Let's wish them good luck!

There are many photos, so follow the link instead of a fashionable tag. :)

Read more »

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

By Alex_KPR, 9 years ago, translation, In English

Translated by Delinur.

Hi everybody! I’m going to leave a really short post while our last guests are checking in the hotel.

Hotel Kempinski, that is offered to the VK Cup coders, is very young: it opened as much as five years ago. According to the official letter, it has 197 rooms and suits, a restaurant on the ninth floor with a gorgeous view, a room for tea ceremonies and a fitness center with a sauna. Some unofficial sources regard this hotel one of the best in the city! I don’t know whether it is true or not but the impression is absolutely positive.

I was lucky to come to St. Petersburg rather early, that is, yesterday, so I witnessed the arrival of the Japanese and the Chinese, rather exhausted after the journey. Having seen the timetable, they laughed much as iwiwi associated rafting with cold bubbling water. That’s where an unruly raft sent him the day they had a rest at the Petrozavodsk Training Camp.

At night I had a small walk about the building with a camera. The guards turned out rather nice and good-natured people; they insisted on having a look at my photos and demanded to delete any that had hotel staff on them. So I lost some fruit of my toil and had to escape to the restaurant and calmly walk to my room from there.

Next day Ra16bit and rizar talked excitedly about a VIP bus that rode to the plane, got them to the VIP zone right from the passenger boarding stairs. There they waited for a VIP porter with the luggage, got in a VIP taxi and rode to a VIP hotel. On the other hand, during the breakfast Edvard told Gerald and me, how much he hates all this mock antique design and all this antique furniture, bought on auctions for a fortune. =)

But as we say in Russia, it’s better to see something once than to hear about it a hundred times. There aren’t many photos, bad luck :) The opening ceremony will start soon and according to the timetable, it will smoothly transform itself into a festive dinner and boating. I’ll try to keep you up to date!

Read more »

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

By Alex_KPR, 9 years ago, translation, In English

Hi everybody!

This weekend a new gym is coming. Problems are from ICL cup 2012, also known as GP of ICL.

A supposed difficulty of the contest is four stars.

The training is prepared to foreign participants and contestants who don't take part in the Open Cup.

Gym is added by Edvard.

Read more »

Tags gym, icl
  • Vote: I like it
  • +17
  • Vote: I do not like it