| Task: | Monikulmio |
| Sender: | Toitsu |
| Submission time: | 2025-10-27 15:52:51 +0200 |
| Language: | Python3 (PyPy3) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| test | verdict | time | score | |
|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.04 s | 0 | details |
| #2 | WRONG ANSWER | 0.05 s | 0 | 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 | WRONG ANSWER | 0.05 s | 0 | details |
| #7 | WRONG ANSWER | 0.07 s | 0 | details |
| #8 | WRONG ANSWER | 0.07 s | 0 | details |
| #9 | WRONG ANSWER | 0.07 s | 0 | details |
| #10 | WRONG ANSWER | 0.14 s | 0 | details |
Code
initial_info = input()
height, width, tip_count = initial_info.split(" ")
height = int(height)
width = int(width)
tips = []
for i in range(int(tip_count)):
a, b = input().split(" ")
tips.append((int(b), int(a)))
grid = []
for x in range(1, height + 1):
row = []
for y in range(1, width + 1):
if (y, x) in tips:
row.append("*")
else:
row.append(".")
grid.append(row)
print(tips)
# connect the tips
for i in range(len(tips)):
x_a, y_a = tips[i]
x_b, y_b = tips [0 if i == len(tips) - 1 else i + 1]
x_val = x_a - x_b
y_val = y_a - y_b
direction = ""
distance = max(abs(x_val), abs(y_val)) - 1
if x_val > 0 and y_val < 0:
direction = "left_down"
elif x_val < 0 and y_val < 0:
direction = "right_down"
elif x_val < 0 and y_val > 0:
direction = "right_up"
elif x_val > 0 and y_val > 0:
direction = "left_up"
elif x_val > 0 and y_val == 0:
direction = "left"
elif x_val < 0 and y_val == 0:
direction = "right"
elif x_val == 0 and y_val < 0:
direction = "down"
elif x_val == 0 and y_val > 0:
direction = "up"
else:
print(f"WTF?????: {x_val}, {y_val}")
print(f'{direction}, {distance}')
x_a -= 1
y_a -= 1
for j in range(1, distance + 1):
if direction == "left_down":
grid[y_a + j][x_a - j] = "/"
elif direction == "right_down":
grid[y_a + j][x_a + j] = "\\"
elif direction == "right_up":
grid[y_a - j][x_a + j] = "/"
elif direction == "left_up":
grid[y_a - j][x_a - j] = "\\"
elif direction == "left":
grid[y_a][x_a - j] = "="
elif direction == "right":
grid[y_a][x_a + j] = "="
elif direction == "down":
grid[y_a + j][x_a] = "|"
elif direction == "up":
grid[y_a - j][x_a] = "|"
else:
print(f"WTF?????: {direction}")
# print the grid
for row in grid:
for element in row:
print(element, 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 |
|---|
| [(2, 5), (5, 2), (8, 5), (8, 7... |
Feedback: Incorrect length on line 1: expected 9, got 4
Test 2 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 4 5 10 5 30 15 30 15 10 |
| correct output |
|---|
| ................................. |
| user output |
|---|
| [(10, 5), (30, 5), (30, 15), (... |
Feedback: Incorrect length on line 1: expected 40, got 5
Test 3 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 29 8 7 13 2 14 2 9 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| [(7, 8), (2, 13), (2, 14), (7,... |
Feedback: Incorrect length on line 1: expected 40, got 4
Test 4 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 14 5 12 5 25 8 28 13 28 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| [(12, 5), (25, 5), (28, 8), (2... |
Feedback: Incorrect length on line 1: expected 40, got 5
Test 5 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 12 3 20 7 16 7 9 11 13 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| [(20, 3), (16, 7), (9, 7), (13... |
Feedback: Incorrect length on line 1: expected 40, got 5
Test 6 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 9 35 33 2 3 2 8 4 8 4 5 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| [(3, 2), (8, 2), (8, 4), (5, 4... |
Feedback: Incorrect length on line 1: expected 35, got 4
Test 7 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 30 100 69 6 10 6 14 7 14 7 18 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| [(10, 6), (14, 6), (14, 7), (1... |
Feedback: Incorrect length on line 1: expected 100, got 5
Test 8 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 40 60 192 11 3 11 5 10 6 11 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| [(3, 11), (5, 11), (6, 10), (7... |
Feedback: Incorrect length on line 1: expected 60, got 4
Test 9 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 50 100 142 1 1 1 7 1 11 1 14 ... |
| correct output |
|---|
| *=====*===*==*................... |
| user output |
|---|
| [(1, 1), (7, 1), (11, 1), (14,... |
Feedback: Incorrect length on line 1: expected 100, got 4
Test 10 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 100 100 1000 10 1 4 7 1 4 1 9 ... |
| correct output |
|---|
| ...*====*........................ |
| user output |
|---|
| [(1, 10), (7, 4), (4, 1), (9, ... |
Feedback: Incorrect length on line 1: expected 100, got 4
