結果
| 問題 |
No.1493 隣接xor
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-16 22:00:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 226 bytes |
| コンパイル時間 | 2,178 ms |
| コンパイル使用メモリ | 81,804 KB |
| 実行使用メモリ | 849,400 KB |
| 最終ジャッジ日時 | 2025-02-16 22:00:56 |
| 合計ジャッジ時間 | 8,394 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 WA * 1 RE * 3 MLE * 18 |
ソースコード
n = int(input())
A = list(map(int, input().split()))
B = []
x = 0
for a in A:
x ^= a
B.append(x)
B.pop()
tot = 1
cnt = {0: 1}
for b in B:
nex = tot
tot = nex + tot - cnt.get(b, 0)
cnt[b] = nex
print(tot)