Submission details
Task:Hypyt
Sender:DataN29
Submission time:2025-11-06 14:36:44 +0200
Language:Python3 (PyPy3)
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
#40
#50
Test results
testverdicttimegroup
#10.06 s1, 2, 3, 4, 5details
#20.07 s1, 2, 3, 4, 5details
#30.04 s1, 2, 3, 4, 5details
#40.06 s1, 2, 3, 4, 5details
#50.04 s1, 2, 3, 4, 5details
#60.09 s2, 5details
#70.09 s2, 5details
#80.09 s2, 5details
#90.09 s3, 4, 5details
#100.08 s3, 4, 5details
#110.08 s3, 4, 5details
#120.08 s4, 5details
#130.08 s4, 5details
#140.09 s4, 5details
#150.09 s5details
#160.09 s5details
#170.08 s5details
#180.08 s5details
#190.09 s5details
#200.09 s5details
#210.08 s5details
#220.05 s1, 2, 3, 4, 5details
#230.04 s1, 2, 3, 4, 5details
#240.78 s5details
#250.76 s5details
#260.09 s5details
#270.78 s5details

Code

posqwers=list()
temp2=list()
setup=input().split(" ")
for i in range(0,int(setup[0])):
    temp=list(input())
    for j in range(0,int(setup[1])):
        if temp[j]==".":
            temp2.append(j)
    temp2.append(-1)
    posqwers.append(temp2)
    temp=[]
    temp2=[]
for i in range(0,int(setup[2])):
    temp=input().split(" ")
    temp2=list(map(int, temp))
    print(temp2)
    movount=0
    if (temp2[0]==temp2[2])!=(temp2[1]==temp2[3]):
        print(1)
        continue
    elif temp2[0]==temp2[2] and temp2[1]==temp2[3]:
        print(0)
        continue
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
        print(2)
        continue
    else:
        print(-1)
        continue

Test details

Test 1 (public)

Group: 1, 2, 3, 4, 5

Verdict:

input
4 6 5
.*.***
*...**
*****.
*..*.*
...

correct output
1
0
3
3
-1

user output
[1, 1, 1, 3]
1
[2, 2, 2, 2]
0
[1, 1, 4, 5]

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 2

Group: 1, 2, 3, 4, 5

Verdict:

input
10 10 10
..........
.....*....
........*.
*.*....*..
...

correct output
1
2
1
2
2
...

user output
[6, 4, 1, 4]
1
[5, 1, 6, 10]
-1
[10, 10, 10, 7]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 3

Group: 1, 2, 3, 4, 5

Verdict:

input
10 10 10
*...***.**
*****.*...
**..**.**.
..**.**.*.
...

correct output
1
2
2
1
2
...

user output
[1, 2, 1, 8]
1
[7, 4, 9, 7]
-1
[3, 4, 9, 3]
...

Feedback: Output is longer than expected

Test 4

Group: 1, 2, 3, 4, 5

Verdict:

input
10 10 10
***.*.****
**********
*.********
.*.***.**.
...

correct output
3
4
2
3
4
...

user output
[8, 4, 10, 2]

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 5

Group: 1, 2, 3, 4, 5

Verdict:

input
10 10 1
.****.****
**.**..***
**********
*******..*
...

correct output
7

user output
[2, 3, 4, 9]
-1

Feedback: Output is longer than expected

Test 6

Group: 2, 5

Verdict:

input
250 250 250
.*...*.....*******..**...*.......

correct output
2
3
3
2
2
...

user output
[61, 169, 104, 176]
2
[184, 93, 80, 83]
2
[73, 6, 237, 89]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 7

Group: 2, 5

Verdict:

input
250 250 250
...*......**.**.*.*..**..*..**...

correct output
2
2
2
2
3
...

user output
[157, 87, 152, 34]
2
[117, 192, 133, 233]
2
[102, 95, 95, 123]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 8

Group: 2, 5

Verdict:

input
250 250 250
**..**..****.****.*.***.***..*...

correct output
2
3
3
3
3
...

user output
[67, 216, 202, 61]
2
[27, 2, 145, 206]
-1
[126, 117, 31, 127]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 9

Group: 3, 4, 5

Verdict:

input
40 40 200000
...*.**.*..*.............*.*.....

correct output
2
2
2
2
2
...

user output
[25, 28, 2, 25]
2
[10, 24, 22, 38]
2
[4, 22, 29, 9]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 10

Group: 3, 4, 5

Verdict:

input
40 40 200000
**.**..*.*.*.******....****.*....

correct output
2
1
3
2
2
...

user output
[10, 26, 34, 30]
2
[3, 39, 3, 35]
1
[12, 6, 30, 10]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 11

Group: 3, 4, 5

Verdict:

input
40 40 200000
.*.*.**.*****.***.*.****.**.**...

correct output
3
3
3
3
3
...

user output
[8, 5, 19, 33]
2
[9, 37, 25, 22]
2
[8, 36, 16, 12]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 12

Group: 4, 5

Verdict:

input
80 80 200000
*....**.***..****...*.....*......

correct output
2
2
2
2
2
...

user output
[55, 9, 27, 28]
2
[54, 12, 74, 68]
2
[57, 44, 66, 21]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 13

Group: 4, 5

Verdict:

input
80 80 200000
.***.*..*.***..*****....**...*...

correct output
3
2
2
3
2
...

user output
[14, 39, 2, 43]
-1
[66, 62, 7, 65]
2
[45, 18, 4, 39]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 14

Group: 4, 5

Verdict:

input
80 80 200000
*******.*****.*..*..****...***...

correct output
2
3
1
2
2
...

user output
[4, 8, 7, 35]
2
[49, 6, 80, 28]
2
[17, 56, 57, 56]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 15

Group: 5

Verdict:

input
250 250 200000
*....*..*..*..**..*.........**...

correct output
3
2
2
2
2
...

user output
[54, 21, 175, 23]
2
[226, 61, 186, 98]
2
[25, 211, 2, 190]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 16

Group: 5

Verdict:

input
250 250 200000
..*....*..*......*.**.*.*..***...

correct output
2
2
2
2
2
...

user output
[182, 119, 109, 14]
2
[179, 29, 53, 55]
2
[235, 113, 158, 136]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 17

Group: 5

Verdict:

input
250 250 200000
*..*.*****.*********.****.****...

correct output
3
3
2
2
2
...

user output
[197, 60, 167, 204]
-1
[207, 155, 189, 247]
2
[162, 129, 12, 112]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 18

Group: 5

Verdict:

input
250 250 200000
*********.**********.******.**...

correct output
3
3
3
3
3
...

user output
[79, 234, 74, 114]
-1
[186, 104, 122, 75]
-1
[200, 177, 234, 36]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 19

Group: 5

Verdict:

input
250 250 200000
.*****************************...

correct output
104
422
145
93
65
...

user output
[56, 195, 82, 169]
-1
[132, 120, 14, 237]
-1
[138, 138, 77, 174]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 20

Group: 5

Verdict:

input
250 250 200000
..****************************...

correct output
57
155
38
65
98
...

user output
[74, 177, 46, 46]
-1
[133, 134, 212, 41]
-1
[48, 204, 223, 30]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 21

Group: 5

Verdict:

input
250 250 200000
.*****************************...

correct output
498
498
498
498
498
...

user output
[1, 1, 250, 250]

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 22

Group: 1, 2, 3, 4, 5

Verdict:

input
10 1 10
*
*
.
*
...

correct output
0
1
1
0
0
...

user output
[3, 1, 3, 1]
0
[10, 1, 3, 1]
1
[10, 1, 3, 1]
...

Feedback: Output is longer than expected

Test 23

Group: 1, 2, 3, 4, 5

Verdict:

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
[1, 7, 1, 10]
1
[1, 4, 1, 7]
1
[1, 5, 1, 1]
...

Feedback: Output is longer than expected

Test 24

Group: 5

Verdict:

input
250 1 200000
*
.
*
.
...

correct output
1
1
1
1
1
...

user output
[47, 1, 107, 1]
1
[189, 1, 242, 1]
1
[197, 1, 98, 1]
...

Feedback: Output is longer than expected

Test 25

Group: 5

Verdict:

input
1 250 200000
*.*.*...*.*.**.***..**.*.*..**...

correct output
1
1
1
1
1
...

user output
[1, 4, 1, 105]
1
[1, 12, 1, 96]
1
[1, 232, 1, 104]
...

Feedback: Output is longer than expected

Test 26

Group: 5

Verdict:

input
250 250 200000
.................................

correct output
2
2
2
2
2
...

user output
[153, 178, 150, 54]
2
[1, 201, 44, 42]
2
[21, 46, 166, 130]
...

Error:
Traceback (most recent call last):
  File "input/code.py", line 24, in <module>
    elif temp2[3] in posqwers[temp2[0]] or temp2[1] in posqwers[temp2[2]]:
IndexError: list index out of range

Test 27

Group: 5

Verdict:

input
250 250 200000
******************************...

correct output
0
0
0
0
0
...

user output
[250, 250, 250, 250]
0
[250, 250, 250, 250]
0
[250, 250, 250, 250]
...

Feedback: Output is longer than expected