摘要: HyperhuffmanTime Limit: 5 Seconds Memory Limit: 32768 KBYou might have heard about Huffman encoding - that is the coding system that minimizes the expected length of the text if the codes for cha... 阅读全文
posted @ 2013-08-07 19:13 码代码的猿猿 阅读(201) 评论(0) 推荐(0)
摘要: FrecklesTime Limit: 2 Seconds Memory Limit: 65536 KBIn an episode of the Dick Van Dyke show, little Richie connects the freckles on his Dad's back to form a picture of the Liberty Bell. Alas, one... 阅读全文
posted @ 2013-08-07 18:44 码代码的猿猿 阅读(176) 评论(0) 推荐(0)
摘要: 求树的直径:任选一点求BFS,所得的距离这个点最远的一定是直径上的一个距离该点较远的端点,再进行一次BFS就能找到直径。。。。。Extend 7-day VacationTime Limit: 1 Second Memory Limit: 32768 KBCYJJ is planning on her vacation. Since her boss has permitted her ... 阅读全文
posted @ 2013-08-07 17:27 码代码的猿猿 阅读(206) 评论(0) 推荐(0)
摘要: RobbersTime Limit: 5 Seconds Memory Limit: 32768 KB Special JudgeN robbers have robbed the bank. As the result of their crime they chanced to get M golden coins. Before the robbery the band ... 阅读全文
posted @ 2013-08-07 08:33 码代码的猿猿 阅读(278) 评论(0) 推荐(0)
摘要: String SuccessorTime Limit: 2 Seconds Memory Limit: 65536 KBThe successor to a string can be calculated by applying the following rules:Ignore the nonalphanumerics unless there are no alphanumeri... 阅读全文
posted @ 2013-08-07 07:26 码代码的猿猿 阅读(208) 评论(0) 推荐(0)