DIUPC 2010 Problem I

c
#contest#competitive-programming]
c