結果
問題 | No.184 たのしい排他的論理和(HARD) |
ユーザー |
![]() |
提出日時 | 2025-01-23 19:54:56 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 659 ms / 5,000 ms |
コード長 | 314 bytes |
コンパイル時間 | 376 ms |
コンパイル使用メモリ | 82,592 KB |
実行使用メモリ | 260,456 KB |
最終ジャッジ日時 | 2025-01-23 19:55:11 |
合計ジャッジ時間 | 13,970 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 |
ソースコード
N = int(input())A = list(map(int,input().split()))cnt = 0for i in reversed(range(61)):B = []tp = 1 << iA = sorted(list(set(A)))if A and (A[-1] >= tp):cnt += 1a = A.pop()while A and (A[-1] >= tp):x = A.pop() ^ aB.append(x)A += Bprint(pow(2,cnt))