|Online Judge||Problem Set||Authors||Online Contests||User|
Hares and Foxes
The Antique Comedians of Malidinesia play an interesting comedy where many animals occur. Because they want their plays to be as true as possible, a specialist studies the behaviour of various animals. Recently, he is interested in a binary dynamic ecological system hares-foxes (SHF). As a part of this project, you are asked to design and implement intelligent automatic target evaluation simulator (IATES) for this system. The behaviour of the SHF follows so called standard model, described by the following set of difference equations.
hy+1 = a.hy - b.fy
fy+1 = c.fy + d.hy
where hy resp. fy represent the difference of the number of hares resp. foxes in year y and the reference count determined at the beginning of the experiment. The units of hy and fy are unknown. Therefore, hy and fy are to be treated as real numbers. Your task is to write a program to determine the long term evolution of SHF.
The input consists of N cases. The first line of the input contains only positive integer N. Then follow the cases. Each case consists of six real numbers a, b, c, d, h1998 and f1998, written in this order on three lines, two numbers per line, separated by one or more spaces. The numbers are given in the classical format, i.e. optional sign, sequence of digits, optional dot and optional sequence of digits. The text form of a number does not exceed 10 characters. Each case is followed by one empty line.
For each case, print one of the following sentences:
2 2 0.5 0.5 0.6 2 3 0.1 1 2 0.1 1 1
Both hares and foxes will overgrow. Hares will die out while foxes will overgrow.
[Submit] [Go Back] [Status] [Discuss]
Home Page Go Back To top
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator