https://liuxueyang.github.io/posts/codeforces/1288d/
CodeForces 1288D Minimax Problem