{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"PLAIN","content":"Cho N đảo và M cầu. Cầu i nối 2 đảo A_i B_i 2 chiều.\n\nĐộ bất tiện là số cặp đảo a, b (với a \u003c b) mà chúng không kết nối với nhau.\n\nHỏi với mỗi i từ 1 đến M, hãy in ra độ bất tiện nếu i cây cầu đầu tiên sập.\n\nHint: DSU"}},{"title":"Constraints","value":{"format":"PLAIN","content":"2 \u003c\u003d N \u003c\u003d 100000\nM \u003c\u003d 100000\n"}},{"title":"Input","value":{"format":"PLAIN","content":"N M\nA_1 B_1\n...\nA_M B_M"}},{"title":"Output","value":{"format":"PLAIN","content":"Mỗi dòng in ra 1 số"}},{"title":"Sample Input 1","value":{"format":"PLAIN","content":"4 5\n1 2\n3 4\n1 3\n2 3\n1 4"}},{"title":"Sample Output 1","value":{"format":"PLAIN","content":"0\n0\n4\n5\n6"}},{"title":"Sample Input 2","value":{"format":"PLAIN","content":"6 5\n2 3\n1 2\n5 6\n3 4\n4 5"}},{"title":"Sample Output 2","value":{"format":"PLAIN","content":"8\n9\n12\n14\n15"}},{"title":"Sample Input 3","value":{"format":"PLAIN","content":"2 1\n1 2"}},{"title":"Sample Output 3","value":{"format":"PLAIN","content":"1"}}]}