QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#61815 | #692. Delete the Points | cucudang | WA | 23ms | 8412kb | Python3 | 646b | 2022-11-15 00:47:06 | 2022-11-15 00:47:09 |
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(f"{x1:.1f} {y1:.1f} {x2:.1f} {y2:.1f}")
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]
d = 0
for j in range(3):
if f(p1,p2,p3):
d = 1
break
p1,p2,p3 = p2,p3,p1
if d == 0:
s = 3 // 0
p1 = p3
詳細信息
Test #1:
score: 0
Wrong Answer
time: 23ms
memory: 8412kb
input:
4 1 1 2 2 5 5 6 6
output:
1.0 1.0 2.0 2.0 5.0 5.0 6.0 6.0
result:
wrong answer The participant does not have a solution