CodeForces 501A Contest(水题,感觉BUG)
来源:互联网 发布:淘宝分销模式解说 编辑:程序博客网 时间:2024/06/10 05:54
Misha and Vasya participated in a Codeforces contest. Unfortunately, each of them solved only one problem, though successfully submitted it at the first attempt. Misha solved the problem that costs a points and Vasya solved the problem that costs b points. Besides, Misha submitted the problem c minutes after the contest started and Vasya submitted the problem d minutes after the contest started. As you know, on Codeforces the cost of a problem reduces as a round continues. That is, if you submit a problem that costs p points tminutes after the contest started, you get points.
Misha and Vasya are having an argument trying to find out who got more points. Help them to find out the truth.
The first line contains four integers a, b, c, d (250 ≤ a, b ≤ 3500, 0 ≤ c, d ≤ 180).
It is guaranteed that numbers a and b are divisible by 250 (just like on any real Codeforces round).
Output on a single line:
"Misha" (without the quotes), if Misha got more points than Vasya.
"Vasya" (without the quotes), if Vasya got more points than Misha.
"Tie" (without the quotes), if both of them got the same number of points.
500 1000 20 30
Vasya
1000 1000 1 1
Tie
1500 1000 176 177
Misha
题意:
带入公式试一下。
问题卡在 —> 如图
不知道是不是第四次经历了!!!求解!
AC CODE:
#include<stdio.h>#include<cstring>#include<algorithm>#define AC main()using namespace std;const int MYDD = 1103;double GetPoints(int p, int t) {return max(0.3*p, (p - p*t/250.0)*1.0);}int AC {int a, b, c, d;scanf("%d %d %d %d", &a, &b, &c, &d);if(GetPoints(a, c) > GetPoints(b, d)) {puts("Misha");}else if(GetPoints(a, c) < GetPoints(b, d)) {puts("Vasya");}else if(GetPoints(a, c) == GetPoints(b, d)) {puts("Tie");}return 0;}///
- CodeForces 501A Contest(水题,感觉BUG)
- Codeforces 501A:Contest(水题)
- CodeForces 501A Contest
- CodeForces 501A Contest
- codeforces 501A Contest
- CodeForces 501A Contest(最大得分)
- Codeforces Round #357 (Div. 2) A Good Contest(水题)
- codeforces 442 A. Alex and broken contest(水题)
- codeforces contest 785 a题
- codeforces contest 779 A题
- codeforces/contest/797/problem/A
- CodeForces 813A The Contest
- Codeforces 813 A The Contest
- [水题]Codeforces Round #307 (Div. 2) A.GukiZ and Contest
- CodeForces 551A GukiZ and Contest(模拟)
- CodeForces - 681A A Good Contest
- CodeForces 681A A Good Contest
- codeforces 681A A Good Contest
- 如何查看linux版本 如何查看LINUX是多少位
- 关于fedora24安装matlab问题
- UILable的一些很有用的功能
- 对LeNet-5卷积神经网络的理解
- ADB 的一些命令,不定期更新
- CodeForces 501A Contest(水题,感觉BUG)
- 千万级PV架构
- TextInputLayout 设置hint和EditText之间的距离的一种方案
- Google大数据三篇著名论文中文版
- Centos学习笔记 by 小陌_0226
- redis3.0.2 编译安装(启动参数方式启动)
- MariaDB10.0.21 编译安装 脚本
- Android Studio:生成 JavaDoc
- 二维码扫描