結果
| 問題 | No.1987 Sandglass Inconvenience |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-24 21:57:18 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 646 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2026-09-21 09:06:54 |
| 合計ジャッジ時間 | 1,810 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 6 |
ソースコード
from itertools import permutations
L = list(map(int, input().split()))
x = int(input())
for P in permutations(range(3)):
LL = []
for i in range(3):
LL.append(L[P[i]])
for bit in range(3**3):
Q = []
bitc = bit
for i in range(3):
if bitc % 3 == 0:
Q.append(0)
elif bitc % 3 == 1:
Q.append(1)
else:
Q.append(-1)
bitc //= 3
res = 0
for i in range(3):
res += Q[i] * LL[i]
res = abs(res)
if abs(res) == x:
print("Yes")
exit()
print("No")