QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#401633#7758. PainterLspeed#WA 8ms9816kbPython31.0kb2024-04-29 05:09:222024-04-29 05:09:22

Judging History

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

  • [2024-04-29 05:09:22]
  • 评测
  • 测评结果:WA
  • 用时:8ms
  • 内存:9816kb
  • [2024-04-29 05:09:22]
  • 提交

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']]'