{"problem":{"name":"Blackout 2","description":{"content":"A country has $N$ cities and $M$ power plants, which we collectively call places.   The places are numbered $1,2,\\dots,N+M$, among which Places $1,2,\\dots,N$ are the cities and Places $N+1,N+2,\\dots,N","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc264_e"},"statements":[{"statement_type":"Markdown","content":"A country has $N$ cities and $M$ power plants, which we collectively call places.  \nThe places are numbered $1,2,\\dots,N+M$, among which Places $1,2,\\dots,N$ are the cities and Places $N+1,N+2,\\dots,N+M$ are the power plants.\nThis country has $E$ power lines. Power Line $i$ ($1 \\le i \\le E$) connects Place $U_i$ and Place $V_i$ bidirectionally.  \nA city is said to be **electrified** if one can reach at least one of the power plants from the city using some power lines.\nNow, $Q$ events will happen. In the $i$\\-th ($1 \\le i \\le Q$) event, Power Line $X_i$ breaks, making it unusable. Once a power line breaks, it remains broken in the succeeding events.\nFind the number of electrified cities right after each events.\n\n## Constraints\n\n*   All values in input are integers.\n*   $1 \\le N,M$\n*   $N+M \\le 2 \\times 10^5$\n*   $1 \\le Q \\le E \\le 5 \\times 10^5$\n*   $1 \\le U_i < V_i \\le N+M$\n*   If $i \\neq j$, then $U_i \\neq U_j$ or $V_i \\neq V_j$.\n*   $1 \\le X_i \\le E$\n*   $X_i$ are distinct.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $M$ $E$\n$U_1$ $V_1$\n$U_2$ $V_2$\n$\\vdots$\n$U_E$ $V_E$\n$Q$\n$X_1$\n$X_2$\n$\\vdots$\n$X_Q$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc264_e","tags":[],"sample_group":[["5 5 10\n2 3\n4 10\n5 10\n6 9\n2 9\n4 8\n1 7\n3 6\n8 10\n1 8\n6\n3\n5\n8\n10\n2\n7","4\n4\n2\n2\n2\n1\n\nInitially, all cities are electrified.\n\n*   The $1$\\-st event breaks Power Line $3$ that connects Point $5$ and Point $10$.\n    *   Now City $5$ is no longer electrified, while $4$ cities remain electrified.\n*   The $2$\\-nd event breaks Power Line $5$ that connects Point $2$ and Point $9$.\n*   The $3$\\-rd event breaks Power Line $8$ that connects Point $3$ and Point $6$.\n    *   Now Cities $2$ and $3$ are no longer electrified, while $2$ cities remain electrified.\n*   The $4$\\-th event breaks Power Line $10$ that connects Point $1$ and Point $8$.\n*   The $5$\\-th event breaks Power Line $2$ that connects Point $4$ and Point $10$.\n*   The $6$\\-th event breaks Power Line $7$ that connects Point $1$ and Point $7$.\n    *   Now City $1$ is no longer electrified, while $1$ city remains electrified."]],"created_at":"2026-03-03 11:01:14"}}