| Task: | Hypyt |
| Sender: | Emerald0X2 |
| Submission time: | 2025-11-06 10:56:20 +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.07 s | 1, 2, 3, 4, 5 | details |
| #2 | RUNTIME ERROR | 0.07 s | 1, 2, 3, 4, 5 | details |
| #3 | RUNTIME ERROR | 0.07 s | 1, 2, 3, 4, 5 | details |
| #4 | RUNTIME ERROR | 0.07 s | 1, 2, 3, 4, 5 | details |
| #5 | RUNTIME ERROR | 0.07 s | 1, 2, 3, 4, 5 | details |
| #6 | RUNTIME ERROR | 0.17 s | 2, 5 | details |
| #7 | RUNTIME ERROR | 0.15 s | 2, 5 | details |
| #8 | RUNTIME ERROR | 0.13 s | 2, 5 | details |
| #9 | RUNTIME ERROR | 0.10 s | 3, 4, 5 | details |
| #10 | RUNTIME ERROR | 0.09 s | 3, 4, 5 | details |
| #11 | RUNTIME ERROR | 0.09 s | 3, 4, 5 | details |
| #12 | RUNTIME ERROR | 0.11 s | 4, 5 | details |
| #13 | RUNTIME ERROR | 0.10 s | 4, 5 | details |
| #14 | RUNTIME ERROR | 0.10 s | 4, 5 | details |
| #15 | RUNTIME ERROR | 0.17 s | 5 | details |
| #16 | RUNTIME ERROR | 0.15 s | 5 | details |
| #17 | RUNTIME ERROR | 0.13 s | 5 | details |
| #18 | RUNTIME ERROR | 0.12 s | 5 | details |
| #19 | RUNTIME ERROR | 0.10 s | 5 | details |
| #20 | RUNTIME ERROR | 0.11 s | 5 | details |
| #21 | RUNTIME ERROR | 0.09 s | 5 | details |
| #22 | RUNTIME ERROR | 0.07 s | 1, 2, 3, 4, 5 | details |
| #23 | RUNTIME ERROR | 0.07 s | 1, 2, 3, 4, 5 | details |
| #24 | RUNTIME ERROR | 0.07 s | 5 | details |
| #25 | RUNTIME ERROR | 0.07 s | 5 | details |
| #26 | RUNTIME ERROR | 0.20 s | 5 | details |
| #27 | WRONG ANSWER | 0.63 s | 5 | details |
Code
y, x, questions = input().split()
y = int(y)
x = int(x)
questions = int(questions)
x_pos = {}
y_pos = {}
safe = {}
for i in range(y):
row = input()
row_points = []
for j in range(len(row)):
row_points.append((i,j))
if row[j] == ".":
safe.update({(i,j): 0})
if(x_pos.get(j, None) == None):
x_pos.update({j: [i]})
else:
x_pos[j].append(i)
if(y_pos.get(i, None) == None):
y_pos.update({i: [j]})
else:
y_pos[i].append(j)
print(x_pos, y_pos)
print(safe)
for q in range(questions):
y1,x1,y2,x2 = input().split()
y1 = int(y1)-1
x1 = int(x1)-1
y2 = int(y2)-1
x2 = int(x2)-1
start = (y1,x1)
end = (y2,x2)
current = [start]
seen_y = {y1}
seen_x = {x1}
could_jump = False
jumps = 1
for key in safe:
safe[key] = abs(key[0]-y2)+abs(key[1]-x2)
if start != end:
while end not in current:
visible_points = {}
for pos in safe:
if (pos[0] == current[len(current)-1] or pos[1] == current[len(current)-1]) and pos not in current:
visible_points.update({pos: safe[pos]})
could_jump = True
closest = min(visible_points, key=visible_points.get)
current.append(closest)
seen_y.add(closest[0])
seen_x.add(closest[1])
if not could_jump:
jumps = -1
break
else:
jumps = 0
print(jumps)
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 |
|---|
| {0: [0], 2: [0, 1, 3], 1: [1, ... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 2
Group: 1, 2, 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 10 .......... .....*.... ........*. *.*....*.. ... |
| correct output |
|---|
| 1 2 1 2 2 ... |
| user output |
|---|
| {0: [0, 1, 2, 4, 5, 6, 7, 8, 9... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 3
Group: 1, 2, 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 10 *...***.** *****.*... **..**.**. ..**.**.*. ... |
| correct output |
|---|
| 1 2 2 1 2 ... |
| user output |
|---|
| {1: [0, 3, 4, 5, 6, 8], 2: [0,... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 4
Group: 1, 2, 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 10 ***.*.**** ********** *.******** .*.***.**. ... |
| correct output |
|---|
| 3 4 2 3 4 ... |
| user output |
|---|
| {3: [0, 7], 5: [0, 5, 8], 1: [... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 5
Group: 1, 2, 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 1 .****.**** **.**..*** ********** *******..* ... |
| correct output |
|---|
| 7 |
| user output |
|---|
| {0: [0, 5], 5: [0, 1, 8], 2: [... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 6
Group: 2, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 250 .*...*.....*******..**...*....... |
| correct output |
|---|
| 2 3 3 2 2 ... |
| user output |
|---|
| {0: [0, 1, 2, 3, 5, 6, 8, 9, 1... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 7
Group: 2, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 250 ...*......**.**.*.*..**..*..**... |
| correct output |
|---|
| 2 2 2 2 3 ... |
| user output |
|---|
| {0: [0, 2, 3, 4, 8, 9, 11, 12,... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 8
Group: 2, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 250 **..**..****.****.*.***.***..*... |
| correct output |
|---|
| 2 3 3 3 3 ... |
| user output |
|---|
| {2: [0, 4, 18, 22, 25, 26, 27,... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 9
Group: 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 40 40 200000 ...*.**.*..*.............*.*..... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| {0: [0, 2, 3, 4, 5, 6, 7, 8, 9... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 10
Group: 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 40 40 200000 **.**..*.*.*.******....****.*.... |
| correct output |
|---|
| 2 1 3 2 2 ... |
| user output |
|---|
| {2: [0, 1, 3, 6, 8, 14, 16, 18... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 11
Group: 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 40 40 200000 .*.*.**.*****.***.*.****.**.**... |
| correct output |
|---|
| 3 3 3 3 3 ... |
| user output |
|---|
| {0: [0, 4, 11, 18, 19, 36, 38]... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 12
Group: 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 80 80 200000 *....**.***..****...*.....*...... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| {1: [0, 1, 2, 4, 5, 6, 7, 10, ... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 13
Group: 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 80 80 200000 .***.*..*.***..*****....**...*... |
| correct output |
|---|
| 3 2 2 3 2 ... |
| user output |
|---|
| {0: [0, 1, 2, 5, 7, 8, 17, 19,... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 14
Group: 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 80 80 200000 *******.*****.*..*..****...***... |
| correct output |
|---|
| 2 3 1 2 2 ... |
| user output |
|---|
| {7: [0, 3, 6, 7, 9, 10, 12, 13... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 15
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 *....*..*..*..**..*.........**... |
| correct output |
|---|
| 3 2 2 2 2 ... |
| user output |
|---|
| {1: [0, 2, 4, 5, 6, 8, 9, 10, ... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 16
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 ..*....*..*......*.**.*.*..***... |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| {0: [0, 1, 3, 4, 6, 7, 8, 9, 1... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 17
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 *..*.*****.*********.****.****... |
| correct output |
|---|
| 3 3 2 2 2 ... |
| user output |
|---|
| {1: [0, 1, 2, 17, 24, 25, 31, ... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 18
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 *********.**********.******.**... |
| correct output |
|---|
| 3 3 3 3 3 ... |
| user output |
|---|
| {9: [0, 1, 5, 6, 7, 12, 18, 20... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 19
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 .*****************************... |
| correct output |
|---|
| 104 422 145 93 65 ... |
| user output |
|---|
| {0: [0], 249: [0, 249], 1: [1,... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 20
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 ..****************************... |
| correct output |
|---|
| 57 155 38 65 98 ... |
| user output |
|---|
| {0: [0, 1], 1: [0, 1], 248: [0... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 21
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 .*****************************... |
| correct output |
|---|
| 498 498 498 498 498 ... |
| user output |
|---|
| {0: [0, 1], 1: [1, 2], 2: [2, ... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 22
Group: 1, 2, 3, 4, 5
Verdict: RUNTIME ERROR
| input |
|---|
| 10 1 10 * * . * ... |
| correct output |
|---|
| 0 1 1 0 0 ... |
| user output |
|---|
| {0: [2, 5, 9]} {2: [0], 5: [0]... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 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 |
|---|
| {0: [0], 1: [0], 2: [0], 3: [0... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 24
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 1 200000 * . * . ... |
| correct output |
|---|
| 1 1 1 1 1 ... |
| user output |
|---|
| {0: [1, 3, 4, 7, 9, 13, 14, 17... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 25
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 1 250 200000 *.*.*...*.*.**.***..**.*.*..**... |
| correct output |
|---|
| 1 1 1 1 1 ... |
| user output |
|---|
| {1: [0], 3: [0], 5: [0], 6: [0... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 26
Group: 5
Verdict: RUNTIME ERROR
| input |
|---|
| 250 250 200000 ................................. |
| correct output |
|---|
| 2 2 2 2 2 ... |
| user output |
|---|
| {0: [0, 1, 2, 3, 4, 5, 6, 7, 8... |
Error:
Traceback (most recent call last):
File "input/code.py", line 61, in <module>
closest = min(visible_points, key=visible_points.get)
ValueError: arg is an empty sequenceTest 27
Group: 5
Verdict: WRONG ANSWER
| input |
|---|
| 250 250 200000 ******************************... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| {249: [249]} {249: [249]} {(249, 249): 0} 0 0 0 ... |
Feedback: Output is longer than expected
