QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#107924#2827. AutobiographyZhaoZiLongWA 155ms9980kbC++111.2kb2023-05-23 09:54:462023-05-23 09:54:48

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 9888kb

input:

5 4
bbobo
1 3
2 3
3 4
4 5
4 6
bobo
1 2
1 3
1 4
2 3
2 4
3 4
4 0
bobo

output:

2
4
0

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 155ms
memory: 9980kb

input:

4 4
oobo
2 3
4 1
4 3
3 1
4 3
obob
1 4
2 3
1 2
4 4
obob
3 1
2 3
2 1
1 4
4 3
bboo
2 4
4 1
3 4
4 3
bbbo
1 4
1 3
4 2
4 4
obbo
3 4
2 4
2 3
3 1
4 3
bobo
2 3
4 3
1 4
4 3
obbb
3 4
4 2
1 4
4 5
bobo
4 1
2 1
3 1
4 3
2 4
4 4
obbo
3 4
3 1
2 3
1 4
4 3
bobb
4 2
4 1
2 3
4 3
obbo
3 1
3 2
1 2
4 4
ooob
2 1
3 1
3 4
1 4...

output:

0
1
1
0
0
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
4
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
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
4
1
0
0
0
0
4
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
...

result:

ok 50000 lines

Test #3:

score: -100
Wrong Answer
time: 77ms
memory: 9508kb

input:

8 13
bbooboob
8 3
8 4
1 3
1 8
4 2
2 6
4 5
1 5
6 4
7 1
2 3
2 7
5 8
5 8
bbbob
3 1
2 4
1 4
1 2
2 5
4 3
4 5
5 1
13 16
ooboooobboobb
5 4
9 6
9 13
9 2
11 4
11 9
5 7
1 9
2 5
12 3
2 8
8 11
10 11
4 9
11 12
4 13
20 17
bbbobobobooobooobooo
13 9
16 9
10 17
6 8
4 9
1 4
3 19
7 17
2 18
17 9
18 8
14 19
6 11
9 15
4 ...

output:

25
0
20
8
9
6
0
18
30
4
48
3
3
0
49
6
10
10
6
4
6
4
6
2
4
4
0
4
16
6
8
6
6
12
4
12
10
12
0
3
6
16
0
6
20
20
0
3
6
1
0
8
24
20
6
12
5
12
12
12
9
6
0
3
3
0
12
0
6
0
4
0
49
2
6
25
3
20
20
2
4
6
4
9
20
0
12
2
4
8
12
0
12
5
3
40
12
8
0
0
0
20
25
36
0
12
4
4
3
36
8
2
32
2
4
3
45
9
0
0
3
20
6
0
0
8
15
4
15...

result:

wrong answer 1st lines differ - expected: '22', found: '25'