XXII Open Cup, Grand Prix of BSUIR
Let's discuss the tasks here.
How to solve problem B?
Atcoder ABC #354 Solution Discussion