QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#515278#4885. Triangular Cactus PathsMaMengQiWA 90ms45860kbC++205.9kb2024-08-11 16:45:412024-08-11 16:45:42

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 14580kb

input:

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

output:

1
0
1
2
1
0

result:

ok 6 numbers

Test #2:

score: 0
Accepted
time: 0ms
memory: 13460kb

input:

2 1
1 2
8
1 1 0
1 1 1
1 2 0
1 2 1
2 1 0
2 1 1
2 2 0
2 2 1

output:

1
0
0
1
0
1
1
0

result:

ok 8 numbers

Test #3:

score: 0
Accepted
time: 40ms
memory: 13284kb

input:

50 70
41 24
9 15
29 19
21 11
1 14
5 27
34 48
10 32
34 49
46 3
22 33
34 39
16 30
22 45
7 16
25 30
43 17
22 44
5 25
41 49
29 32
39 25
10 4
45 27
13 38
29 7
3 35
14 30
50 2
8 11
13 35
18 26
34 40
38 36
7 19
12 3
25 26
30 42
21 8
12 46
44 33
14 31
47 2
25 46
20 19
49 24
15 43
18 25
13 36
27 22
4 32
30 3...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
3
0
0
0
0
0
4
0
0
15
5
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
10
2
0
0
0
0
0
6
0
0
0
0
0
0
0
0
7
0
0
0
0
3
0
6
0
0
0
0
7
0
6
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
15
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 200000 numbers

Test #4:

score: 0
Accepted
time: 2ms
memory: 14668kb

input:

99 147
26 66
27 92
75 90
91 64
69 15
70 61
52 59
3 86
41 99
47 71
26 43
99 83
43 80
42 69
4 75
66 71
68 38
31 57
5 91
74 2
90 4
32 11
1 31
77 5
76 8
12 60
79 42
48 89
22 14
36 76
45 91
43 65
99 86
69 16
85 11
19 28
15 52
49 85
84 68
28 85
93 68
16 15
42 9
71 51
72 92
84 2
13 50
9 44
97 78
11 60
98 3...

output:

0
0
0
231867712
1176
13983816
0
838535532
57966928
0
259558945
995677382
49
58518925
231867712
0
0
0
0
699660129
0
18424
0
0
0
0
425254360
596115770
0
0
0
0
435689908
0
0
578343994
351113550
0
0
1
186830027
578343994
211876
0
596115770
0
186830027
0
58518925
0
1906884
304945365
0
304945365
0
1
0
0
2...

result:

ok 99 numbers

Test #5:

score: -100
Wrong Answer
time: 90ms
memory: 45860kb

input:

199999 299997
46838 7499
94674 132821
113340 39783
26895 102985
48012 197970
142680 5947
103806 184307
136126 111090
130225 128927
158116 75097
24205 199579
53104 138584
43659 53794
139767 62161
93131 22718
129300 168198
49873 179193
194655 168999
113749 118408
37725 48137
151840 84343
111148 8100
1...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

wrong answer 1st numbers differ - expected: '712824194', found: '0'