Problem

Source: Baltic way 2009

Tags: algorithm, combinatorics proposed, combinatorics



Let $n>2$ be an integer. In a country there are $n$ cities and every two of them are connected by a direct road. Each road is assigned an integer from the set $\{1, 2,\ldots ,m\}$ (different roads may be assigned the same number). The priority of a city is the sum of the numbers assigned to roads which lead to it. Find the smallest $m$ for which it is possible that all cities have a different priority.