摘要: 题意:一根长为L的木棒上有n只蚂蚁左右移动,1秒1个单位长度,碰撞后反向移动,问T秒后蚂蚁的位置与方向。题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=20&problem=1822——>>汝佳新书阅读说明中的例题,大牛就是大牛!过程中两个思想:1、两只蚂蚁相撞后假设互穿而过得最终各蚂蚁位置;2、终态各蚂蚁的相对位置不变,与始态相同。#include #include using namespace 阅读全文
posted @ 2013-01-17 13:29 xiaodanding 阅读(116) 评论(0) 推荐(0) 编辑