Ants Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 20047 Accepted: 8330 Description An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it imm…
"One thing is for certain: there is no stopping them;the ants will soon be here. And I, for one, welcome ournew insect overlords." Kent Brockman Piotr likes playing with ants. He has n of them on a horizontal pole L cm long. Each ant is facing e…
7.2 There are three ants on different vertices of a triangle. What is the probability of collision (between any two or all of them) if they start walking on the sides of the triangle? Assume that each ant randomly picks a direction, with either direc…
Problem DPiotr's AntsTime Limit: 2 seconds "One thing is for certain: there is no stopping them;the ants will soon be here. And I, for one, welcome ournew insect overlords." Kent Brockman Piotr likes playing with ants. He has n of them on a hori…
E. Ants in Leaves 题目连接: http://www.codeforces.com/contest/622/problem/E Description Tree is a connected graph without cycles. A leaf of a tree is any vertex connected with exactly one other vertex. You are given a tree with n vertices and a root in t…
B. Ants Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/317/problem/B Description It has been noted that if some ants are put in the junctions of the graphene integer lattice then they will act in the following fashion: eve…