Problem A
Anime Shops
Languages
en
is
There are
If you live in a city, you of course know the local anime shop, well, if there is one. You would like to find the nearest anime shop that is not in your city.
For each city determine the minimum distance to another city that has an anime shop.
Input
The first line has three integers
Output
Print
Scoring
Group |
Points |
Constraints |
1 |
23 |
|
2 |
16 |
|
2 |
61 |
|
Sample Input 1 | Sample Output 1 |
---|---|
9 6 4 2 4 5 7 1 2 1 3 1 8 2 4 3 4 5 6 |
1 1 1 1 -1 1 -1 2 -1 |