結果

問題 No.2061 XOR Sort
ユーザー taiga0629kyopro
提出日時 2022-08-12 08:53:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 82,332 KB
実行使用メモリ 102,224 KB
最終ジャッジ日時 2024-09-22 13:11:19
合計ジャッジ時間 4,479 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #



mod=998244353
def fake1(A):
    a=A[:]
    n=len(a)
    a.sort()
    ans=1
    for j in range(32,-1,-1):
        cnt=[0,0]
        for i in range(n):cnt[(a[i]>>j)&1]+=1
        if min(cnt)>=1:ans*=2
    return ans%mod


n=int(input())
a=list(map(int,input().split()))
print(fake1(a))
0