Codeforces Round #418 (Div. 2) Editorial

Revision en6, by cyand1317, 2017-07-26 11:16:03


Codeforces Round #418 (Div. 2) has just come to an end. This is my first round here, and hope you all enjoyed the contest! > <

Seems the statements still created a few issues :( Anyway hope you liked it, and the characters feature the Monogatari anime series. Let me state again that the statements has little to do with the actual plot — they're inspired by five theme songs actually — and I'm not spoiling anyone of the series! ^ ^

Sympathy for those failing system tests on B... This problem was intended to experience a lot of hacks but somehow there are not so many.

Here are the detailed solutions to the problems. Feel free to write in the comments if there's anything incorrect or unclear.

Tutorial is loading...
Solution 1
Solution 2
Tutorial is loading...
Solution 1
Solution 2 - Casework
Tutorial is loading...
Tutorial is loading...
Solution 1 - DP on trees
Solution 2 - Greedy

One more thing — Staying up late is bad for health.

Tutorial is loading...
Solution 1 - O(n^5)
Solution 2 - O(n^3) by KAN

This is the round with the most solutions so far perhaps? There are at least 3 × 2 × 3 × 3 × 3 = 162 different ways to pass all problems in this round =D

Pla-tinum happy though I'm supposed to be
Pla-tinum sad is somehow how I get

Personally I'd like to express my gratitude to the community for creating this amazing first-time experience for me. Thank you, and see you next round. Probably it will be for Ha... Well, let's wait and see :)

Cheers \(^ ^)/


  Rev. Lang. By When Δ Comment
en6 English cyand1317 2017-07-26 11:16:03 4 Tiny change: '[c1][c2], ways[c0 - ' -> '[c1][c2], (ll)ways[c0 - '
en5 English cyand1317 2017-06-08 10:15:57 7528 Post all tutorials
en4 English cyand1317 2017-06-08 07:50:18 3158
en3 English cyand1317 2017-06-07 20:42:56 107
en2 English cyand1317 2017-06-07 18:25:59 43 Fix code formatting, oops (
en1 English cyand1317 2017-06-07 18:12:42 5926 Initial revision (published)