結果

問題 No.1538 引きこもりさんは引き算が得意。
ユーザー shakayamishakayami
提出日時 2021-11-11 21:01:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 385 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 87,192 KB
実行使用メモリ 649,888 KB
最終ジャッジ日時 2023-08-15 11:23:04
合計ジャッジ時間 7,703 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
75,808 KB
testcase_01 WA -
testcase_02 AC 74 ms
71,276 KB
testcase_03 AC 77 ms
71,252 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 75 ms
71,612 KB
testcase_09 AC 72 ms
71,376 KB
testcase_10 AC 78 ms
76,396 KB
testcase_11 AC 71 ms
71,532 KB
testcase_12 AC 73 ms
71,324 KB
testcase_13 AC 75 ms
71,328 KB
testcase_14 AC 90 ms
76,524 KB
testcase_15 AC 74 ms
71,416 KB
testcase_16 WA -
testcase_17 AC 74 ms
71,248 KB
testcase_18 AC 74 ms
71,368 KB
testcase_19 AC 73 ms
71,572 KB
testcase_20 AC 73 ms
71,256 KB
testcase_21 AC 72 ms
71,232 KB
testcase_22 AC 71 ms
71,216 KB
testcase_23 AC 73 ms
71,280 KB
testcase_24 AC 74 ms
71,280 KB
testcase_25 AC 73 ms
71,420 KB
testcase_26 AC 75 ms
71,552 KB
testcase_27 AC 75 ms
71,248 KB
testcase_28 AC 72 ms
71,556 KB
testcase_29 AC 74 ms
71,272 KB
testcase_30 AC 75 ms
71,416 KB
testcase_31 AC 73 ms
71,356 KB
testcase_32 AC 76 ms
71,376 KB
testcase_33 AC 76 ms
71,320 KB
testcase_34 AC 76 ms
71,120 KB
testcase_35 AC 73 ms
71,120 KB
testcase_36 AC 72 ms
71,336 KB
testcase_37 MLE -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=[int(i) for i in input().split()]
dp=[set() for i in range(1<<N)]
for i in range(N):
    dp[1<<i].add(abs(A[i]))
K=abs(K)
for S in range(1<<N):
    for i in range(N):
        if (S>>i)&1==0:
            for x in dp[S]:
                dp[S|(1<<i)].add(abs(x-A[i]))
for S in range(1<<N):
    if K in dp[S]:
        print("Yes")
        exit()
print("No")
0