Codeforces Solution 501A Contest

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    long long int a,b,c,d,ma,mb;
    cin>>a>>b>>c>>d;
    ma=max(((3*a)/10),a-((a/250)*c));
    mb=max(((3*b)/10),b-((b/250)*d));

    if(ma==mb)
        cout<<"Tie"<<endl;
    else if(ma>mb)
        cout<<"Misha"<<endl;
    else
        cout<<"Vasya"<<endl;

    return 0;
}

Comments

Popular posts from this blog

Uri Solution 2747 Output 1

Codeforces Solution 230B T-primes