比赛地址
A.
思路:模拟
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
int v1,v2,T,s,L;
cin>>v1>>v2>>T>>s>>L;
if(v1<v2)cout<<"Hong"<<' '<<L/v2<<endl;
else if(v1==v2)cout<<"Tie"<<' '<<L/v2<<endl;
else{
int l1=0,l2=0,t1=0;
while(l1<L&&l2<L){
l1+=v1,l2+=v2;
t1++;
//cout<<l1<<' '<<l2<<endl;
if(l1<L&&l1-l2>=T)l2+=v2*s,t1+=s;
//cout<<l1<<' '<<l2<<' '<<t1<<endl;
}
if(l1>l2)cout<<"Ming"<<' '<<t1<<endl;
else if(l1==l2)cout<<"Tie"<<' '<<t1<<endl;
else cout<<"Hong"<<' '<<L/v2<<endl;
}
return 0;
}