結果

問題 No.1876 Xor of Sum
ユーザー brthyyjp
提出日時 2022-03-19 15:09:35
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 209 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 82,384 KB
実行使用メモリ 83,480 KB
最終ジャッジ日時 2024-10-04 15:47:19
合計ジャッジ時間 4,013 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other TLE * 1 -- * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
N = 4*10**6+50
dp = 1
limit = (1<<N)-1
for a in A:
    dp ^= dp<<a
    dp &= limit
ans = 0
for i in range(N):
    if (dp>>i)&1:
        ans ^= i
print(ans)
0