結果
問題 | No.183 たのしい排他的論理和(EASY) |
ユーザー |
![]() |
提出日時 | 2023-12-28 12:44:21 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 391 bytes |
コンパイル時間 | 356 ms |
コンパイル使用メモリ | 82,592 KB |
実行使用メモリ | 126,000 KB |
最終ジャッジ日時 | 2024-09-27 15:43:20 |
合計ジャッジ時間 | 8,033 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 3 TLE * 1 -- * 14 |
ソースコード
from copy import copyN = int(input())A = set(map(int,input().split()))Q = copy(A)print(A,Q)while Q:Q2 = set()while Q:x = next(iter(Q))Q.remove(x)for a in A:y = a ^ xif y not in A:if y not in Q:if y not in Q2:Q2.add(y)A |= Q2Q2,Q = Q,Q2print(len(A))