随笔分类 -  ACM算法

摘要:描述You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south, east, west, up or down. You cannot move diagonally and the maze is surrounded by solid rock on a 阅读全文
posted @ 2009-11-22 21:58 laonan 阅读(216) 评论(0) 推荐(0)
摘要:给你两个整数,请你计算A × B。输入数据的第一行是整数T(1 ≤ T ≤ 20),代表测试数据的组数。接着有T组数据,每组数据只有一行,包括两个非负整数A和B。但A和B非常大,Redraiment能保证这些数用long来保存一定会溢出。但A和B的位数最大不会超过100位。输出对应每组测试数据,你都要输出两行:第一行为:"Case #:", # 代表这是第几组测试数据。第二行是一个等式:"A * B = Sum", Sum 代表 A × B 的结果。你要注意这个等式里包含了几个空格。要求每组数据之间都需要保留一个空行。样例输入2121 阅读全文
posted @ 2009-04-19 13:25 laonan 阅读(4019) 评论(0) 推荐(0)