結果
問題 | No.3023 Utility is Max? |
ユーザー |
👑 |
提出日時 | 2025-02-14 23:39:05 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 465 bytes |
コンパイル時間 | 239 ms |
コンパイル使用メモリ | 82,172 KB |
実行使用メモリ | 77,308 KB |
最終ジャッジ日時 | 2025-02-14 23:40:32 |
合計ジャッジ時間 | 9,880 ms |
ジャッジサーバーID (参考情報) |
judge7 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 WA * 16 |
ソースコード
def solve():I = int(input())a1, b1, x1, y1 = map(int, input().split())a2, b2, x2, y2 = map(int, input().split())if a1 * x1 + b1 * y1 != I:print("No")elif a2 * x2 + b2 * y2 != I:print("No")elif x1 == x2 and y1 == y2:print("Yes")elif a1 * x2 + b1 * y2 < I:print("No")elif a2 * x1 + b2 * y1 < I:print("No")else:print("Yes")for _ in range(int(input())):solve()