結果
問題 | No.868 ハイパー部分和問題 |
ユーザー | mousemood |
提出日時 | 2019-09-16 22:37:43 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 391 bytes |
コンパイル時間 | 145 ms |
コンパイル使用メモリ | 10,664 KB |
実行使用メモリ | 140,924 KB |
最終ジャッジ日時 | 2023-09-21 08:09:18 |
合計ジャッジ時間 | 11,147 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 78 ms
9,836 KB |
testcase_01 | AC | 81 ms
9,848 KB |
testcase_02 | AC | 611 ms
17,096 KB |
testcase_03 | AC | 25 ms
8,632 KB |
testcase_04 | AC | 18 ms
7,796 KB |
testcase_05 | AC | 17 ms
7,792 KB |
testcase_06 | AC | 17 ms
7,764 KB |
testcase_07 | AC | 17 ms
7,776 KB |
testcase_08 | AC | 17 ms
7,712 KB |
testcase_09 | AC | 17 ms
7,772 KB |
testcase_10 | AC | 17 ms
7,772 KB |
testcase_11 | AC | 18 ms
7,764 KB |
testcase_12 | AC | 17 ms
7,788 KB |
testcase_13 | AC | 17 ms
7,804 KB |
testcase_14 | TLE | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
ソースコード
n, k = map(int, input().split()) a = list(map(int, input().split())) q = int(input()) def func(array, key): l = list() for num in array: tmp = l.copy() for val in tmp: l += [num + val] l += [num] l = list(set(l)) return int(key in l) for i in range(q): x, v = map(int, input().split()) a[x - 1] = v print(func(a, k))