問題一覧 > 通常問題

No.3511 Skg

レベル : / AI推定難易度 : 75 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 96
作問者 : yu23578 / テスター : aa36 Yoyoyo8128 imabc GaLLium Germanium32 yt142857
お気に入りにしたユーザー ProblemId : 12696 / 自分の提出
問題文最終更新日: 2026-04-24 21:44:56
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 497 聖光学院プログラミングコンテスト2026 day1 (順位表) の他の問題:

Problem Statement

Seiko Gakuin has $A$ chairs and $B$ desks.
The weight per $1$ chair is $C\ \mathrm{kg}$, and the weight per $1$ desk is $D\ \mathrm{kg}$.

Sei-kun is confident in his arm strength, so he can hold anything as long as the total weight is at most $S\ \mathrm{kg}$.
Determine whether Sei-kun can hold all the desks and chairs at Seiko Gakuin at the same time.

Constraints

・$1 \le A \le 100$
・$1 \le B \le 100$
・$1 \le C \le 100$
・$1 \le D \le 100$
・$1 \le S \le 20000$
・All input values are integers.

Input

The input is given from standard input in the following format.

$A\ \ B\ \ C\ \ D\ \ S$

Output

Print Yes if Sei-kun can hold all the desks and chairs at the same time, and No otherwise. Print a newline at the end.

Sample

Sample 1
Input
1 2 3 4 12
Output
Yes

The total weight of the chairs is $1 \times 3 = 3(\mathrm{kg})$.

The total weight of the desks is $2 \times 4 = 8(\mathrm{kg})$.

Sei-kun can hold up to $12\mathrm{kg}$, so since $3 + 8 \le 12$, he can hold all the desks and chairs at the same time.

Therefore, the answer is Yes.

Sample 2
Input
1 1 1 1 1
Output
No

Since $1 \times 1 + 1 \times 1 > 1$, Sei-kun cannot hold all the desks and chairs at the same time. Therefore, print No.

Sample 3
Input
100 100 100 100 20000
Output
Yes

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。