QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#401633 | #7758. Painter | Lspeed# | WA | 8ms | 9816kb | Python3 | 1.0kb | 2024-04-29 05:09:22 | 2024-04-29 05:09:22 |
Judging History
answer
T = int(input())
q = []
for i in range(T):
a = input().split()
q.append(a)
# Create a list of interesting points
s = []
val = []
dict = {}
print(q)
for i in range(T):
if q[i][0] == "Render":
for y in range(int(q[i][2]), int(q[i][4]) + 1):
for x in range(int(q[i][1]),int(q[i][3])+1):
s.append((x,y))
val.append(".")
dict[(x,y)] = len(s)-1
for i in range(T):
if q[i][0] == "Render":
for y in range(int(q[i][4]), int(q[i][2])-1, -1):
for x in range(int(q[i][3]),int(q[i][1])-1, -1):
print(val[dict[(x,y)]], end ="")
print()
if q[i][0] == "Rectangle":
for x, y in s:
if x >= int(q[i][1]) and x <= int(q[i][3]) and y >= int(q[i][2]) and y <= int(q[i][4]):
val[dict[(x,y)]] = q[i][5]
if q[i][0] == "Circle":
for x, y in s:
if int(q[i][3])**2 >= (int(q[i][1]) - x)**2 + (int(q[i][2]) - y)**2:
val[dict[(x,y)]] = q[i][4]
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 8ms
memory: 9816kb
input:
7 Circle 0 0 5 * Circle -2 2 1 @ Circle 2 2 1 @ Rectangle 0 -1 0 0 ^ Rectangle -2 -2 2 -2 _ Render -5 -5 5 5 Render -1 0 1 2
output:
[['Circle', '0', '0', '5', '*'], ['Circle', '-2', '2', '1', '@'], ['Circle', '2', '2', '1', '@'], ['Rectangle', '0', '-1', '0', '0', '^'], ['Rectangle', '-2', '-2', '2', '-2', '_'], ['Render', '-5', '-5', '5', '5'], ['Render', '-1', '0', '1', '2']] .....*..... ..*******.. .**@***@**. .*@@@*@@@*. .**...
result:
wrong answer 1st lines differ - expected: '.....*.....', found: '[['Circle', '0', '0', '5', '*'...'Render', '-1', '0', '1', '2']]'