結果
| 問題 | No.3023 Utility is Max? |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2024-11-30 18:15:27 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 418 bytes |
| 記録 | |
| コンパイル時間 | 242 ms |
| コンパイル使用メモリ | 85,292 KB |
| 実行使用メモリ | 81,788 KB |
| 最終ジャッジ日時 | 2026-05-24 14:51:35 |
| 合計ジャッジ時間 | 11,083 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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()