結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー yassu0320yassu0320
提出日時 2021-07-11 12:37:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 883 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,928 KB
実行使用メモリ 20,512 KB
最終ジャッジ日時 2023-09-14 20:08:58
合計ジャッジ時間 7,127 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
9,788 KB
testcase_01 AC 33 ms
9,892 KB
testcase_02 AC 32 ms
11,036 KB
testcase_03 AC 32 ms
9,880 KB
testcase_04 AC 31 ms
9,904 KB
testcase_05 AC 34 ms
11,144 KB
testcase_06 AC 30 ms
9,912 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

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