simulation problem
Merge github.com:lantimilan/topcoder
CF 258C