3 7 1 1 2 1 1 3 1 2 3 2 1 1 1 2 2 2 1 1 2
1 0 0 1 0 3 1 After the first query, vertex $1$ and vertex $2$ are connected to each other by an edge, but vertex $3$ is not connected to any other vertices. Thus, $1$ should be printed in the first line. After the third query, all pairs of different vertices are connected by an edge. However, the fourth query asks to remove all edges that connect vertex $1$ and the other vertices, specifically to remove the edge between vertex $1$ and vertex $2$, and another between vertex $1$ and vertex $3$. As a result, vertex $2$ and vertex $3$ are connected to each other, while vertex $1$ is not connected to any other vertices by an edge. Thus, $0$ and $1$ should be printed in the third and fourth lines, respectively.
2 1 2 1
2 When the query of the second kind is given, there may be no edge that connects that vertex and the other vertices.
{
"problem": {
"name": "Isolation",
"description": {
"content": "There is an undirected graph with $N$ vertices numbered $1$ through $N$, and initially with $0$ edges. Given $Q$ queries, process them in order. After processing each query, print the number of vert",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc302_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There is an undirected graph with $N$ vertices numbered $1$ through $N$, and initially with $0$ edges. \nGiven $Q$ queries, process them in order. After processing each query, print the number of vert...",
"is_translate": false,
"language": "English"
}
]
}