結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー tonnnura172tonnnura172
提出日時 2020-05-05 16:15:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 906 bytes
コンパイル時間 493 ms
コンパイル使用メモリ 86,880 KB
実行使用メモリ 82,016 KB
最終ジャッジ日時 2023-09-09 03:21:40
合計ジャッジ時間 8,804 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 167 ms
80,552 KB
testcase_01 AC 163 ms
80,476 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 162 ms
81,268 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 663 ms
81,820 KB
testcase_08 AC 664 ms
81,872 KB
testcase_09 AC 508 ms
81,896 KB
testcase_10 AC 576 ms
81,956 KB
testcase_11 AC 708 ms
81,952 KB
testcase_12 AC 169 ms
81,360 KB
testcase_13 AC 166 ms
80,652 KB
testcase_14 AC 169 ms
81,688 KB
testcase_15 AC 725 ms
82,016 KB
testcase_16 WA -
testcase_17 AC 291 ms
81,816 KB
testcase_18 AC 653 ms
81,960 KB
testcase_19 AC 234 ms
81,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd, log
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul, add
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce, lru_cache
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()
A_max = max(A)
dp = [0]*(1<<14+1)
dp[0] = 1
for a in A:
	for i in range(A_max, -1, -1):
		if dp[i]:
			dp[i^a] = 1

print(sum(dp))
0