QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#61813 | #692. Delete the Points | cucudang | WA | 10ms | 8424kb | Python3 | 567b | 2022-11-15 00:37:10 | 2022-11-15 00:37:11 |
Judging History
answer
def f(p1,p2,p3):
x1,x2 = sorted((p1[0], p2[0]))
y1,y2 = sorted((p1[1], p2[1]))
w = x2 - x1
h = y2 - y1
s = max(w,h)
if h < w:
y2 += 0.5
elif w < h:
x2 += 0.5
x1 = x2 - s
y1 = y2 - s
if x1 <= p3[0] <= x2 and y1 <= p3[1] <= y2:
return 0
print(x1,y1,x2,y2)
return 1
n = int(input())
a = sorted([[*map(int, input().split())] for _ in range(n)])
a.append([1<<31,0])
p1 = a[0]
for i in range(1,n,2):
p2,p3 = a[i:i+2]
for j in range(3):
if f(p1,p2,p3):
break
p1,p2,p3 = p2,p3,p1
p1 = p3
詳細信息
Test #1:
score: 0
Wrong Answer
time: 10ms
memory: 8424kb
input:
4 1 1 2 2 5 5 6 6
output:
1 1 2 2 5 5 6 6
result:
wrong answer The participant does not have a solution