10 2012 档案

摘要:Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the corresponding binary tree.Input Specification: Each input file contains one test case. For each case, t 阅读全文
posted @ 2012-10-06 15:25 scjyldq 阅读(149) 评论(0) 推荐(0)
摘要:Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest symmetric sub-string is "s PAT&TAP s", hence you must output 11.Input Specification: Each input file contains one test case w 阅读全文
posted @ 2012-10-03 21:54 scjyldq 阅读(248) 评论(0) 推荐(0)
摘要:As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the length of each road between any pair of cities are marked on the map. When there is an emergency call 阅读全文
posted @ 2012-10-03 10:25 scjyldq 阅读(175) 评论(0) 推荐(0)
摘要:It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we need to repair any other highways to keep the rest of the cities connected. Given the map of cities whi 阅读全文
posted @ 2012-10-03 10:23 scjyldq 阅读(180) 评论(0) 推荐(0)