結果
問題 | No.183 たのしい排他的論理和(EASY) |
ユーザー | tonnnura172 |
提出日時 | 2020-05-05 16:16:23 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 905 bytes |
コンパイル時間 | 278 ms |
コンパイル使用メモリ | 87,220 KB |
実行使用メモリ | 83,088 KB |
最終ジャッジ日時 | 2023-09-09 03:22:31 |
合計ジャッジ時間 | 7,739 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 166 ms
81,004 KB |
testcase_01 | AC | 165 ms
81,016 KB |
testcase_02 | AC | 168 ms
81,056 KB |
testcase_03 | AC | 166 ms
80,860 KB |
testcase_04 | AC | 166 ms
81,004 KB |
testcase_05 | AC | 166 ms
80,952 KB |
testcase_06 | AC | 165 ms
80,864 KB |
testcase_07 | RE | - |
testcase_08 | AC | 637 ms
81,612 KB |
testcase_09 | AC | 492 ms
81,748 KB |
testcase_10 | AC | 552 ms
81,680 KB |
testcase_11 | AC | 678 ms
81,676 KB |
testcase_12 | RE | - |
testcase_13 | AC | 165 ms
80,832 KB |
testcase_14 | AC | 422 ms
81,672 KB |
testcase_15 | AC | 698 ms
81,428 KB |
testcase_16 | AC | 169 ms
81,068 KB |
testcase_17 | AC | 286 ms
81,584 KB |
testcase_18 | RE | - |
testcase_19 | AC | 234 ms
81,520 KB |
ソースコード
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 = 1<<14 dp = [0]*(A_max+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))