結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー takakintakakin
提出日時 2020-04-18 15:45:42
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 249 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 83,272 KB
最終ジャッジ日時 2024-04-14 20:56:53
合計ジャッジ時間 4,512 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
61,024 KB
testcase_01 AC 46 ms
60,516 KB
testcase_02 AC 46 ms
61,924 KB
testcase_03 AC 46 ms
61,628 KB
testcase_04 AC 44 ms
61,304 KB
testcase_05 AC 46 ms
62,316 KB
testcase_06 AC 45 ms
61,692 KB
testcase_07 RE -
testcase_08 AC 391 ms
82,476 KB
testcase_09 AC 283 ms
80,856 KB
testcase_10 AC 328 ms
80,892 KB
testcase_11 AC 416 ms
82,712 KB
testcase_12 RE -
testcase_13 AC 42 ms
59,596 KB
testcase_14 AC 431 ms
83,272 KB
testcase_15 AC 430 ms
83,152 KB
testcase_16 AC 45 ms
61,300 KB
testcase_17 AC 138 ms
77,436 KB
testcase_18 RE -
testcase_19 AC 103 ms
76,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
A=[int(i) for i in input().split()]
m=2**14
DP1=[0]*m
DP1[0]=1
for i in range(n):
  DP2=[0]*m
  for j in range(m):    
    DP2[j]=max(DP1[j],DP1[j^A[i]])
  DP1=DP2
print(sum(DP1))
0