spoj problem

18857. Gopi and Sandwich