题号:NC207146
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld
题目描述
Given a multiset

and

operations.

is empty initailly, and operations are in three types, which are as follows:
1. insert an element

into

2. erase an element

from

3. given an integer

, determine whether you can choose two elements

in

that three segments of length

can make a nondegenerate triangle.
输入描述:
The first line contains an integer
)
, denoting the number of operations.
Following

lines each contains two integers
)
, denoting an operation
1. if

, insert an element

into

2. if

, erase an element

from

, it's guaranteed that there is at least one

in

currently
3. if

, determine whether you can choose two elements

in

that three segments of length

can make a triangle
输出描述:
For each query, print one line containing a string "Yes" if the answer is yes or "No" if the answer is no.
示例1
输入
复制
8
1 1
3 1
1 1
3 2
3 1
1 2
2 1
3 1