結果
問題 | No.2672 Subset Xor Sum |
ユーザー | rlangevin |
提出日時 | 2024-03-15 21:51:15 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 468 bytes |
コンパイル時間 | 319 ms |
コンパイル使用メモリ | 81,700 KB |
実行使用メモリ | 848,900 KB |
最終ジャッジ日時 | 2024-03-15 21:51:24 |
合計ジャッジ時間 | 8,086 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 47 ms
59,704 KB |
testcase_01 | AC | 52 ms
59,704 KB |
testcase_02 | AC | 52 ms
61,852 KB |
testcase_03 | AC | 49 ms
61,852 KB |
testcase_04 | AC | 50 ms
61,844 KB |
testcase_05 | AC | 48 ms
61,844 KB |
testcase_06 | AC | 49 ms
61,844 KB |
testcase_07 | AC | 46 ms
61,844 KB |
testcase_08 | AC | 46 ms
61,844 KB |
testcase_09 | AC | 51 ms
61,844 KB |
testcase_10 | AC | 47 ms
61,844 KB |
testcase_11 | AC | 45 ms
61,844 KB |
testcase_12 | AC | 50 ms
61,844 KB |
testcase_13 | AC | 46 ms
61,844 KB |
testcase_14 | AC | 44 ms
61,844 KB |
testcase_15 | AC | 58 ms
61,844 KB |
testcase_16 | AC | 49 ms
61,844 KB |
testcase_17 | AC | 49 ms
61,844 KB |
testcase_18 | AC | 46 ms
61,844 KB |
testcase_19 | AC | 47 ms
61,844 KB |
testcase_20 | AC | 45 ms
61,844 KB |
testcase_21 | AC | 45 ms
61,844 KB |
testcase_22 | AC | 45 ms
61,844 KB |
testcase_23 | AC | 46 ms
61,852 KB |
testcase_24 | AC | 45 ms
61,852 KB |
testcase_25 | AC | 190 ms
118,464 KB |
testcase_26 | AC | 196 ms
118,464 KB |
testcase_27 | AC | 48 ms
61,844 KB |
testcase_28 | AC | 46 ms
61,844 KB |
testcase_29 | AC | 49 ms
61,844 KB |
testcase_30 | AC | 135 ms
131,892 KB |
testcase_31 | AC | 80 ms
96,352 KB |
testcase_32 | AC | 72 ms
90,900 KB |
testcase_33 | AC | 115 ms
111,140 KB |
testcase_34 | AC | 138 ms
131,904 KB |
testcase_35 | AC | 129 ms
116,200 KB |
testcase_36 | AC | 130 ms
124,936 KB |
testcase_37 | AC | 83 ms
102,172 KB |
testcase_38 | AC | 175 ms
142,024 KB |
testcase_39 | AC | 58 ms
76,288 KB |
testcase_40 | AC | 94 ms
116,584 KB |
testcase_41 | AC | 130 ms
124,940 KB |
testcase_42 | AC | 119 ms
110,836 KB |
testcase_43 | AC | 152 ms
141,884 KB |
testcase_44 | AC | 117 ms
110,836 KB |
testcase_45 | AC | 42 ms
59,960 KB |
testcase_46 | MLE | - |
testcase_47 | -- | - |
testcase_48 | -- | - |
testcase_49 | -- | - |
testcase_50 | -- | - |
testcase_51 | -- | - |
testcase_52 | -- | - |
testcase_53 | -- | - |
testcase_54 | -- | - |
testcase_55 | -- | - |
testcase_56 | -- | - |
testcase_57 | -- | - |
testcase_58 | -- | - |
testcase_59 | -- | - |
testcase_60 | -- | - |
testcase_61 | -- | - |
testcase_62 | -- | - |
testcase_63 | -- | - |
testcase_64 | -- | - |
testcase_65 | -- | - |
testcase_66 | -- | - |
ソースコード
N = int(input()) A = list(map(int, input().split())) ans = 0 for a in A: ans ^= a if ans: print("No") exit() if N >= 5000: print("Yes") exit() M = 8192 dp = [[0] * M for _ in range(N + 1)] dp[0][0] = 1 for i in range(N): for v in range(M): dp[i + 1][v] += dp[i][v] dp[i + 1][v^A[i]] += dp[i][v] for v in range(N + 1): dp[i + 1][v] = min(dp[i + 1][v], 3) print("Yes") if dp[-1][0] > 2 else print("No")