In the name of God.
I’d like to start the editorial with below poem by Nezami Ganjavi :
Translation: It is better for someone who doesn’t praise for you (God) to be quiet. It is better for something that distracts our minds from you (God) to become forgotten.
Hello again, and hope you have been Joon-Joon of the round :P
I’m preparing harder version of some of problems (Div.2 A, B, and Div.1 A, D) and I’ll put them on some gym, so if you are interested in harder version of problems please wait for about one week.
You can see and download the problem archives (pretests, tests, statements, validator, checker, solutions) in about 30 minutes from here.
Preparation details:
In 25 May Batman came up with problem Div.1 D and other problems authored inchmeal. Several problems has changed during the process. And several new problems authored, in fact I have another problem set to prepare another div.1 + div.2 round, but I haven’t enough time now : (.
Paintings in problems was suggested by me, painted by Batman and edited by me. Problem stories and this editorial were suggested and written by me. KAN helped us preparing the round very much, we are thankful to him. This table for each person and for each problem shows the number of the committed changes (in polygon) he has made in preparing the problem (it is good for showing how much someone was involved in preparing).
User\Problem | Div.2 A | Div.2 B | Div.1 A | Div.1 B | Div.1 C | Div.1 D | Div.1 E | Total |
Me | 8 | 9 | 16 | 16 | 10 | 19 | 37 | 114 |
Batman | 3 | 2 | 1 | 0 | 7 | 0 | 1 | 14 |
KAN and testers | 3 | 3 | 5 | 9 | 7 | 7 | 13 | 61 |
Here is another table, showing the number of expected accepts (in my opinion, before the contest) and the number of accepts (after system testing).
Div.2 A | Div.2 B | Div.2 C | Div.2 D | Div.2 E | Div.1 A | Div.1 B | Div.1 C | Div.1 D | Div.1 E | |
Expected | 6000 | 4500 | 2000 | 500 | 150 | 600 | 400 | 300 | 50 | 10 |
Accepted | 3966 | 1723 | 1131 | 684 | 10 | 479 | 474 | 50 | 15 | 1 |
Hints
Div.2 A : Write last digit of 1378n for several small values.
Div.2 B : Note that if then .
Div.1 A : If the answer exists, it depends on the lengths of cycles in the functional graph.
Div.1 B : It’s similar to a simple knapsack problem, think on O(n·W) solution using dynamic programming.
Div.1 C : Build a graph and put edges between each 2 * i, 2 * i + 1 and each BF and GF.
Div.1 D : Keep a mask for each vertex, i-th bit of maskv is true if the number of edges in the path from root to v such that letter i is written on them is odd. Now if number of bits in is 0 or 1, path between v and u is Dokhtar-kosh.
Div.1 E : Sort all of the options, then problem becomes easier, solve the new problem with sqrt decomposition.
Details
Div.2 A
Idea, authoring, solution by Batman, preparation by Batman and me.
My and Batman ’s birth year in Solar Hijri calendar is 1378.
Div.2 B
Idea, authoring, solution by Batman, preparation by Batman and me.
Div.1 A
Idea, authoring, solution, preparation by me.
Attractive boys/girls are called Joon-Joon in persian. Owf is a sound used when we (persian) are interested in something, especially when we see something attractive, such as our crush :P
Div.1 B :
Idea, authoring, solution, preparation by me.
The problem authored by me 2 days before the contest :D (#FastAsFerrari). Attractive girls are called (some word similar to) “Hos” in persian. It’s a good place to thank amsen, whose name (Hir) gave me this idea (to use word “Hos” instead of “attractive girl”).
Div.1 C :
Idea, authoring, solution by Batman, preparation by Batman and me.
“Kooft” is something make people die. “Zahre-mar” meaning is “Venom of snake”.
Div.1 D :
Idea by Batman, authoring, solution, preparation by me.
“Dokhtar-kosh” is an adjective, used when something is very very attractive.
Div.1 E :
Idea, authoring, solution, preparation by me.
Solutions
I’d like to finish the editorial with below poem by Hafez:
Translation: I have never seen anything that sounds better than love, it’s the relic which will remains in the universe.
Good luck and see you soon in “Round #383 hard version” ; )