結果
問題 | No.183 たのしい排他的論理和(EASY) |
ユーザー |
![]() |
提出日時 | 2018-12-15 02:07:41 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 302 bytes |
コンパイル時間 | 76 ms |
コンパイル使用メモリ | 11,900 KB |
実行使用メモリ | 534,648 KB |
最終ジャッジ日時 | 2023-10-25 10:41:10 |
合計ジャッジ時間 | 8,520 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | MLE | - |
testcase_01 | AC | 33 ms
10,468 KB |
testcase_02 | AC | 56 ms
11,788 KB |
testcase_03 | AC | 50 ms
11,524 KB |
testcase_04 | AC | 36 ms
10,728 KB |
testcase_05 | AC | 61 ms
12,048 KB |
testcase_06 | AC | 44 ms
10,996 KB |
testcase_07 | MLE | - |
testcase_08 | MLE | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
n = int(input()) a = list(set(map(int, input().split()))) n = len(a) # ver2 DP dp = [[False]*(2**14+1) for i in range(n+1)] dp[0][0] = True for i in range(n): for k in range(2**14+1): if dp[i][k]: dp[i+1][k^a[i]] = True dp[i+1][k] = True print(sum(dp[-1]))