2 shunfurh shunfurh 于 2017.09.11 23:41 提问

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.

Input

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.

Output

For each case, print one of the following sentences:

'Ecological balance will develop.' - if after sufficiently long time the population of both hares and foxes approaches the reference count with an arbitrary a priori given precision, i.e. lim hy=0 and lim fy=0.
'Hares will die out while foxes will overgrow.' - if after sufficiently long time the population of hares resp. foxes falls under resp. exceeds any a priori given threshold, i.e. lim hy=-infinity and lim fy=+infinity.
'Hares will overgrow while foxes will die out.' - if after sufficiently long time the population of foxes resp. hares falls under resp. exceeds any a priori given threshold, i.e. lim hy=+infinity and lim fy=-infinity.
'Both hares and foxes will die out.' - if after sufficiently long time the population of both hares and foxes falls under any a priori given threshold, i.e. lim hy=-infinity and lim fy=-infinity.
'Both hares and foxes will overgrow.' - if after sufficiently long time the population of both hares and foxes exceeds any a priori given threshold, i.e. lim hy=+infinity and lim fy=+infinity.
'Chaos will develop.' - if none of the above mentioned description fits.

Sample Input

2
2 0.5
0.5 0.6
2 3

0.1 1
2 0.1
1 1

Sample Output

Both hares and foxes will overgrow.
Hares will die out while foxes will overgrow.

1个回答

caozhy
caozhy   Ds   Rxr 2017.09.27 22:12
已采纳
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
227. If you run after two hares, you will catch neither. 脚踏两只船,势必落空
脚踏两只船,势必落空。
CodeForces - 358D Dima and Hares
Dima liked the present he got from Inna very much. He liked the present he got from Seryozha even more.Dima felt so grateful to Inna about the present that he decided to buy her n hares. Inna was very
CF 510E(Fox And Dinner-把质数拆成奇数和偶数)
E. Fox And Dinner time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Fox Ciel is participating in a party in P
Codeforces Round #290 (Div. 2) E. Fox And Dinner 网络流 最大流
E. Fox And Dinner time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Fox Ciel is participating in a party in P
拓扑排序 Fox And Names : CodeForces - 510C
题目: Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: “Fox”). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order.
CF510E: Fox And Dinner(最大流)
E. Fox And Dinnertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel is participating in a party in Prime Kingdom. There are n foxes there (i...
CodeForces510 C. Fox And Names(拓扑排序)
CodeForces510 C. Fox And Names(拓扑排序)
【CodeForces】510C - Fox And Names(拓扑 & STL)
点击打开题目 C. Fox And Names time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Fox Ciel is going to publish
集群基础学习之VCS常用命令
对于resouce 出现 partial 的处理,原来是系统还在部分资源没有启动好,要等待。可以用: /opt/VRTSvcs/bin/hares -state 可以看到有哪些资源 没有 启动,看看可以把资源手动启动起来。
CodeForces - 358D Dima and Hares
Dima liked the present he got from Inna very much. He liked the present he got from Seryozha even more. Dima felt so grateful to Inna about the present that he decided to buy her n hares. Inna was ve