解题思路:为啥只能过几个测试点?问题出在哪?
注意事项:
参考代码:
n = int(input()) record = [i for i in range(n)] list = [int(i) for i in input().split()] x = [list[i] for i in range(2*n) if i%2==0] y = [list[i] for i in range(2*n) if i%2==1] for i in range(n): for j in range(n): if i == j: continue if x[j]>=x[i] and y[j]>=y[i]: # i点被j点支配 record.remove(i) break temp = [x[i] for i in record] while len(temp): print('({0},{1})'.format(x[record[temp.index(min(temp))]],y[record[temp.index(min(temp))]]),end='') if len(temp) != 1: print(',',end='') temp.pop(temp.index(min(temp)))
0.0分
1 人评分