結果
| 問題 | No.2195 AND Set |
| コンテスト | |
| ユーザー |
ニックネーム
|
| 提出日時 | 2023-01-20 21:46:53 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 506 bytes |
| 記録 | |
| コンパイル時間 | 599 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 23,336 KB |
| 最終ジャッジ日時 | 2026-03-08 03:06:58 |
| 合計ジャッジ時間 | 25,471 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 TLE * 5 |
ソースコード
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)
ニックネーム