{"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":"MD","content":"构造一个由 $N$ 个节点组成的无向图,要求这个图是简单图(没有自环和重边),节点编号从 $1$ 到 $N$,要求存在这样的 $S$,每个节点所连接的节点编号之和正好等于 $S$。\n\n\u003cp\u003eYou are given an integer \u003cvar\u003e\\(N\\)\u003c/var\u003e. Build an undirected graph with \u003cvar\u003e\\(N\\)\u003c/var\u003e vertices with indices \u003cvar\u003e\\(1\\)\u003c/var\u003e to \u003cvar\u003e\\(N\\)\u003c/var\u003e that satisfies the following two conditions:\u003c/p\u003e\n \u003cul\u003e\n \u003cli\u003eThe graph is simple and connected.\u003c/li\u003e\n \u003cli\u003eThere exists an integer \u003cvar\u003e\\(S\\)\u003c/var\u003e such that, for every vertex, the sum of the indices of the vertices adjacent to that vertex is \u003cvar\u003e\\(S\\)\u003c/var\u003e.\u003c/li\u003e\n \u003c/ul\u003e\n \u003cp\u003eIt can be proved that at least one such graph exists under the constraints of this problem.\u003c/p\u003e"}},{"title":"Constraints","value":{"format":"MD","content":"\u003csection\u003e\n \u003cul\u003e\n \u003cli\u003eAll values in input are integers.\u003c/li\u003e\n \u003cli\u003e\u003cvar\u003e\\(3 \\leq N \\leq 100\\)\u003c/var\u003e\u003c/li\u003e\n \u003c/ul\u003e\n\u003c/section\u003e"}},{"title":"Input","value":{"format":"MD","content":"\u003csection\u003e\n \u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e\n \u003cpre\u003e\u003cvar\u003e\\(N\\)\u003c/var\u003e\n\u003c/pre\u003e\n\u003c/section\u003e"}},{"title":"Output","value":{"format":"MD","content":"\u003csection\u003e\n \u003cp\u003eIn the first line, print the number of edges, \u003cvar\u003e\\(M\\)\u003c/var\u003e, in the graph you made. In the \u003cvar\u003e\\(i\\)\u003c/var\u003e-th of the following \u003cvar\u003e\\(M\\)\u003c/var\u003e lines, print two integers \u003cvar\u003e\\(a_i\\)\u003c/var\u003e and \u003cvar\u003e\\(b_i\\)\u003c/var\u003e, representing the endpoints of the \u003cvar\u003e\\(i\\)\u003c/var\u003e-th edge.\u003c/p\u003e\n \u003cp\u003eThe output will be judged correct if the graph satisfies the conditions.\u003c/p\u003e\n\u003c/section\u003e"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n1 3\n2 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003csection\u003e\n\u003c/section\u003e\u003csection\u003e\n \u003cul\u003e\n \u003cli\u003eFor every vertex, the sum of the indices of the vertices adjacent to that vertex is \u003cvar\u003e\\(3\\)\u003c/var\u003e.\u003c/li\u003e\n \u003c/ul\u003e\n\u003c/section\u003e"}}]}