| Task: | Hypyt |
| Sender: | Emerald0X2 |
| Submission time: | 2025-10-31 19:21:03 +0200 |
| Language: | Python3 (PyPy3) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | RUNTIME ERROR | 0 |
| #2 | RUNTIME ERROR | 0 |
| #3 | RUNTIME ERROR | 0 |
| #4 | RUNTIME ERROR | 0 |
| #5 | RUNTIME ERROR | 0 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | RUNTIME ERROR | 0.08 s | 1, 2, 3, 4, 5 | details |
| #2 | TIME LIMIT EXCEEDED | -- | 1, 2, 3, 4, 5 | details |
| #3 | RUNTIME ERROR | 0.08 s | 1, 2, 3, 4, 5 | details |
| #4 | TIME LIMIT EXCEEDED | -- | 1, 2, 3, 4, 5 | details |
| #5 | RUNTIME ERROR | 0.08 s | 1, 2, 3, 4, 5 | details |
| #6 | TIME LIMIT EXCEEDED | -- | 2, 5 | details |
| #7 | RUNTIME ERROR | 0.11 s | 2, 5 | details |
| #8 | RUNTIME ERROR | 0.11 s | 2, 5 | details |
| #9 | TIME LIMIT EXCEEDED | -- | 3, 4, 5 | details |
| #10 | TIME LIMIT EXCEEDED | -- | 3, 4, 5 | details |
| #11 | RUNTIME ERROR | 0.09 s | 3, 4, 5 | details |
| #12 | TIME LIMIT EXCEEDED | -- | 4, 5 | details |
| #13 | TIME LIMIT EXCEEDED | -- | 4, 5 | details |
| #14 | RUNTIME ERROR | 0.09 s | 4, 5 | details |
| #15 | TIME LIMIT EXCEEDED | -- | 5 | details |
| #16 | RUNTIME ERROR | 0.11 s | 5 | details |
| #17 | RUNTIME ERROR | 0.11 s | 5 | details |
| #18 | RUNTIME ERROR | 0.10 s | 5 | details |
| #19 | TIME LIMIT EXCEEDED | -- | 5 | details |
| #20 | RUNTIME ERROR | 0.10 s | 5 | details |
| #21 | TIME LIMIT EXCEEDED | -- | 5 | details |
| #22 | TIME LIMIT EXCEEDED | -- | 1, 2, 3, 4, 5 | details |
| #23 | RUNTIME ERROR | 0.09 s | 1, 2, 3, 4, 5 | details |
| #24 | TIME LIMIT EXCEEDED | -- | 5 | details |
| #25 | RUNTIME ERROR | 0.08 s | 5 | details |
| #26 | RUNTIME ERROR | 0.12 s | 5 | details |
| #27 | WRONG ANSWER | 0.61 s | 5 | details |
Code
y, x, questions = input().split()
y = int(y)
x = int(x)
questions = int(questions)
area = []
safe = []
for i in range(y):
area.append(list(input()))
for i in range(y):
for j in range(x):
if area[i][j] == ".":
safe.append([i,j])
print(area)
for i in range(questions):
y1,x1,y2,x2 = input().split()
y1 = int(y1)
x1 = int(x1)
y2 = int(y2)
x2 = int(x2)
not_possible = False
cur_pos = [y2,x2]
target_pos = [y1, x1]
path = []
x_diff = x1-x2
y_diff = y1-y2
while cur_pos != target_pos:
if(abs(y_diff) > abs(x_diff)):
for pos in safe:
if pos[0] == cur_pos[0] and pos != cur_pos:
path.append(cur_pos)
cur_pos == pos
break
elif(abs(x_diff) > abs(y_diff)):
if pos[1] == cur_pos[1] and pos != cur_pos:
path.append(cur_pos)
cur_pos == pos
break
if (not_possible):
print(-1)
else:
print(len(path))
Test details
Test 1 (public)
Group: 1, 2, 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 4 6 5 .*.*** *...** *****. *..*.* ... |
| correct output |
|---|
| 1 0 3 3 -1 |
| user output |
|---|
| [['.', '*', '.', '*', '*', '*'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 2
Group: 1, 2, 3, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 10 10 10 .......... .....*.... ........*. *.*....*.. ... |
| correct output |
|---|
| 1 2 1 2 2 ... |
| user output |
|---|
| (empty) |
Test 3
Group: 1, 2, 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 10 *...***.** *****.*... **..**.**. ..**.**.*. ... |
| correct output |
|---|
| 1 2 2 1 2 ... |
| user output |
|---|
| [['*', '.', '.', '.', '*', '*'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 4
Group: 1, 2, 3, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 10 10 10 ***.*.**** ********** *.******** .*.***.**. ... |
| correct output |
|---|
| 3 4 2 3 4 ... |
| user output |
|---|
| (empty) |
Test 5
Group: 1, 2, 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 1 .****.**** **.**..*** ********** *******..* ... |
| correct output |
|---|
| 7 |
| user output |
|---|
| [['.', '*', '*', '*', '*', '.'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 6
Group: 2, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 250 250 250 .*...*.....*******..**...*....... |
| correct output |
|---|
| 2 3 3 2 2 ... |
| user output |
|---|
| (empty) |
Test 7
Group: 2, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 250 ...*......**.**.*.*..**..*..**... |
| correct output |
|---|
| 2 2 2 2 3 ... |
| user output |
|---|
| [['.', '.', '.', '*', '.', '.'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 8
Group: 2, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 250 **..**..****.****.*.***.***..*... |
| correct output |
|---|
| 2 3 3 3 3 ... |
| user output |
|---|
| [['*', '*', '.', '.', '*', '*'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 9
Group: 3, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 40 40 200000 ...*.**.*..*.............*.*..... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| (empty) |
Test 10
Group: 3, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 40 40 200000 **.**..*.*.*.******....****.*.... |
| correct output |
|---|
| 2 1 3 2 2 ... |
| user output |
|---|
| (empty) |
Test 11
Group: 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 40 40 200000 .*.*.**.*****.***.*.****.**.**... |
| correct output |
|---|
| 3 3 3 3 3 ... |
| user output |
|---|
| [['.', '*', '.', '*', '.', '*'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 12
Group: 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 80 80 200000 *....**.***..****...*.....*...... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| (empty) |
Test 13
Group: 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 80 80 200000 .***.*..*.***..*****....**...*... |
| correct output |
|---|
| 3 2 2 3 2 ... |
| user output |
|---|
| (empty) |
Test 14
Group: 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 80 80 200000 *******.*****.*..*..****...***... |
| correct output |
|---|
| 2 3 1 2 2 ... |
| user output |
|---|
| [['*', '*', '*', '*', '*', '*'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 15
Group: 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 250 250 200000 *....*..*..*..**..*.........**... |
| correct output |
|---|
| 3 2 2 2 2 ... |
| user output |
|---|
| (empty) |
Test 16
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 ..*....*..*......*.**.*.*..***... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| [['.', '.', '*', '.', '.', '.'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 17
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 *..*.*****.*********.****.****... |
| correct output |
|---|
| 3 3 2 2 2 ... |
| user output |
|---|
| [['*', '.', '.', '*', '.', '*'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 18
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 *********.**********.******.**... |
| correct output |
|---|
| 3 3 3 3 3 ... |
| user output |
|---|
| [['*', '*', '*', '*', '*', '*'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 19
Group: 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 250 250 200000 .*****************************... |
| correct output |
|---|
| 104 422 145 93 65 ... |
| user output |
|---|
| (empty) |
Test 20
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 ..****************************... |
| correct output |
|---|
| 57 155 38 65 98 ... |
| user output |
|---|
| [['.', '.', '*', '*', '*', '*'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 21
Group: 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 250 250 200000 .*****************************... |
| correct output |
|---|
| 498 498 498 498 498 ... |
| user output |
|---|
| (empty) |
Test 22
Group: 1, 2, 3, 4, 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 10 1 10 * * . * ... |
| correct output |
|---|
| 0 1 1 0 0 ... |
| user output |
|---|
| (empty) |
Test 23
Group: 1, 2, 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 1 10 10 ........*. 1 7 1 10 1 4 1 7 1 5 1 1 ... |
| correct output |
|---|
| 1 1 1 1 1 ... |
| user output |
|---|
| [['.', '.', '.', '.', '.', '.'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 24
Group: 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 250 1 200000 * . * . ... |
| correct output |
|---|
| 1 1 1 1 1 ... |
| user output |
|---|
| (empty) |
Test 25
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 1 250 200000 *.*.*...*.*.**.***..**.*.*..**... |
| correct output |
|---|
| 1 1 1 1 1 ... |
| user output |
|---|
| [['*', '.', '*', '.', '*', '.'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 26
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 ................................. |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| [['.', '.', '.', '.', '.', '.'... |
Error:
Traceback (most recent call last):
File "input/code.py", line 44, in <module>
if pos[1] == cur_pos[1] and pos != cur_pos:
NameError: name 'pos' is not defined. Did you mean: pow?Test 27
Group: 5
Verdict: WRONG ANSWER
| input |
|---|
| 250 250 200000 ******************************... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| [['*', '*', '*', '*', '*', '*'... |
Feedback: Output is longer than expected
