Anton Golov's submission of Dual Distance | CodeChef