{"problem":{"name":"Diverta City","description":{"content":"Diverta City is a new city consisting of $N$ towns numbered $1, 2, ..., N$. The mayor Ringo is planning to connect every pair of two different towns with a bidirectional road. The length of each road ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"diverta2019_2_f"},"statements":[{"statement_type":"Markdown","content":"Diverta City is a new city consisting of $N$ towns numbered $1, 2, ..., N$.\nThe mayor Ringo is planning to connect every pair of two different towns with a bidirectional road. The length of each road is undecided.\nA _Hamiltonian path_ is a path that starts at one of the towns and visits each of the other towns exactly once. The reversal of a Hamiltonian path is considered the same as the original Hamiltonian path.\nThere are $N! / 2$ Hamiltonian paths. Ringo wants all these paths to have distinct total lengths (the sum of the lengths of the roads on a path), to make the city diverse.\nFind one such set of the lengths of the roads, under the following conditions:\n\n*   The length of each road must be a positive integer.\n*   The maximum total length of a Hamiltonian path must be at most $10^{11}$.\n\n## Constraints\n\n*   $N$ is a integer between $2$ and $10$ (inclusive).\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"diverta2019_2_f","tags":[],"sample_group":[["3","0 6 15\n6 0 21\n15 21 0\n\nThere are three Hamiltonian paths. The total lengths of these paths are as follows:\n\n*   $1 → 2 → 3$: The total length is $6 + 21 = 27$.\n*   $1 → 3 → 2$: The total length is $15 + 21 = 36$.\n*   $2 → 1 → 3$: The total length is $6 + 15 = 21$.\n\nThey are distinct, so the objective is met."],["4","0 111 157 193\n111 0 224 239\n157 224 0 258\n193 239 258 0\n\nThere are $12$ Hamiltonian paths, with distinct total lengths."]],"created_at":"2026-03-03 11:01:14"}}