No.1799 Summer Day
タグ : / 解いたユーザー数 239
作問者 :
penguinman
Problem Statement
A sequence $A$ is called a "summer day sequence" if the maximum value of $A$ is at least $25$. Similarly, $A$ is called a "midsummer day sequence" if the maximum value of $A$ is at least $30$.
Natsubi likes summer days but hates midsummer days (because they are too hot).
Given positive integers $N,S$, determine whether there exists a non-negative integer sequence $B=(B_1,B_2,\dots,B_N)$ of length $N$ with sum $S$ that is a "summer day sequence" but not a "midsummer day sequence".
Input
$N$ $S$
- All inputs are integers.
- $1 \leq N,S \leq 10^9$
Output
Print Yes if a sequence satisfying the conditions in the problem statement exists, and No otherwise, on $1$ line.
Print a newline at the end.
Sample
Sample 1
Input
2 54
Output
Yes
For example, $(27, 27)$ satisfies the conditions.
Sample 2
Input
1 10
Output
No
The only sequence of length $1$ with sum $10$ is $(10)$, but it does not satisfy the conditions in the problem statement.
Sample 3
Input
10 1000000000
Output
No
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。