CSES - Datatähti 2024 alku - Results
Submission details
Task:Lumimyrsky
Sender:your mama
Submission time:2023-10-30 20:07:41 +0200
Language:Python3 (CPython3)
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.02 sdetails
#20.02 sdetails
#30.02 sdetails
#40.02 sdetails
#50.02 sdetails
#60.02 sdetails
#70.02 sdetails
#80.02 sdetails
#90.02 sdetails
#100.02 sdetails
#110.02 sdetails

Code

from sys import setrecursionlimit
setrecursionlimit(1000000000)
n,m=map(int,input().split())
a=[[]for i in range(n+1)]
for i in range(m):
    x,y=map(int,input().split())
    a[x].append(y)
vierailtu=[False for i in range(n+1)]
count=0
def dfs(z):
    global count
    if z==n:
        count+=1
        return
    vierailtu[z]=True
    for i in a[z]:
        dfs(i)
dfs(1)
print(count)

Test details

Test 1

Verdict:

input
0 0 1 1 1 2 2 2 1 0
0 1 2 3 2 2 3 0 1 1

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...

Test 2

Verdict:

input
1 1 1 1 1 1 1 1 0 1
1 0 0 0 1 0 1 0 0 0

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...

Test 3

Verdict:

input
1 2 2 2 0 0 0 2 0 0
0 1 0 1 1 2 1 2 1 2

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...

Test 4

Verdict:

input
4 2 0 10 6 10 4 5 4 3
3 1 2 7 6 1 3 5 2 6

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...

Test 5

Verdict:

input
6 0 7 9 3 1 5 6 9 4
9 0 1 0 2 2 0 1 4 7

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...

Test 6

Verdict:

input
10 9 6 1 10 9 7 6 7 6
2 1 10 2 0 7 2 9 4 6

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...

Test 7

Verdict:

input
22 5 87 83 20 36 92 98 49 9
61 40 77 35 52 49 29 100 18 81

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...

Test 8

Verdict:

input
90 95 33 21 82 6 4 37 10 99
60 10 53 61 42 53 33 48 62 83

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...

Test 9

Verdict:

input
7 22 78 32 44 98 73 46 98 31
54 26 50 8 7 42 27 1 50 53

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...

Test 10

Verdict:

input
88 1 97 24 87 38 53 82 23 42
1 61 43 77 40 40 52 88 48 93

correct output
2

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...

Test 11

Verdict:

input
1 36 50 50 50 0 13 31 14 1
22 88 42 13 25 13 8 39 34 49

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 3, in <module>
    n,...