| Task: | Monikulmio |
| Sender: | DataN29 |
| Submission time: | 2025-11-04 11:20:53 +0200 |
| Language: | Python3 (PyPy3) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | RUNTIME ERROR | 0 |
| test | verdict | time | score | |
|---|---|---|---|---|
| #1 | RUNTIME ERROR | 0.07 s | 0 | details |
| #2 | RUNTIME ERROR | 0.06 s | 0 | details |
| #3 | RUNTIME ERROR | 0.06 s | 0 | details |
| #4 | RUNTIME ERROR | 0.07 s | 0 | details |
| #5 | RUNTIME ERROR | 0.06 s | 0 | details |
| #6 | RUNTIME ERROR | 0.06 s | 0 | details |
| #7 | RUNTIME ERROR | 0.06 s | 0 | details |
| #8 | RUNTIME ERROR | 0.06 s | 0 | details |
| #9 | RUNTIME ERROR | 0.06 s | 0 | details |
| #10 | RUNTIME ERROR | 0.07 s | 0 | details |
Code
qrid=input().split()
points=int(qrid[2])
#creating da Grid
high=int(qrid[0])
wide=int(qrid[1])
grid=[]
while high>0:
temp=wide
temp2=[]
while temp>0:
temp2.append(".")
temp-=1
grid.append(temp2)
high-=1
#placing points
records=[]
while points>0:
inp=input().split()
inp[0]=int(inp[0])
inp[1]=int(inp[1])
records.append(inp)
grid[inp[0]-1][inp[1]-1]="*"
points-=1
#de linez
for i in range(0,len(records)):
temp=1
if i+1 != len(records):
if records[i][0]==records[i+1][0]:
if records[i][1]<records[i+1][1]:
for j in range(records[i][1]+1,records[i+1][1]):
grid[records[i][0]-1][j-1]="="
if records[i][1]>records[i+1][1]:
for j in range(records[i+1][1]+1,records[i][1]):
grid[records[i][0]-1][j-1]="="
elif records[i][1]==records[i+1][1]:
if records[i][0]<records[i+1][0]:
for j in range(records[i][0]+1,records[i+1][0]):
grid[j-1][records[i][1]-1]="|"
if records[i][0]>records[i+1][0]:
for j in range(records[i+1][0]+1,records[i][0]):
grid[j-1][records[i][1]-1]="|"
elif records[i][0]>records[i+1][0]:
if records[i][1]<records[i+1][1]:
for j in range(records[i+1][0]+1,records[i][0]):
grid[j-1][records[i+1][1]-temp-1]="/"
temp+=1
elif records[i][1]>records[i+1][1]:
for j in range(records[i+1][0]+1,records[i][0]):
grid[j-1][records[i+1][1]+temp-1]="\\"
temp+=1
elif records[i][0]<records[i+1][0]:
if records[i][1]<records[i+1][1]:
for j in range(records[i][0]+1,records[i+1][0]):
grid[j-1][records[i][1]+temp-1]="\\"
temp+=1
elif records[i][1]>records[i+1][1]:
for j in range(records[i][0]+1,records[i+1][0]):
grid[j-1][records[i][1]-temp-1]="/"
temp+=1
else:
if records[i][0]==records[0][0]:
if records[i][1]<records[0][1]:
for j in range(records[i][1]+1,records[0][1]):
grid[records[i][0]-1][j-1]="="
if records[i][1]>records[0][1]:
for j in range(records[0][1]+1,records[i][1]):
grid[records[i][0]-1][j-1]="="
elif records[i][1]==records[0][1]:
if records[i][0]<records[0][0]:
for j in range(records[i][0]+1,records[0][0]):
grid[j-1][records[i][1]-1]="|"
if records[i][0]>records[0][0]:
for j in range(records[0][0]+1,records[i][0]):
grid[j-1][records[i][1]-1]="|"
elif records[i][0]>records[0][0]:
if records[i][1]<records[0][1]:
for j in range(records[0][0]+1,records[i][0]):
grid[j-1][records[0][1]-temp-1]="/"
temp+=1
elif records[i][1]>records[0][1]:
for j in range(records[0][0]+1,records[i][0]):
grid[j-1][records[0][1]+temp-1]="\\"
temp+=1
elif records[i][0]<records[0][0]:
if records[i][1]<records[0][1]:
for j in range(records[i][0]+1,records[0][0]):
grid[j-1][records[i][1]+temp-1]="\\"
temp+=1
elif records[i][1]>records[i+1][1]:
for j in range(records[i][0]+1,records[i+1][0]):
grid[j-1][records[i][1]-temp-1]="/"
temp+=1
#fill <- does not work
for i in range(0,len(grid)):
fillnext=False
lesdots=grid[i].count("*")
for j in range(0,wide):
try:
if grid[i][j]=="*"and((grid[i+1][j-1]!="."or grid[i+1][j]!="."or grid[i+1][j+1]!=".")and(grid[i+1][j-1]!="#"or grid[i+1][j]!="#"or grid[i+1][j+1]!="#"))and((grid[i-1][j-1]!="."or grid[i-1][j]!="."or grid[i-1][j+1]!=".")and(grid[i-1][j-1]!="#"or grid[i-1][j]!="#"or grid[i-1][j+1]!="#"))and (grid[i][j-1]=="."or grid[i][j-1]=="#"):
fillnext=not fillnext
else:
if (grid[i][j]=="/"or grid[i][j]=="\\"or grid[i][j]=="|"):
fillnext=not fillnext
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
fillnext=True
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="="):
fillnext=not fillnext
except:
fillnext=False
if fillnext and grid[i][j]!="*" and grid[i][j]!="=" and grid[i][j]!="|" and grid[i][j]!="/" and grid[i][j]!="\\":
grid[i][j]="#"
#output creation
out=""
for i in range(0,len(grid)):
for j in range(0,wide):
out+=grid[i][j]
out+="\n"
print(out)Test details
Test 1 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 8 9 5 5 2 2 5 5 8 7 8 ... |
| correct output |
|---|
| ......... ....*.... .../#\... ../###\.. .*#####*. ... |
| user output |
|---|
| (empty) |
Error:
File "input/code.py", line 109
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
^
SyntaxError: invalid syntax (expected ':')Test 2 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 20 40 4 5 10 5 30 15 30 15 10 |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Error:
File "input/code.py", line 109
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
^
SyntaxError: invalid syntax (expected ':')Test 3 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 20 40 29 8 7 13 2 14 2 9 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Error:
File "input/code.py", line 109
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
^
SyntaxError: invalid syntax (expected ':')Test 4 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 20 40 14 5 12 5 25 8 28 13 28 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Error:
File "input/code.py", line 109
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
^
SyntaxError: invalid syntax (expected ':')Test 5 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 20 40 12 3 20 7 16 7 9 11 13 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Error:
File "input/code.py", line 109
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
^
SyntaxError: invalid syntax (expected ':')Test 6 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 9 35 33 2 3 2 8 4 8 4 5 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Error:
File "input/code.py", line 109
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
^
SyntaxError: invalid syntax (expected ':')Test 7 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 30 100 69 6 10 6 14 7 14 7 18 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Error:
File "input/code.py", line 109
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
^
SyntaxError: invalid syntax (expected ':')Test 8 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 40 60 192 11 3 11 5 10 6 11 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Error:
File "input/code.py", line 109
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
^
SyntaxError: invalid syntax (expected ':')Test 9 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 50 100 142 1 1 1 7 1 11 1 14 ... |
| correct output |
|---|
| *=====*===*==*................... |
| user output |
|---|
| (empty) |
Error:
File "input/code.py", line 109
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
^
SyntaxError: invalid syntax (expected ':')Test 10 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 100 100 1000 10 1 4 7 1 4 1 9 ... |
| correct output |
|---|
| ...*====*........................ |
| user output |
|---|
| (empty) |
Error:
File "input/code.py", line 109
elif grid[i][j]=="*" and (grid[i][j+1]=="="or grid[i][j-1]=="=")and(grid[i-1][j+2]=="#");
^
SyntaxError: invalid syntax (expected ':')