結果

問題 No.2061 XOR Sort
ユーザー chineristACchineristAC
提出日時 2022-08-26 23:23:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 676 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 82,300 KB
実行使用メモリ 123,984 KB
最終ジャッジ日時 2024-04-22 01:32:00
合計ジャッジ時間 11,715 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
56,064 KB
testcase_01 AC 40 ms
55,840 KB
testcase_02 AC 40 ms
56,064 KB
testcase_03 AC 46 ms
62,848 KB
testcase_04 AC 40 ms
55,936 KB
testcase_05 AC 46 ms
62,592 KB
testcase_06 AC 47 ms
62,720 KB
testcase_07 AC 45 ms
61,696 KB
testcase_08 AC 44 ms
56,320 KB
testcase_09 AC 51 ms
62,336 KB
testcase_10 AC 43 ms
56,192 KB
testcase_11 AC 43 ms
56,064 KB
testcase_12 AC 49 ms
62,848 KB
testcase_13 AC 42 ms
55,936 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 169 ms
78,932 KB
testcase_21 AC 290 ms
85,848 KB
testcase_22 WA -
testcase_23 AC 83 ms
77,644 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 169 ms
116,156 KB
testcase_30 AC 42 ms
56,320 KB
testcase_31 AC 79 ms
78,488 KB
testcase_32 AC 44 ms
55,808 KB
testcase_33 AC 40 ms
56,192 KB
testcase_34 AC 44 ms
56,320 KB
testcase_35 AC 41 ms
56,576 KB
testcase_36 AC 41 ms
56,448 KB
testcase_37 AC 41 ms
56,832 KB
testcase_38 AC 41 ms
56,832 KB
testcase_39 AC 42 ms
56,832 KB
testcase_40 AC 40 ms
56,576 KB
testcase_41 AC 41 ms
56,576 KB
testcase_42 AC 42 ms
56,448 KB
testcase_43 AC 43 ms
56,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random,bisect
from collections import deque,defaultdict,Counter
from heapq import heapify,heappop,heappush
from itertools import cycle, permutations
from math import log,gcd

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

N = int(input())
A = li()

res = 1
check = [0] * 30

def calc(_A,n):
    if n==-1:
        return 
    X = [a for a in _A if a>>n & 1]
    Y = [a for a in _A if a>>n & 1 == 0]
    if X and Y:
        check[n] = 1
    if n!=0:
        if X:
            calc(X,n-1)
        if Y:
            calc(Y,n-1)

calc(A,29)

for i in range(30):
    if check[i]:
        res *= 2


print(res)
0