結果
| 問題 |
No.183 たのしい排他的論理和(EASY)
|
| コンテスト | |
| ユーザー |
roknao
|
| 提出日時 | 2020-06-11 01:17:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 586 bytes |
| コンパイル時間 | 199 ms |
| コンパイル使用メモリ | 82,208 KB |
| 実行使用メモリ | 89,188 KB |
| 最終ジャッジ日時 | 2024-06-23 21:48:40 |
| 合計ジャッジ時間 | 4,172 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 18 |
ソースコード
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")
MOD = 1000000007
# 処理内容
def main():
N = int(input())
A = list(map(int, input().split()))
num = 16384
dp = [[0] * num for _ in range(N+1)]
dp[0][0] = 1
for i in range(N):
for j in range(num):
if dp[i][j] == 1:
dp[i+1][j] = 1
dp[i+1][j ^ A[i]] = 1
print(sum(dp[N]))
if __name__ == '__main__':
main()
roknao