标签:pre rip map possible lin str pytho readline flag
import sys n = int(sys.stdin.readline().strip()) s = sys.stdin.readline() s = list(map(int, s.split(‘ ‘))) print(n) print(s) for i in range(len(s)-1): for j in range(i+1, len(s)): if s[i] >= s[j]: s[i], s[j] = s[j], s[i] for j in range(1, len(s)-1): if s[j] - s[j-1] == s[j+1] - s[j]: flag = 1 else: flag = 0 if flag == 1: print(‘Possible‘) else: print(‘Impossible‘)
标签:pre rip map possible lin str pytho readline flag
原文地址:https://www.cnblogs.com/aixiao07/p/11335295.html