Hong Kong Olympiad in Informatics [HKOI] 2003

Sample Solution