SP10931 ONBRIDGE - Online Bridge Searching

Description

[English](/problems/ONBRIDGE/en/) [Vietnamese](/problems/ONBRIDGE/vn/)Given a graph of N vertices, numbered from 0 to N - 1. Initially, there is no edge in the graph. Sequencially adding M undirected edges (u, v) to the graph (0

Input Format

The first line contains an integer T (T

Output Format

After each request, print out the current number of bridges in the graph on a separate line.