余博文


私信TA

用户名:dotcpp0595286

访问量:1026

签 名:

小余也有未来!!

等  级
排  名 1775
经  验 2563
参赛次数 0
文章发表 20
年  龄 0
在职情况 学生
学  校 长江大学
专  业

  自我简介:

TA的其他文章

解题思路:为啥只能过几个测试点?问题出在哪?
注意事项:

参考代码:

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 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区