instanceof@tg says to YSITD
Google Code-in 有些題目真的會讓人做不下去……