PAT-A1046.Shortest Distance

1 · OS-EDU · June 19, 2021, midnight
PAT-A1046.Shortest Distance 作者:AKA二夕 审核:freedom 一、题目描述 题目描述: The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits. 输入格式: Each input file contains one test case. For each case, the first line contains an integer N (in [3,105]), followed by N integer distances D1 D2 ⋯ DN, where Di is the distance between the i-th and the (i+1)-st exits, and DN is between the N-th and the 1st exits....