The problems were named after songs of my favorite musical group, Hippie Sabotage. Give them a try!
Check each number of liars independently.
How to check, whether there are exactly $$$x$$$ liars?
С++ Implementation: 204718333
How to solve for $$$n = 2$$$?
How to solve for $$$n = 4$$$?
С++ Implementation: 204718497
What is the number of options that is present in the infinite amount of rounds?
Choose the smallest such number of options.
How does this number and $$$m$$$ relate to the answer?
С++ Implementation: 204718535
What can we say about the position of the maximum elements relative to $$$[l, r]$$$?
You can use DP, or otherwise:
Iterate over the middle maximum element and choose $$$[l, r]$$$ greedily.
С++ Implementation: 204718553
What is the relation between two models that go one after another in a show?
If you calculate the relation "model $$$i$$$ can go before model $$$j$$$" somehow, how to calculate the answer?
Use DP on the graph.
How to calculate this relation fast enough?
С++ Implementation: 204718603
What happens in the general case after 2 queries?
There are $$$O(n^2)$$$ candidates for an answer.
Can we solve the question in 3 queries?
How to choose the third query, so that we don't intersect any bad candidates?
С++ Implementation: 204718641