結果
| 問題 |
No.3023 Utility is Max?
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2024-11-30 18:15:27 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 418 bytes |
| コンパイル時間 | 275 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 76,672 KB |
| 最終ジャッジ日時 | 2024-12-02 01:13:34 |
| 合計ジャッジ時間 | 10,084 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 WA * 2 |
ソースコード
def main():
q = int(input())
for _ in range(q):
solve()
def solve():
k = int(input())
a1, b1, x1, y1 = map(int, input().split())
a2, b2, x2, y2 = map(int, input().split())
if a1*x1+b1*y1 != k or a2*x2+b2*y2 != k:
print("No")
return
if a1*x2+b1*y2 < k and a2*x1+b2*y1 < k:
print("No")
return
print("Yes")
if __name__ == "__main__":
main()