### X-O__O-X's blog

By X-O__O-X, history, 7 months ago, This problem is the type of problem where I know everything needed but I still can't solve it. I always learn a lot from such problems

I am not interested in a solution, I know it, but how to approach the problem and reach a solution. How to think about it? What should have hinted me to consider using what was needed to solve it ? Comments (8)
 » The name of the problem says it all234G - Тренировки
•  » » 7 months ago, # ^ | ← Rev. 2 →   How to practice ? Are all ways of practice equally good ? Will any kind of practice pay off ? When I try to think about a problem which I didn't know how to solve to locate my gaps, aren't this practice ?I just hate when someone answer "Practice" Wow, thanks genius \ This is the most stupid answer to a question, I have ever read.
•  » » »
 » My Thought process СпойлерOkay so, basically we need two groups such that matching between them is maximum possible. СпойлерIt makes sense to make the size of the groups as equal as possible so that max number of edges may exist between them. СпойлерOkay, so if we do that, every player of one group will already have played with all the players of the other group and now should play against the players of his own group. Hence the problem is divided in $\left \lceil{\dfrac{n}{2}}\right \rceil$ and $\left \lfloor{\dfrac{n}{2}}\right \rfloor$ individual problems. Divide and Conquer Now I just need to merge, Since the matches are held in parallel, I guess the number of matches will be max of left and right, + 1. СпойлерOh come on, I also need to print now. Okay, I guess Matches are held at each level of recursion. Hence I can store them level wise in a vector. СпойлерThe maximum depth should be $\left\lceil{\log_{2}(n)}\right\rceil$. But lets just create a vector of size 1000.
•  » »
•  » » » Plagiarism Inspiration
•  » » Can you implement this solution ?
•  » » »