好像博弈论那篇文章看不了了吗?
by lazytag @ 2022-03-11 20:35:03
前排资瓷
by TheTus @ 2022-03-11 22:02:03
后排
by wangyi_c @ 2022-03-12 13:17:22
A - Shampoo /
Time Limit: 2 sec / Memory Limit: 1024 MB
Score : 100 points
Problem Statement
Three people live in Takahashi's house: Takahashi, his father, and his mother. All of them wash their hair in the bathroom each night.
His father, his mother, and Takahashi take a bath in this order and use A, B, and C milliliters of shampoo, respectively.
This morning, the bottle contained V milliliters of shampoo. Without refilling, who will be the first to run short of shampoo to wash their hair?
Constraints
1≤V,A,B,C≤10
5
All values in input are integers.
Input
Input is given from Standard Input in the following format:
V A B C
Output
If the first person to run short of shampoo to wash their hair is Takahashi's father, print F; if it is Takahashi's mother, print M; if it is Takahashi, print T.
Sample Input 1
Copy
25 10 11 12
Sample Output 1
Copy
T
Now, they have 25 milliliters of shampoo.
First, Takahashi's father uses 10 milliliters, leaving 15.
Next, Takahashi's mother uses 11 milliliters, leaving 4.
Finally, Takahashi tries to use 12 milliliters and runs short of shampoo since only 4 is remaining.
Sample Input 2
Copy
30 10 10 10
Sample Output 2
Copy
F
Now, they have 30 milliliters of shampoo.
First, Takahashi's father uses 10 milliliters, leaving 20.
Next, Takahashi's mother uses 10 milliliters, leaving 10.
Then, Takahashi uses 10 milliliters, leaving 0.
Next day, Takahashi's father tries to use 10 milliliters and runs short of shampoo since only 0 is remaining.
Sample Input 3
Copy
100000 1 1 1
Sample Output 3
Copy
M
by zhangshifan @ 2022-03-12 21:25:57
~~前排资瓷 前排资瓷~~
by declining @ 2022-03-13 10:32:29
jia you
by nimeibi @ 2022-03-14 10:09:27
后排
by Life_alone @ 2022-03-14 17:54:59
所以现在投日报 at 谁啊
by jijidawang @ 2022-03-15 18:00:44
投稿:[生成函数的数学基础和正确性证明](https://www.luogu.com.cn/blog/MoYuFang/sheng-cheng-han-shuo-di-shuo-xue-ji-chu)
by MoYuFang @ 2022-03-18 08:16:56
前排抢大鼻噶
by zhengxiaochen @ 2022-03-18 16:45:43