英语翻译重写的程序Time Limit:1000MS Memory Limit:65536KTotal Submit:54 Accepted:24 Description Recently Doctor Guan has discovered two new kinds of bacteria and named them BT-U and BT-V .BT-U and BT-V are quite special,they can only live wit
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/26 21:20:23
英语翻译重写的程序Time Limit:1000MS Memory Limit:65536KTotal Submit:54 Accepted:24 Description Recently Doctor Guan has discovered two new kinds of bacteria and named them BT-U and BT-V .BT-U and BT-V are quite special,they can only live wit
英语翻译
重写的程序
Time Limit:1000MS Memory Limit:65536K
Total Submit:54 Accepted:24
Description
Recently Doctor Guan has discovered two new kinds of bacteria and named them BT-U and BT-V .BT-U and BT-V are quite special,they can only live with the help of each other.Doctor Guan did several experiments on BT-U and BT-V,here’re the results:
Put 100 BT-Us and 80 BT-Vs together ,one minute later ,there are 20 BT-Us and 80 BT-Vs ,one minute later again ,there are 20 BT-Us and 60 BT-Vs,then 20 BT-Us and 40 BT-Vs ,then 20 BT-Us and 20 BT-Vs ,then these 20 BT-Us and 20 BT-Vs keep alive.
Put 3 BT-Us and 5 BT-Vs together ,one minute later ,there are 3 BT-Us and 2 BT-Vs ,one more minute later there are 1 BT-U and 2 BT-Vs,then 1 BT-U and 1 BT-V,and this 1 BT-U and 1 BT-V keep alive.
According to the results above,Doctor Guan has reached a conclusion that when putting x BT-Us and y BT-Vs together,if x=y then they keep alive,if x < y then x BT-Vs would die in one minute,if x > y then y BT-Us would die in one minute.
Doctor Guan has made a program to determine how many BT-Us and BT-Vs survive when putting x BT-Us and y BT-Vs together.Program is as follow :
#include
ifstream filein(“reprog.in”);
ofstream fileout(“reprog.out”);
int main(){
long x,y;
for(;;){
filein>>x>>y;
if(x
英语翻译重写的程序Time Limit:1000MS Memory Limit:65536KTotal Submit:54 Accepted:24 Description Recently Doctor Guan has discovered two new kinds of bacteria and named them BT-U and BT-V .BT-U and BT-V are quite special,they can only live wit
时间限制:1000ms 内存限制:65535k
总提交数:54 正确:24
问题描述:
最近,关博士发现了两种新细菌并且命名为BT-U和BT-V.BT-U和BT-V非常特别,它们只能共生,关博士用BT-U和BT-V做了几个试验,结果如下:
将100个BT-U和80个BT-V放在一起,1分钟后,剩下20个BT-U和80个BT-V,2分钟后(又过了一分钟),剩下20个BT-U和60个BT-V,3分钟后(又过一分钟),剩下20个BT-U和40个BT-V,4分钟后,剩下20个BT-U和20个BT-V,之后一直保持现状.
将3个BT-U和5个BT-V放在一起,一分钟后,剩下3个BT-U和2个BT-V,两分钟后,剩下1个BT-U和2个BT-V,3分钟后剩下1个BT-U和1个BT-V,之后一直保持该状态.
根据以上结果,关博士得到这样一个结论:当把X个BT-U和Y个BT-V放在一起时,如果X=Y,则不会发生变化,如果XY,则Y个BT-U将在一分钟内死亡.
关博士编写了一个程序来确定X个BT-U和Y个BT-V放在一起时,有多少个BT-U和BT-V可以存活.程序如下:(程序略)
但是这个程序并不能执行,关博士需要你来帮他完善这个程序.
输入:
有多组测试数据,每行数据有两个整数X和Y.
以两个0作为结束标志.
输出
每行一个结果
例如:
输入
2 2
1 1
0 0
输出
2
1
时间限制: 1000MS内存限制: 65536K
共计送出: 54接受: 24
说明
关博士最近发现了两个新种细菌,其中英国电信公司命名为- U和英国电压。电信- U和英国电压是相当特殊的,他们只能住的帮助下对方。关医生没有几个实验的电信- U和英国电信公司,五, here're的结果:
英国电信公司提出100 ,我们和80个电信,诉在一起,一分钟后,有20个...
全部展开
时间限制: 1000MS内存限制: 65536K
共计送出: 54接受: 24
说明
关博士最近发现了两个新种细菌,其中英国电信公司命名为- U和英国电压。电信- U和英国电压是相当特殊的,他们只能住的帮助下对方。关医生没有几个实验的电信- U和英国电信公司,五, here're的结果:
英国电信公司提出100 ,我们和80个电信,诉在一起,一分钟后,有20个电信,我们和80个暖气片速度,一分钟后再次,有20电信,我们和60个暖气片速度,然后20日英国电信公司,我们40暖气片速度,然后20日英国电信公司,我们和20个暖气片速度,然后这20个电信,我们和20个电信,速度保持。
英国电信公司将第3 ,我们和5个电信,诉在一起,一分钟后,有3个电信,我们和2个电信,速度,一分钟后有1电信- U和第2暖气片速度,然后一电信- U和一英国电压,这一日电信- U和1款英国电压保持。
根据上述结果,医生关已经达到了最后,当把x电信,我们和y电信,诉在一起,如果x = y然后他们继续活着,如果x “ y则x电信,速度会死在一分钟内,如果x “ y然后y电信,我们将死在一分钟。
关博士作出了计划,以确定有多少电信,我们和BT -诉生存x时,把英国电信公司,我们和y电信,诉在一起。计划如下:
收起
这方面 我不懂啊