My approach for 1771F
https://pt13762104.github.io/Codeforces_1771F_optimization.pdf
ABC 483 problems EFG (part 2)