Solutions for problem located here(http://ac.jobdu.com/hhtproblems.php)