結果
問題 | No.183 たのしい排他的論理和(EASY) |
ユーザー | alexara1123 |
提出日時 | 2019-07-10 15:53:04 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 313 bytes |
コンパイル時間 | 134 ms |
コンパイル使用メモリ | 82,540 KB |
実行使用メモリ | 848,684 KB |
最終ジャッジ日時 | 2024-04-23 15:05:18 |
合計ジャッジ時間 | 2,302 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 44 ms
60,456 KB |
testcase_01 | AC | 47 ms
63,128 KB |
testcase_02 | AC | 49 ms
64,868 KB |
testcase_03 | AC | 49 ms
63,724 KB |
testcase_04 | AC | 43 ms
61,788 KB |
testcase_05 | AC | 48 ms
63,956 KB |
testcase_06 | AC | 44 ms
63,080 KB |
testcase_07 | MLE | - |
testcase_08 | -- | - |
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(map(int,input().split())) dp = [ [0]*(2**15+1) for i in range(N+1) ] dp[0][0] = 1 for i in range(N): for j in range(2**15+1): if dp[i][j] == 1: dp[i+1][j^A[i]] = 1 dp[i+1][j] |= dp[i][j] ans = 1 for i in range(1,2**15+1): ans += dp[N][i] print(ans)