Hello Codeforces, I want to share another way of solving 2184D - Unfair Game .I struggled with this problem for half an hour and couldn't find a logical derivation.
So, I decided to re-read the problem statement and wondered if the authors intended for some Unfair Game. I decided to engage in some "tom-foolery."
So i wrote a script which did what the problem statement explicitly said and printed it as it wanted.
Script
I took about 20 seconds to run the script and i just pasted it and got a AC (357571203).
This is the first time i did in contest. Have you done any of such pre-computation in the contest.









lol nice
that is certainly one of the solutions of all time
https://codeforces.me/blog/entry/79277?#comment-649963