QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#61813#692. Delete the PointscucudangWA 10ms8424kbPython3567b2022-11-15 00:37:102022-11-15 00:37:11

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-11-15 00:37:11]
  • 评测
  • 测评结果:WA
  • 用时:10ms
  • 内存:8424kb
  • [2022-11-15 00:37:10]
  • 提交

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