Submission details
Task:Monikulmio
Sender:poppendop
Submission time:2025-11-07 12:52:17 +0200
Language:Python3 (CPython3)
Status:READY
Result:7
Feedback
groupverdictscore
#17
Test results
testverdicttimescore
#10.02 s0details
#20.02 s0details
#30.02 s0details
#40.02 s0details
#50.02 s0details
#60.02 s0details
#70.02 s0details
#8ACCEPTED0.02 s7details
#90.02 s0details
#100.03 s0details

Code

# första raden
n,m,k = (int(x) for x in input().split())
lista = []
punkter = []
for i in range(n):
  lista.append([])
  rad = lista[i]
  for j in range(m):
    rad.append("")
    rad[j] = "."
for i in range(k):
  # de kvarvarande raderna
  q,r = (int(x) for x in input().split())
  rad = lista[q-1]
  rad[r-1] = "*"
  punkter.append((str(q)+" "+str(r)))
  
# här ska sättas in linjer
for i in range(len(punkter)):
  pX,pY = (int(x) for x in punkter[i].split())
  var = i+1
  if i+1 == len(punkter):
    var = 0
  nX,nY = (int(x) for x in punkter[var].split())
  if pX == nX:
    rad = lista[pX-1]
    if pY > nY:
      for j in range(0,pY-nY-1):
        rad[nY+j] = "="
    else:
      for j in range(0,nY-pY-1):
        rad[pY+j] = "="
  elif pY == nY:
    if pX > nX:
      for j in range(0,pX-nX-1):
        var = nY+j
        if var >= len(lista):
          var -= len(lista)
        rad = lista[var]
        rad[nX-1] = "|"
    else:
      for j in range(2,nX-pX+1):
        var = pY-j
        if var >= len(lista):
          var -= len(lista)
        rad = lista[var]
        rad[nX-1] = "|"
# printa ut svaren
for i in range(len(lista)):
  text = ""
  for j in range(len(lista[i])):
    text = str(text)+lista[i][j]
  print(text)


Test details

Test 1 (public)

Verdict:

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:

input
20 40 4
5 10
5 30
15 30
15 10

correct output
.................................

user output
..............|..................

Feedback: Incorrect character on row 1, col 15: expected '.', got '|'

Test 3 (public)

Verdict:

input
20 40 29
8 7
13 2
14 2
9 7
...

correct output
.................................

user output
................|................

Feedback: Incorrect character on row 1, col 17: expected '.', got '|'

Test 4 (public)

Verdict:

input
20 40 14
5 12
5 25
8 28
13 28
...

correct output
.................................

user output
....|............|...............

Feedback: Incorrect character on row 1, col 5: expected '.', got '|'

Test 5 (public)

Verdict:

input
20 40 12
3 20
7 16
7 9
11 13
...

correct output
.................................

user output
.................................

Feedback: Incorrect character on row 4, col 19: expected '/', got '.'

Test 6 (public)

Verdict:

input
9 35 33
2 3
2 8
4 8
4 5
...

correct output
.................................

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 46, in <module>
    rad = lista[var]
IndexError: list index out of range

Test 7 (public)

Verdict:

input
30 100 69
6 10
6 14
7 14
7 18
...

correct output
.................................

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 39, in <module>
    rad = lista[var]
IndexError: list index out of range

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:

input
50 100 142
1 1
1 7
1 11
1 14
...

correct output
*=====*===*==*...................

user output
*=|==|*==||==*......||....|..|...

Feedback: Incorrect character on row 1, col 3: expected '=', got '|'

Test 10 (public)

Verdict:

input
100 100 1000
10 1
4 7
1 4
1 9
...

correct output
...*====*........................

user output
...*====*..........|.............

Feedback: Incorrect character on row 1, col 20: expected '.', got '|'