結果

問題 No.1987 Sandglass Inconvenience
ユーザー lloyzlloyz
提出日時 2022-06-24 22:26:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 489 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 82,556 KB
実行使用メモリ 76,784 KB
最終ジャッジ日時 2024-04-26 05:35:19
合計ジャッジ時間 3,837 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
66,828 KB
testcase_01 AC 117 ms
76,784 KB
testcase_02 WA -
testcase_03 AC 65 ms
73,980 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 113 ms
76,372 KB
testcase_07 AC 127 ms
76,364 KB
testcase_08 AC 124 ms
76,240 KB
testcase_09 AC 126 ms
76,224 KB
testcase_10 AC 122 ms
76,256 KB
testcase_11 AC 125 ms
76,260 KB
testcase_12 AC 122 ms
76,308 KB
testcase_13 AC 123 ms
76,332 KB
testcase_14 AC 128 ms
76,332 KB
testcase_15 AC 58 ms
65,968 KB
testcase_16 WA -
testcase_17 AC 125 ms
76,176 KB
testcase_18 WA -
testcase_19 AC 57 ms
67,224 KB
testcase_20 AC 38 ms
52,656 KB
testcase_21 AC 39 ms
52,264 KB
testcase_22 AC 57 ms
66,512 KB
testcase_23 AC 48 ms
61,964 KB
testcase_24 AC 123 ms
76,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import product

L = list(map(int, input().split()))
x = int(input())

for P in product(range(3), repeat=6):
    LL = []
    for i in range(6):
        LL.append(L[P[i]])
    for bit in range(3**6):
        Q = []
        bitc = bit
        for i in range(6):
            Q.append(bitc % 3 - 1)
            bitc //= 3
        res = 0
        for i in range(6):
            res += Q[i] * LL[i]
        if abs(res) == x:
            print("Yes")
            exit()
print("No")
0