結果
問題 |
No.2195 AND Set
|
ユーザー |
![]() |
提出日時 | 2023-01-20 21:46:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 506 bytes |
コンパイル時間 | 538 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 24,768 KB |
最終ジャッジ日時 | 2024-06-23 09:43:50 |
合計ジャッジ時間 | 24,461 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | TLE * 9 -- * 4 |
ソースコード
a = [[0,0] for _ in range(30)]; s = set() for _ in range(int(input())): q = list(map(int,input().split())) if q[0]==1: x = q[1] if x in s: continue for i in range(30): a[i][x>>i&1] += 1 s.add(x) if q[0]==2: x = q[1] if x not in s: continue for i in range(30): a[i][x>>i&1] -= 1 s.remove(x) if q[0]==3: ans = 0 for i,(p,q) in enumerate(a): if not p and q: ans |= 1<<i print(ans if s else -1)