(self)
| 151 | self._lazy_tag = True # 延迟操作标志 |
| 152 | |
| 153 | def pop(self) -> Tuple[int, Operation]: |
| 154 | if not self._lazy_tag: |
| 155 | self._data = sorted(self._data, key=lambda x: x[0]) |
| 156 | self._lazy_tag = True |
| 157 | if self._idx >= len(self._data): raise IndexError('Index out of range!') |
| 158 | ele = self._data[self._idx] |
| 159 | self._idx += 1 |
| 160 | return ele |
| 161 | |
| 162 | def push(self, depth: int, op: Operation): |
| 163 | if op in self._ops: return |
no outgoing calls
no test coverage detected