10 2 20 9 11 13 17
Yes The battery charge changes as follows: * Time $0$ (leaving home): $10$ mAh * Time $9$ (the beginning of the stay at the first cafe): $1$ mAh * Time $11$ (the end of the stay at the first cafe): $3$ mAh (He charges his phone in a cafe.) * Time $13$ (the beginning of the stay at the second cafe): $1$ mAh * Time $17$ (the end of the stay at the second cafe): $5$ mAh * Time $20$ (getting home): $2$ mAh During this process, the battery charge never drops to $0$, so we print `Yes`.
10 2 20 9 11 13 16
No This case is the same as Sample Input/Output 1 until he starts his stay at the second cafe with $1$ mAh charge. When he ends his stay there at time $16$, the battery charge is $4$ mAh. Then at time $19.5$, it drops to $0$, so we print `No`.
15 3 30 5 8 15 17 24 27
Yes The battery charge drops to $1$ mAh when he gets home, but it never drops to $0$ on the way.
20 1 30 20 29
No The battery charge drops to $0$ at time $19.5$.
20 1 30 1 10
No Note that when the battery charge is equal to the battery capacity, staying at a cafe does not increase the battery charge.
{
"problem": {
"name": "Smartphone Addiction",
"description": {
"content": "The battery of Takahashi's smartphone has $N$ mAh capacity. At time $0.5$, $1.5$, $2.5$, and so on (that is, at time $n + 0.5$ for every integer $n$), the battery charge decreases by $1$ mAh. Takaha",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc185_b"
},
"statements": [
{
"statement_type": "Markdown",
"content": "The battery of Takahashi's smartphone has $N$ mAh capacity. At time $0.5$, $1.5$, $2.5$, and so on (that is, at time $n + 0.5$ for every integer $n$), the battery charge decreases by $1$ mAh. \nTakaha...",
"is_translate": false,
"language": "English"
}
]
}