結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー yassu0320
提出日時 2021-07-11 12:43:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 3,086 ms / 5,000 ms
コード長 883 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 194,048 KB
最終ジャッジ日時 2024-07-02 03:03:04
合計ジャッジ時間 16,392 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3

from sys import setrecursionlimit, stdin
from typing import Dict, Iterable, Set

INF: int = 2**62
MOD: int = 10**9 + 7

setrecursionlimit(10**6)


def inputs(type_=int):
    ins = input().split(' ')
    ins = [x for x in ins if x != '']

    if isinstance(type_, Iterable):
        return [t(x) for t, x in zip(type_, ins)]
    else:
        return list(map(type_, ins))


def input_(type_=int):
    a, = inputs(type_)
    return a


inputi = input_


def inputstr():
    return input_(str)


# b/aの切り上げ
def ceil(b, a):
    return (a + b - 1) // a


def answer(res) -> None:
    print(res)
    exit()


def compute():
    return


def main():
    n = inputi()
    xs = inputs()

    s = set([0])
    for i in range(n):
        for x in s.copy():
            s.add(x ^ xs[i])

    # print(s)
    print(len(s))


if __name__ == '__main__':
    main()
0