結果
問題 |
No.2195 AND Set
|
ユーザー |
|
提出日時 | 2024-03-14 21:57:54 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 412 bytes |
コンパイル時間 | 551 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 264,576 KB |
最終ジャッジ日時 | 2024-09-29 23:49:37 |
合計ジャッジ時間 | 8,540 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | TLE * 2 -- * 11 |
ソースコード
Q = int(input().strip()) S = set() for _ in range(Q): query = list(map(int, input().strip().split())) if query[0] == 1: S.add(query[1]) elif query[0] == 2: S.discard(query[1]) elif query[0] == 3: if len(S) == 0: print(-1) else: result = list(S)[0] for num in list(S)[1:]: result &= num print(result)