摘要: Problem DescriptionA school bought the first computer some time ago(so this computer's id is 1). During the recent years the school bought N-1 new computers. Each new computer was connected to one of settled earlier. Managers of school are anxious about slow functioning of the net and want to kn 阅读全文
posted @ 2012-04-18 22:14 'wind 阅读(353) 评论(0) 推荐(0) 编辑
摘要: DescriptionLeyni喜欢机器人,这次,他得到了一个机器人,这个机器人能接受两种命令,"T"(向后转),"F"(前进一步)。他还得到了一个用于控制这个机器人的指令序列,他计划恰好修改k次这个指令序列(一次只能修改其中一个指令,同一个指令也可以被反复修改)后让机器人去执行,并使这个机器人最终停下的位置离起点尽量远。他想知道这个机器人最终停下的位置离起点的最远距离,请你帮助他!Input本题有多组测试数据,输入的第一行是一个整数T代表着测试数据的数量,接下来是T组测试数据。对于每组测试数据:第1行 包含一个长度不超过100的仅由"T&qu 阅读全文
posted @ 2012-04-18 01:02 'wind 阅读(349) 评论(0) 推荐(0) 编辑