10869 - Brownie Points II
Moderator: Board moderators
10869 - Brownie Points II
The n^2 algorithm most probably won't do. Is there a n*log(n) algorithm for this problem?
Maybe you missed this sentence from the problem statement:
Then, Stan gets 7 points and Ollies gets 3 points.
If Stan places the line x=2, Ollie has to place the line y=-2.
Then, Stan gets 7 points and Ollies gets 2 points.
So the output is "Stan: 7; Ollie: 2 3;".
If Stan places the line x=0, Ollie has to place the line y=0.Then Ollie places a horizontal line that must cross a brownie point already crossed by the vertical line.
Then, Stan gets 7 points and Ollies gets 3 points.
If Stan places the line x=2, Ollie has to place the line y=-2.
Then, Stan gets 7 points and Ollies gets 2 points.
So the output is "Stan: 7; Ollie: 2 3;".