| Task: | Monikulmio |
| Sender: | rene |
| Submission time: | 2025-11-01 13:31:46 +0200 |
| Language: | Python3 (PyPy3) |
| Status: | READY |
| Result: | 28 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 28 |
| test | verdict | time | score | |
|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.04 s | 0 | details |
| #2 | ACCEPTED | 0.05 s | 7 | details |
| #3 | WRONG ANSWER | 0.05 s | 0 | details |
| #4 | WRONG ANSWER | 0.05 s | 0 | details |
| #5 | WRONG ANSWER | 0.05 s | 0 | details |
| #6 | ACCEPTED | 0.05 s | 7 | details |
| #7 | WRONG ANSWER | 0.06 s | 0 | details |
| #8 | ACCEPTED | 0.07 s | 7 | details |
| #9 | ACCEPTED | 0.09 s | 7 | details |
| #10 | WRONG ANSWER | 0.11 s | 0 | details |
Code
first = input()
first = first.split(" ")
rows = int(first[0])
cols = int(first[1])
points = int(first[2])
matrix = [[0 for _ in range(cols)] for i in range(rows)]
points_list = []
for i in range(points):
point = input()
point = point.split(" ")
x = int(point[0])
y = int(point[1])
matrix[x-1][y-1] = 1
points_list.append((x-1, y-1))
# figure out connecting lines
for i in range(len(points_list)):
next = (i + 1) % len(points_list)
if next <= len(points_list):
next = next
else:
next = 0
x1, y1 = points_list[i]
x2, y2 = points_list[next]
# horizontal
if x1 == x2:
if y1 < y2:
temp = y1+1
while temp < y2:
matrix[x1][temp] = 2
temp += 1
else:
temp = y1-1
while temp > y2:
matrix[x1][temp] = 2
temp -= 1
#vertical
elif y1 == y2:
if x1 < x2:
temp = x1+1
while temp < x2:
matrix[temp][y1] = 3
temp += 1
else:
temp = x1-1
while temp > x2:
matrix[temp][y1] = 3
temp -= 1
# diagonals
else:
if (x1-x2) > 0 and (y1-y2) > 0:
for d in range(1, x1-x2+1):
matrix[x1-d][y1-d] = 5
elif (x1-x2) > 0 and (y1-y2) < 0:
for d in range(1, x1-x2+1):
matrix[x1-d][y1+d] = 4
elif (x1-x2) < 0 and (y1-y2) > 0:
for d in range(1, y1-y2+1):
matrix[x1+d][y1-d] = 5
else:
for d in range(1, y2-y1+1):
matrix[x1+d][y1+d] = 4
for i in range(points):
x, y = points_list[i]
matrix[x][y] = 1
for i in range(rows):
for j in range(cols):
if matrix[i][j] == 0:
print(".", end="")
elif matrix[i][j] == 1:
print("*", end="")
elif matrix[i][j] == 2:
print("=", end="")
elif matrix[i][j] == 3:
print("|", end="")
elif matrix[i][j] == 4:
print("\\", end="")
elif matrix[i][j] == 5:
print("/", end="")
print()Test details
Test 1 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 8 9 5 5 2 2 5 5 8 7 8 ... |
| correct output |
|---|
| ......... ....*.... .../#\... ../###\.. .*#####*. ... |
| user output |
|---|
| ......... ....*.... ...\.\... ..\...\.. .*.....*. ... |
Feedback: Incorrect character on row 3, col 4: expected '/', got '\'
Test 2 (public)
Verdict: ACCEPTED
| input |
|---|
| 20 40 4 5 10 5 30 15 30 15 10 |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Lines are drawn correctly. Incorrect fill character on row 6, col 11: expected '#', got '.'
Test 3 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 29 8 7 13 2 14 2 9 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Incorrect character on row 4, col 31: expected '\', got '/'
Test 4 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 14 5 12 5 25 8 28 13 28 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Incorrect character on row 4, col 27: expected '\', got '/'
Test 5 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 12 3 20 7 16 7 9 11 13 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Incorrect character on row 4, col 21: expected '\', got '/'
Test 6 (public)
Verdict: ACCEPTED
| input |
|---|
| 9 35 33 2 3 2 8 4 8 4 5 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Lines are drawn correctly. Incorrect fill character on row 3, col 3: expected '#', got '.'
Test 7 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 30 100 69 6 10 6 14 7 14 7 18 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Incorrect character on row 7, col 9: expected '/', got '\'
Test 8 (public)
Verdict: ACCEPTED
| input |
|---|
| 40 60 192 11 3 11 5 10 6 11 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Lines are drawn correctly. Incorrect fill character on row 3, col 30: expected '#', got '.'
Test 9 (public)
Verdict: ACCEPTED
| input |
|---|
| 50 100 142 1 1 1 7 1 11 1 14 ... |
| correct output |
|---|
| *=====*===*==*................... |
| user output |
|---|
| *=====*===*==*................... |
Feedback: Lines are drawn correctly. Incorrect fill character on row 2, col 11: expected '#', got '.'
Test 10 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 100 100 1000 10 1 4 7 1 4 1 9 ... |
| correct output |
|---|
| ...*====*........................ |
| user output |
|---|
| ...*====*........................ |
Feedback: Incorrect character on row 2, col 5: expected '\', got '/'
