結果
| 問題 |
No.184 たのしい排他的論理和(HARD)
|
| コンテスト | |
| ユーザー |
brthyyjp
|
| 提出日時 | 2021-03-16 04:43:20 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 150 ms / 5,000 ms |
| コード長 | 577 bytes |
| コンパイル時間 | 434 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 92,032 KB |
| 最終ジャッジ日時 | 2024-11-07 17:03:31 |
| 合計ジャッジ時間 | 6,059 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
n = int(input())
A = list(map(int, input().split()))
def Gauss(M):
rank = 0
for d in range(61):
pivot = -1
for i in range(rank, len(M)):
if M[i] & (1<<d):
pivot = i
break
if pivot == -1:
continue
M[rank], M[pivot] = M[pivot], M[rank]
for j in range(0, len(M)):
if j == rank:
continue
if not (M[j] & (1<<d)):
continue
M[j] ^= M[rank]
rank += 1
return rank
rank = Gauss(A)
print(pow(2, rank))
brthyyjp