{"problem":{"name":"Balanced Neighbors 2","description":{"content":"You are given an integer $N$. Determine whether there exists a simple connected undirected graph with $N$ vertices numbered $1$ to $N$ that satisfies the following condition, and if it exists, show on","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc207_b"},"statements":[{"statement_type":"Markdown","content":"You are given an integer $N$. Determine whether there exists a simple connected undirected graph with $N$ vertices numbered $1$ to $N$ that satisfies the following condition, and if it exists, show one such graph.\n\n*   There exists an integer $X$ such that for any vertex $v$, the sum of the numbers of all vertices other than $v$ that can be reached from $v$ by traversing an edge once or twice is $X$.\n\n## Constraints\n\n*   $2 \\le N \\le 200$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc207_b","tags":[],"sample_group":[["12","24\n1 2\n2 3\n3 1\n1 4\n4 5\n5 1\n2 6\n6 8\n8 2\n3 7\n7 9\n9 3\n4 6\n6 10\n10 4\n5 7\n7 11\n11 5\n8 9\n9 12\n12 8\n10 11\n11 12\n12 10"],["2","\\-1\n\nIf there does not exist a graph satisfying the condition, print `-1`."]],"created_at":"2026-03-03 11:01:14"}}