QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#634612#7039. Counting Failures on a TrieHuangHanShengAC ✓2976ms34404kbC++203.8kb2024-10-12 17:44:142024-10-12 17:44:15

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1
5 10 5
0 a
0 b
1 a
1 c
2 a
aaacbaacab
1 5
1 6
1 7
3 9
4 10

output:

2 2
2 5
3 0
2 1
4 0

result:

ok 5 lines

Test #2:

score: 0
Accepted
time: 936ms
memory: 22664kb

input:

1000
1000 1000 1000
0 a
1 a
2 b
3 a
4 b
5 a
6 b
7 b
8 a
9 b
10 b
11 b
12 b
13 b
14 b
15 a
16 a
17 b
18 a
19 a
20 b
21 a
22 b
23 a
24 b
25 a
26 b
27 b
28 b
29 b
30 a
31 b
32 a
33 a
34 a
35 b
36 b
37 b
38 a
39 a
40 b
41 a
42 b
43 a
44 b
45 b
46 a
47 a
48 a
49 a
50 b
51 b
52 a
53 b
54 b
55 a
56 a
57 b
...

output:

59 546
43 328
141 219
5 449
132 391
42 0
147 271
58 0
38 328
123 154
99 3
46 227
23 3
38 2
146 491
15 5
141 6
8 154
9 175
150 272
163 175
119 393
172 391
63 2
165 4
36 503
78 744
16 602
61 999
81 219
116 1
96 0
158 602
53 999
176 0
82 449
108 0
87 744
33 1
74 0
2 5
13 154
60 328
136 709
68 3
56 491
...

result:

ok 1000000 lines

Test #3:

score: 0
Accepted
time: 2976ms
memory: 34404kb

input:

10
100000 100000 100000
0 a
1 b
2 b
3 b
4 b
5 b
6 b
7 b
8 b
9 a
10 b
11 a
12 a
13 a
14 b
15 b
16 b
17 b
18 a
19 a
20 b
21 a
22 b
23 a
24 b
25 a
26 b
27 a
28 b
29 a
30 a
31 b
32 b
33 a
34 a
35 a
36 a
37 a
38 b
39 b
40 b
41 b
42 b
43 b
44 a
45 a
46 a
47 a
48 a
49 b
50 b
51 b
52 a
53 a
54 b
55 a
56 b
5...

output:

307 77
696 39
292 33
1101 72778
797 7
923 59
530 22
175 7
751 2
641 23
999 54
771 60
1031 19
736 10
1828 25
1223 49
1119 8
1360 1
1010 25
186 10
634 11
1898 60
515 138
67 44
698 25
678 104
585 7
1179 34332
643 6
551 31
758 8
474 13
763 25
1042 85
1385 21
248 56
712 7
161 12
650 1
883 276
155 21
110 ...

result:

ok 1000000 lines

Test #4:

score: 0
Accepted
time: 2853ms
memory: 33392kb

input:

10
100000 100000 100000
0 a
1 b
2 a
3 b
4 b
5 a
6 b
7 a
8 b
9 b
10 a
11 b
12 a
13 b
14 b
15 a
16 b
17 a
18 b
19 b
20 a
21 b
22 a
23 b
24 b
25 a
26 b
27 a
28 b
29 b
30 a
31 b
32 a
33 b
34 b
35 a
36 b
37 a
38 b
39 b
40 a
41 b
42 a
43 b
44 b
45 a
46 b
47 a
48 b
49 b
50 a
51 b
52 a
53 b
54 b
55 a
56 b
5...

output:

1 5257
2 30770
1 27739
1 51805
2 6968
2 78118
1 7789
1 45259
2 35890
2 40254
2 908
1 10889
0 71302
2 10214
1 37077
2 18525
1 54529
1 25673
0 20925
1 35947
2 27976
2 28747
1 38487
1 15732
1 11502
2 33825
0 2153
2 64539
0 30535
1 70629
2 32885
0 58060
2 925
2 62115
1 10023
2 66651
1 21139
2 66936
0 28...

result:

ok 1000000 lines