fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. int t,a,b,c,d;
  6. cin >> a >> b >> c >> d;
  7. int sa1 = 3*a/10, sa2 = a-(a/250*c), sb1 = 3*b/10, sb2 = b-(b/250*d);
  8. //cout << sa1 << " " << sa2 << " " << sb1 << " " << sb2;
  9. if(max(sa1,sa2) > max(sb1,sb2)) cout << "Misha";
  10. else if(max(sa1,sa2) < max(sb1,sb2)) cout << "Vasya";
  11. else cout << "Tie";
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5288KB
stdin
1500 1000 176 177
stdout
Misha