QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#78403#5516. Modern Machinehydd25 540ms65756kbC++148.9kb2023-02-18 17:29:512023-02-18 17:29:54

詳細信息

Subtask #1:

score: 3
Accepted

Test #1:

score: 3
Accepted
time: 4ms
memory: 21888kb

input:

3 1
BBR
3
1
1 1

output:

0

result:

ok single line: '0'

Test #2:

score: 0
Accepted
time: 3ms
memory: 24028kb

input:

3 10
BBB
3 3 3 1 3 3 3 3 3 1
1
2 5

output:

2

result:

ok single line: '2'

Test #3:

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

input:

10 1
RBBBBRRBBR
9
1
1 1

output:

3

result:

ok single line: '3'

Test #4:

score: 0
Accepted
time: 4ms
memory: 34180kb

input:

10 10
RRRBBRRBRB
5 9 4 6 7 7 4 3 8 2
1
1 10

output:

1

result:

ok single line: '1'

Test #5:

score: 0
Accepted
time: 3ms
memory: 42344kb

input:

300 300
BRRRRBBRBRBRBBBRBRRRBRBBRBBRRBBRBBRBRBRBRBBRRBBRBBRBBBBRRRRBRBRBBBBRBBBRBBRBBRBRBRRBRBBRRRRBRBBRRRBRRBRBBBRRRRBRRRBBBBRRBBRBBBRRRBRBBRBRBBRRBRBRRRBRBRBBBBRRBRBRRRRRBRRRRRBRRRBRBRRRRRBBBRRBBRBBRRRRBBBBRBRBBBRRRRBBBBBBBBBBRBRRBRBBRRRRBRBBRRRBBRBRRRBBRBRRBBRBBBBRBRBRBBBRBBRBRBBRBBRBRBRBRRRBBBBR...

output:

29

result:

ok single line: '29'

Test #6:

score: 0
Accepted
time: 4ms
memory: 42440kb

input:

300 300
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

149

result:

ok single line: '149'

Test #7:

score: 0
Accepted
time: 1ms
memory: 25956kb

input:

5 2
RBRBB
2 5
1
1 2

output:

4

result:

ok single line: '4'

Subtask #2:

score: 12
Accepted

Dependency #1:

100%
Accepted

Test #8:

score: 12
Accepted
time: 1ms
memory: 48824kb

input:

7000 7000
RRBRRRRRRBBRBRBRRRBRRRBRRRRBRBRBRBRBBBRBRRRBBBRBBBBBBRBBBRRBRBRBBRRRBBBBRRBBRBBRBBRRRBBRRBRBRRRRRBBRRBRBBBRBBRRRRBRBBBBRBBBBBBRRRBRBRBBRBRRBBBBBRRBBBBBBRBBBRRBBRRBBBBBBRBRBRBBRBBRBBBRRBRBBRBBBBBRBRRBRRBRRRBRBBBBBRRBRBRRBRRRRBBBBRRBBRRRRRBBBBBRRBBBBBBRRBBRBRRRRRRRBRRBRRBBBBBBBBRRRRBBRRRRRRR...

output:

5505

result:

ok single line: '5505'

Test #9:

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

input:

7000 7000
RRBRRRBBRRBBRBBBBRBRBRRBBBBBBBBBBRRRBRRBBRRRRBBRRBRRRRRBBRBBBBBRRBBBBRBBBBRBRBBBBBRBBRRRBBBBRRBRRBRRBRBBBRRRRBBRRBRRBRBBRBBBRBBBRRBRBBBRRBBBBBRBBRBRBRBBBBRRBBBRRRRBRRBBRBRBBBBBBRRRRRBBRRBBRRBBBRBBBRRRRRBRBBRBRBBRRBBRBRRRBBRRBBBRRBRRRRRRRBBRBRRBRBRBRBRBRBBRBRRBRBBBBBBBRRBRRRBBBBRRBBRRRBBRBR...

output:

5936

result:

ok single line: '5936'

Test #10:

score: 0
Accepted
time: 4ms
memory: 48768kb

input:

7000 7000
RBBRBRBRRRBBRBRRBRBBRBRRRBRBBBRBBRBRBRBRRBBBBRBRRRBBRRRRBBRRRRBBRBRBRRRRBBRRBBRBRBBBRBBBBBRBBRBBRRBBRRRRRBBRBRBRRBBRRRBRBBBRBRRBRRRBRRRBRBBBBRBBBBBBRBRRRBRRRBRBBBRBRRBBRRBRRBBBBBRBBRRRRBBRRBBBBRRBRBRRRRBBRRRRRBRBRRBBRRRRRBRRBRBBBBRRBBBBRBRRRBBRBRRRRRBRRBRRRBRRBRRRRRBBBRBBBRBRRRBRBBBBRRRRRR...

output:

6260

result:

ok single line: '6260'

Test #11:

score: 0
Accepted
time: 3ms
memory: 48744kb

input:

7000 7000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

output:

3499

result:

ok single line: '3499'

Test #12:

score: 0
Accepted
time: 1ms
memory: 50712kb

input:

7000 7000
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

3906

result:

ok single line: '3906'

Subtask #3:

score: 10
Accepted

Dependency #2:

100%
Accepted

Test #13:

score: 10
Accepted
time: 22ms
memory: 58396kb

input:

120000 120000
BBBBRBBRBRRBRRRBBBRRRRRBRRRRRRRRRRRBBBBRBRBBBBBBRBRBBBRBBRBRRBBRBRRRBRBBBBBRBRRBBRRRRRBBRBBBBRBBRRBRRRRBRBBBRRRBBBRRBRRBBBRRRBRRRBBRBBRRRBBBRBBRBBBBBRBRRRRBBRBRBRBBRRRRRRRBBRRBBBBRRRBBRRRRRBBBBRBBBBRBRRBBBRBRBBBRBRBRRBBRBRBBBRRBBRBBBBRBBRRBRBRBRBRRBBRBBBBBBBRRRRBRBRBRBRRRRBRRBBBRBRRBRB...

output:

110620
106126
106019
110676
111965

result:

ok 5 lines

Test #14:

score: 0
Accepted
time: 16ms
memory: 59928kb

input:

120000 120000
BRRBBBRRRRRRRBRRRRRRRBBRBBRRBBRRRRRBRBRRBRRRRRBRRBBBBRRBRRRBBBBRRBRBRBBBRBBRRBRRRBRRBRBBBBRRRBRBRBRBBBBRBRRRBRBBRBBBRRBBBRBBBBRRBBRRBBRBRRRBBBRBBBRRRRBBBBBRRRRBBBBBBBRRRRRRRBBBRRRBBRRRRBBBRBBBRRBBBRRRRRRRRRRRRRBRRBRRBRBRRBBBBBBRRRRBRRBRBBBBRRBRRRRRBRRBRRRBBRRRBBRRRRRBRBRRRRBBBBBBBRBRRR...

output:

96348
101002
105432
99656
104213

result:

ok 5 lines

Test #15:

score: 0
Accepted
time: 15ms
memory: 59388kb

input:

120000 120000
BRBRRBBBRBRBRRRRBRRRRBBRBRBBBBBBBRBBRRBRRRRRBRRRRBBBRRRBBRRBBRRBBBRBRRRBBRRRBBRRBRRRRRBRRBRBRBRRRRBRRRRBRBRBRRRBBBBRBBRRBRBRRBBRRBBBBRBRRRBRRRRBBBRBBRBBRRBBBBBBBBRBBBBRRBBBRRBRRRRRRBBRBRBRRRBBRRRRBBBBRBBBRBRBRBRBBRRRBBBBBBRRRRRRBRBBRRRRBRBBBRBBRBRRRRBBBRRRBBRBRRBBBRBRRBRRRRRRRBBRRRBRRB...

output:

21951
100124
2164
9705
84183

result:

ok 5 lines

Test #16:

score: 0
Accepted
time: 29ms
memory: 60656kb

input:

120000 120000
BBRBRRRRRBRRBBBBBRBRRBRRBBRBRRBBBBBBBBRRRBBBBRRBRRRBRBBBRRRBRBBRRBBBBBBBRBBRBBBBRBBBBBRRRRRRBBBRRRBRRRRRBRRBRBBRBBBRBBRRBRRRRRRRRRBRRRRBRRRBBRRBBBBRBBRBBBBRRBRRBBBRRRRRBRBRBRRRRRRRBRRBBBBBRRBBRRRBBRBBBRBBBRBRBRRRBBBBRRBRBBBRRRBBRBBBBBRBRRBBBRRRBRBRRRRRRBBRRRBRBBBBRRRBBBRBBBRBBRRRRRBBBR...

output:

1538
12691
15538
71544
59943

result:

ok 5 lines

Test #17:

score: 0
Accepted
time: 22ms
memory: 58368kb

input:

120000 120000
RRBRBBBRRBRBBBBRRBRBBRRRBRRBRBBBRRBBBBBRBRRBRBBRRRRBRBRRBRBRBRBRBRRRBBRRRRRBBBRRBRBBRRBRBRRBRRBBBBBBRBRRBBBBBBRBBBRBBRRRRBBRBBRRRBRBRRBBBRRRBBRBRBBBRBRBBRRRBBBBRRBBRRBRBBBBRRBBRRRRRRRBBRBRBBBRBRBRBBRBBRRRBBBRBRBRBBBBRBBRBBBRRBRRRRRBRBRBBRRRRRRBBBRBBRRRRRRRRRRBBBBRRBBRRBBRBRRBRRRBBRBRRR...

output:

40188
86078
5895
13418
41515

result:

ok 5 lines

Test #18:

score: 0
Accepted
time: 14ms
memory: 59860kb

input:

120000 120000
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

92747
92740
60010
68177
92504

result:

ok 5 lines

Test #19:

score: 0
Accepted
time: 13ms
memory: 62120kb

input:

120000 120000
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

24163
77301
16491
24538
26597

result:

ok 5 lines

Test #20:

score: 0
Accepted
time: 13ms
memory: 59496kb

input:

120000 120000
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

21975
61282
31752
20423
27041

result:

ok 5 lines

Subtask #4:

score: 0
Time Limit Exceeded

Test #21:

score: 11
Accepted
time: 168ms
memory: 63708kb

input:

10 120000
RRRRRRRRRR
9 1 9 6 1 9 6 10 3 2 6 4 2 5 7 10 8 9 2 6 7 10 2 9 7 5 9 9 2 7 4 1 8 3 3 6 9 4 7 9 6 8 8 2 5 6 8 3 9 2 5 2 5 9 8 4 8 3 2 2 5 1 9 1 7 9 9 4 9 5 2 10 7 4 3 8 1 10 7 6 6 2 3 8 7 8 5 9 2 2 1 10 2 2 5 4 2 5 9 1 8 4 5 1 2 8 3 10 10 6 7 2 1 5 10 1 9 10 1 7 3 10 8 10 6 8 3 1 10 9 10 5 5...

output:

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

result:

ok 120000 lines

Test #22:

score: 0
Accepted
time: 265ms
memory: 65756kb

input:

10 120000
RRRRRRRRRR
5 3 4 3 3 4 3 7 7 7 6 9 4 10 10 9 9 7 8 8 9 4 8 9 5 8 4 8 8 6 4 10 9 4 8 6 3 1 7 8 1 7 5 5 1 6 4 5 1 1 9 1 5 6 9 7 4 5 8 10 3 2 3 10 2 9 8 3 3 5 5 9 5 7 10 6 2 6 9 10 5 3 1 6 2 8 1 1 3 9 3 6 9 7 6 8 8 4 7 9 8 8 6 6 7 7 8 4 9 5 9 9 3 4 8 1 6 6 10 7 2 10 8 10 5 4 5 8 7 5 5 7 2 9 8...

output:

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

result:

ok 120000 lines

Test #23:

score: -11
Time Limit Exceeded

input:

10 120000
RRRRRRRRRR
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 ...

output:


result:


Subtask #5:

score: 0
Wrong Answer

Test #26:

score: 0
Wrong Answer
time: 540ms
memory: 65024kb

input:

120000 120000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

output:

23441
85217
55120
85435
90828
27927
63967
41321
97520
63588
53976
9031
23460
86914
85688
112911
68792
102907
14973
38475
71931
17922
62077
53185
57121
43774
12583
21332
82917
28259
92209
28023
51606
65188
44768
34904
96969
18999
3653
3865
42795
86270
55638
108702
7871
68493
109086
40077
60406
38299
...

result:

wrong answer 12th lines differ - expected: '9028', found: '9031'

Subtask #6:

score: 0
Time Limit Exceeded

Test #30:

score: 0
Time Limit Exceeded

input:

120000 120000
RRBBRBRBBBRBRRBRBRRRBRBRRBRRRBBRBBBBBBRBBRBRBRBRRBRBRBRRRBRBBBBRRBBRRBBRRRBRRBRBBRRRBBBRRBBBBRBBBRBBBRBBBRBBRBBBBRBBBBRRBRRRRRRRBRRRBRBBBRBBBBRBBRBRBRRBBRRBRBBBBRBBBRBBRRBBBBRBBBBRBRRBRBBRBBBBRRBBBBBBRBBRBBBBBBRBBRRRRRBBBRBBBRBRRBBRBRBRBBRRBRRBBBRBRBRRRBBRRBBRRRRBRRBBRRBBBBBBBRBBBRBBBR...

output:


result:


Subtask #7:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%