Problem1171--21年12月 丙组T5 圆环选址

1171: 21年12月 丙组T5 圆环选址

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Sample Input Copy

5
1 2 3 4 5

Sample Output Copy

14

Source/Category