摘要: A. System Administrator模拟:直接计算同类第一项相加是否大于等于总和的一半B. Internet Address字符串:关键在于找"ru"C. Game with Coins贪心:保证堆数为奇数,且最后的两堆一定要先取D. Restoring Table位运算:按32位分别做,生成1的两者都为1E. Mishap in Club模拟:能利用已经存在的人就利用,否则重新加人F. Log Stream Analysis模拟:枚举每个事件,它之后的第num-1个的时间减去该事件时间是否<timeG. Suggested Friends图论:用map和v 阅读全文
posted @ 2012-11-21 20:13 YogyKwan 阅读(345) 评论(0) 推荐(1) 编辑
摘要: G. Suggested Friendstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus works as a programmer in a start-up social network. His boss gave his a task to develop a mechanism for determining suggested friends. Polycarpus thought much about th 阅读全文
posted @ 2012-11-21 19:53 YogyKwan 阅读(411) 评论(0) 推荐(1) 编辑
摘要: H. Queries for Number of Palindromestime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got a strings = s1s2...s|s|of length|s|, consisting of lowercase English letters. There also areqqueries, each query is described by two integersli, ri 阅读全文
posted @ 2012-11-21 19:43 YogyKwan 阅读(257) 评论(0) 推荐(1) 编辑
摘要: C. Game with Coinstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo pirates Polycarpus and Vasily play a very interesting game. They havenchests with coins, the chests are numbered with integers from 1 ton. Chest numberihasaicoins.Polycarpus an 阅读全文
posted @ 2012-11-21 19:39 YogyKwan 阅读(406) 评论(0) 推荐(0) 编辑