|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|1 초||1024 MB||7||5||4||66.667%|
Tennis is a racket sport that is played by two opposing players on S sets. Each set consists of at least K games. A set is won by a player if that player wins at least K games and at least 2 games more than the opponent. Once a set is won, the set is ended and the match continues to a new set (if any) where both players start from 0 game won for that new set.
For example, let K = 6, then a set can be ended with any of the following.
On the other hand, a set cannot be ended with any of the following.
You are given K, S and N, determine whether there could be such a tennis match with S sets to ends exactly with N games. If there is such a tennis match, then output “YES” (without quotes) in a single line, otherwise, output “NO” (without quotes) in a single line.
For example, let K = 4, S = 2, and N = 14. It is possible to have such a tennis match. One the possibilities is as follows.
There are a total of N = 6 + 4 + 4 + 0 = 14 games on S = 2 sets where each set is won if a player won at least K = 4 games and at least 2 games more than the opponent.
Input contains three integers K S N (2 ≤ K ≤ 109; 1 ≤ S, N ≤ 109) in a line representing the minimum number of games to win a set, the total number of sets, and the total number of games, respectively.
Output in a line a string “YES” or “NO” (without quotes) whether it is possible to have such a tennis match.
4 2 14
3 1 2
To win a set, a player should win at least 3 games. In this case, the match cannot be ended with exactly 2 games.
6 5 181
One example match is as follows.
ICPC > Regionals > Asia Pacific > Indonesia > Indonesia National Contest > INC 2021 M번