結果
| 問題 |
No.1876 Xor of Sum
|
| ユーザー |
|
| 提出日時 | 2022-03-13 21:24:20 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 207 bytes |
| コンパイル時間 | 363 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 81,280 KB |
| 最終ジャッジ日時 | 2024-09-19 05:02:40 |
| 合計ジャッジ時間 | 4,154 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 26 |
ソースコード
N = int(input())
A = list(map(int,input().split()))
dp = 1 << A[0]
dp |= 1
for i in range(1,N):
dp = (dp << A[i]) ^ dp
ans = 0
for i in range(1,sum(A)+1):
if dp >> i & 1:
ans ^= i
print(ans)