解题思路:为啥只能过几个测试点?问题出在哪?
注意事项:
参考代码:
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 人评分
母牛的故事 (C语言代码)浏览:668 |
C语言训练-求s=a+aa+aaa+aaaa+aa...a的值 (C语言代码)浏览:590 |
C语言程序设计教程(第三版)课后习题5.7 (C++代码)浏览:849 |
C语言程序设计教程(第三版)课后习题5.6 (C语言代码)浏览:501 |
数组输出 (C语言代码)错误???浏览:563 |
C语言程序设计教程(第三版)课后习题8.5 (C语言代码)浏览:540 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:1300 |
简单的a+b (C语言代码)浏览:525 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:470 |
母牛的故事 (C语言代码)浏览:549 |