QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#659757#8680. Turning RedZhaoZiLongAC ✓200ms41580kbC++203.9kb2024-10-19 21:49:402024-10-19 21:49:40

詳細信息

Test #1:

score: 100
Accepted
time: 46ms
memory: 21052kb

input:

200000 171004
RGRGBBBGGBRRRBBRRBRBBGRRRGGGGRRRRGBBBRGGGBGGRGGRGRRBRBRRGGBGGGGBRBRBRRBRBRGRRGRBRRBGRRRRBRBBBRGBBBGRRBRGRRGGRGGBGRBGRBRGBBRRBBBGBGRGBBRBGGGGBBBBRBRRRGBGRRBBGGGRRBRBBRGRBGRBRGGBRBBBBRGGRRRBGRBGRBRRRGRGRRBRGRRGRRGBBBBRGGBBRRBGGBGBGRBRGBGGRRGRBRRGGRGRBBBRRBBRRGGRRRRGBRGGGGGGRGBRGRBBBGRBBG...

output:

impossible

result:

ok single line: 'impossible'

Test #2:

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

input:

10 0
RRRRRRRRRR

output:

0

result:

ok single line: '0'

Test #3:

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

input:

10 0
GGGGGGGGGG

output:

impossible

result:

ok single line: 'impossible'

Test #4:

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

input:

10 0
BBBBBBBBBB

output:

impossible

result:

ok single line: 'impossible'

Test #5:

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

input:

10 0
RGBRGBRGBR

output:

impossible

result:

ok single line: 'impossible'

Test #6:

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

input:

10 0
GBBRRRBRGB

output:

impossible

result:

ok single line: 'impossible'

Test #7:

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

input:

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

output:

impossible

result:

ok single line: 'impossible'

Test #8:

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

input:

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

output:

5

result:

ok single line: '5'

Test #9:

score: 0
Accepted
time: 42ms
memory: 15516kb

input:

200000 10000
RBBBBGRRGGRBRGRGBBRBGGRGRGRBBRRRGRGRGRBGRBBBBGBGBBGGBBGGGGBRGBBBBBBRRGBBGGGRBBBGBRGGGRRGGGGBGBGBGRBBGGRRRGGGRGGRBRRBGRGRBBGBGGRGBBRBBBGGRGBBGBBBBBGRGBGGRGBGGBGRRBGBBGRBGBGGRBBBGBBBGGGBBBRBBGRRRBGBBRBRBBGRGGGBBRGRRRGRRRRGRRBGBRRRRGBBRBBGRRRRBRBRRRGBGRGGBGRBRBGBBRRGBBRBBBGBGGGBBRGRBRRGBBR...

output:

impossible

result:

ok single line: 'impossible'

Test #10:

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

input:

200000 49974
GRBRRGBRRRRRGBRBGRRBGGGRRRRBGGBBBGRRGBBRBGBRBRRBRBBRGRBGGBBGBBRRRBGGBRBRRGBRRRBRRGRGRGRBGRBGBBBGGGRGRBGRGGRBBRBRGGBRBBRRGGGRBGBGBGRBRBRGGBBBRBBRGRRBBGBGRBBRBBBRGGGGRRBGBBRGBGBGGBRBGGRGGGBRRRBBBGRRRRGBBBGBBGRRRBGRGGGRGBRGBGRBBRBRRBGGRGBBRGBBBRGRBBBRRGGRRRGGRRRGRRBGGGBGRRGBRRRRRGRGBGGRRRR...

output:

impossible

result:

ok single line: 'impossible'

Test #11:

score: 0
Accepted
time: 39ms
memory: 18264kb

input:

200000 97963
GRBBRBGGGBGBBGRBBBRGRGBBBGBRBGBGGGBRBBGRGRRBRRGBRRBBGRRGBRRGBBRBGRRRGRGRRRBGBBRGGBRRBBBGRBBGBBRRRGRRGRGRRRBBRGBRRRRRGGGGGBGRRBGRGGBBBBRBBRBBBBBBRRRGBGGRGRGRBBRRBGBRRBBRGBGRBRBRGBRRGBRBGGRGGGGBGGGRBBRGRGGBBGRRGRBGGRBGRBBBRRGGRGGBRRBBRGGRBRBBGRRRGGGBRBRGBRBRBBGGBRGRBBRGGBBBGGBGRRRRRRGGGBR...

output:

impossible

result:

ok single line: 'impossible'

Test #12:

score: 0
Accepted
time: 65ms
memory: 41492kb

input:

200000 400000
GRGBBBRRGGRGBBRBBGBRRRBBRBRGRGRRBBRBRGRBRGGRRGGBRGRRBRBRRBRRGGBBGRBBGRRRBRBGBBRBGBRBBBBBBGBRGRBBGRGBGBBGRGBGBBBBGRGRRRGGGBGGGGRBRBRBRRBGGBGRRGBGGGRRBBBGRBRBGGBBRBBGRGGBGRGBGRRGGBRGGRGRGGBGBRBBBRGGBRRRRBGRBGRRGBRBRGRRBBGGGRRGRGGBRBBBBRGBBGRGGBGGRBGGRBRBBRBBBGRGGGGGBGGRRBBGRGGGRGBRBGGGGR...

output:

200051

result:

ok single line: '200051'

Test #13:

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

input:

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

output:

12

result:

ok single line: '12'

Test #14:

score: 0
Accepted
time: 166ms
memory: 33500kb

input:

200000 199999
BRGBBBRBBGGRRGBGRBGBRRGGGBRGGBBGRRRGGBRBBGRBGGBGRGBGBRBGGRBRRGBRBGRBGGGRRGGBGGBBBBBRRGRRRRBGRBGGGBBGGGRGRRGRGRGBGRBBBGGRGRRRRGRGGGGGGGBBBBGRGRGGRBRGRGBBBRRBGRGRGGBGRBRRRRGBBRBBGBGRRRGBRRRBRRGBBBRRBGRBRRBGBGBGGRBBRRGGRRRBBRRGBRGRRGBRRGRRGGRGRRRRGBGRBBRRGRRBRRBBRGBRRBRGGRRBBBRGRGBBGGBRRR...

output:

199855

result:

ok single line: '199855'

Test #15:

score: 0
Accepted
time: 187ms
memory: 35972kb

input:

200000 199999
BRGGGBBBGGRBGGBRGGGBBBBBBBRRGBBBGBBRBGGBGGGBGBBGBBGRBRRGGRRBBGGBRRGBRGBBBGGGRBRRRBRBBBRGBRRBRRGBGBRGBGRGGGGBBRGGRRGBGGBBGBBRBGRRBRBRGGBBRRRGBBGRRBRRBRGGGBBGGRGRGGGBGGGRBRGGRBGGGGBBRBRRBRRGRBBRBGGBBBGRGRBGRRBGGRRRBRBRGGGBGGRBGBBBRGGRRRRBGRGRBGGRBGBBBGBBRRRGGRGBRRRBRGRRRGGGRRRBGRRGGRBRBR...

output:

impossible

result:

ok single line: 'impossible'

Test #16:

score: 0
Accepted
time: 195ms
memory: 35676kb

input:

200000 200000
RRBBBGRBBGRBGBBRRGGBRBBGGBRGRBGBGBBBRBBGGBGRGBBRBRGBGRRGBBBGBGRRRBGRGBBGBBRGBRGBGGBBGBRRRRRRBBRBGGBGGRBBRBBBRBBBRRRGGGGRGBBBRBBGRRBRBBRBBGGRRRGGBRGRRRGRBBRGGGGRBGGBBGGRRRBGBBGBBRGRBRGRBGBRBGBGGGBBGGRBRRGBBRRGRBGBRBRRBBGGBGGRBGRGGGRRGGBGRRBBRBRRGGBRGGRGRBBRRRRBBRBGRBBBRGGGRGRGBGRGRGBRGR...

output:

199859

result:

ok single line: '199859'

Test #17:

score: 0
Accepted
time: 160ms
memory: 32636kb

input:

200000 200000
RRRRBRRGGGGGGRBBBGRRGBBRRBGRRBRRGRRBGGRGBRBGBRGGBRRBBGGGRGRGRGBGRBRGRBBGBRRBRRBGGGRBGBRGBBGGRGBRGGRBGBGGRBGGRGGGGRGGGGRRRGBBGRBRRGBRRBGRBBBRRBGRGRGBBGRRBBRBBGGRBRBGRBGBGBRRGGGBBGGBGRRGRRBGGBBRGGBRGRGBGGGRBBBRGRRGRBGRRGGGRBRGGGGRRGGRGGRBGRGBRBGBBRGBGRGBBBGRRGRGGBBBRBGGRGBRGRBGRRRRBBGRGR...

output:

200292

result:

ok single line: '200292'

Test #18:

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

input:

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

output:

12

result:

ok single line: '12'

Test #19:

score: 0
Accepted
time: 83ms
memory: 31688kb

input:

200000 199999
BRRGBGBBGRGBGRGRGRBRRGBGBRRGBBBRGBBBRBBRRRGRRRBBRBGGRRGBBBGRRRBBBRBBRRBRRBBBGGGBRRRBRBGRBGRBRGGBGRBRGGGBGRGRGBBBRGGRRRBBBGBGGRRGRBRBBBBRRGBGRBRBGRGBRGRGRBRBGRGBRBRGBBBRGGGGGBRRGBRBBBGBRGRRGBRBGBBRBGGRGRGBBGRGRBGRRGBRGRBGRBBRBGRBRBRRBBBGGGBBGGBGBGGBGBBRRGGGGRBRBGBGBBGRBGRGRBBBBRGRGBBGRG...

output:

200007

result:

ok single line: '200007'

Test #20:

score: 0
Accepted
time: 61ms
memory: 27428kb

input:

200000 199999
RBRGBRGRRGRBGGBGRRRGBGRBRRBGGBRBGBRGRGRRRBBRRRRRRGGBBGRGRGBGRGRBBBRBGRBBGGGRBBRRGBRGGRRGBRGGRBRRRGRGRRRBGRRRBRGBRBBBRGGRGRRGGRBGGRBRRGBGGGBGGBRGBGGBBRRBRRRRGBBBRGBRBGBBGRBRGGBBBBRGRGGBRBRRGGBRGBGBRBGBGBGGBRRGRGGRRGRBRRRBGGBGRBGRGRGGGBRGRGRRBBGRBRGRRGGBGRRBGGGRRRBGRBGRGRBBRGBBGBGRRGRBGG...

output:

impossible

result:

ok single line: 'impossible'

Test #21:

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

input:

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

output:

impossible

result:

ok single line: 'impossible'

Test #22:

score: 0
Accepted
time: 200ms
memory: 36272kb

input:

200000 200000
RRGBBGRGBGGRBRBRRRBGGBBGGBGRBGBGRRBRRBBGBBGBBGGGGBBGBRRRGBRRBRBGGGRBRRGBGRRGBGGBBGRBRRBGBRGBBBBGGRRRGBGGBBBBRRBBGBBBBGGGRGRGBBBRRGBGRBGRBRGRRRBBRGGRRBBGRRGGGBBBBBRGGRBGBGGGGGGGRGGRRBGGBBBBBRGRRBBBRRGGGBGRGRGGRBGRRBGBBRBGRGBBGRGBBGRGGRGRRRBGGGRRBRGRGGRRGRGBBBGBGBBBBBRGBBBRBGGGGGBRGBBBRG...

output:

impossible

result:

ok single line: 'impossible'

Test #23:

score: 0
Accepted
time: 186ms
memory: 36348kb

input:

200000 200000
RRRGGRBRRBBRBBGBGGGBBBGGBGRRGRGBBGBGBRBRGGGBGRGRGGBGGGRBRRGBGGBRGRBBBBBRGRRRRBRRRBRRRGRGRBBGRGGBGBRRBGRRGRGRBGGRBRBBRRBBBBBBBBGBBBRGBGRRBRGBBBBRGBBBRGBGGRBRRBBRGRGGRRGGRRGGBRGBBGRGGGGRBRGRGGBGRRGGBBBGRGBBBBGBGRBGBBBBBRRRGRGBBBBBBRRBGRRBRRBGGBRRGBBRRBRBRBRBBBGGRBBGRRGRBGRRBGBGRBRBRRRGGR...

output:

impossible

result:

ok single line: 'impossible'

Test #24:

score: 0
Accepted
time: 27ms
memory: 11768kb

input:

60000 50000
BRGGGRGRRGGGGBBBGGBGRGGRGBGBGRGBBBBRGGRBRBGRBRGBGRBBRRRBRRGGRGBBBRGRBRBRBRBBBBGBGRGGBRRGGBGBGBGBGBGGRBRRGRRGBGGGBBRBBGGGRRGRBBBBBGGBBGRBBBGBGGRRRRRGRBGRRRRBGRBRRBBGRRBGRBGRGGGGBBGGRGRBGRRRRRGGRRBRRRBRBRBRBBRGBRGBRRBRGBGBRRGRBRBRRRBBGGRGGRRBGRRBBGGBRRBBBBRRRGBRRBRBRGGBGBGGGGBBGGGRBGRGRGBB...

output:

30280

result:

ok single line: '30280'

Test #25:

score: 0
Accepted
time: 18ms
memory: 10696kb

input:

54937 54937
GGGRGBGRRRRRBGBBRGRBBGBGBRRRBBGGBGGRBBGRBRGBGRBBGGGRBBGGGBRGRGRRRGRRGGGBGGRBRBGBGRGRGRGGGBGRRBRBGBBBGRRRGBRBGGGGGRBGGGRRGRRBBGGGGGBRGBBGGRBGRGRBRGBRRGGRGGBRRBGRBRRBBGGGRBGBRRRRBGBGRRBRGBRRRBRRGGRRGBBGBBGBGRGGRBRGRGRBGBGGRRRRGGGRGGRGRRGBGRBBGBRBGBRGGBBGBGGBRBBGBBBGGRRGGBBBBRRBGRGGRRBGRRRR...

output:

54911

result:

ok single line: '54911'

Test #26:

score: 0
Accepted
time: 65ms
memory: 41460kb

input:

200000 400000
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

output:

0

result:

ok single line: '0'

Test #27:

score: 0
Accepted
time: 74ms
memory: 41552kb

input:

200000 400000
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...

output:

400000

result:

ok single line: '400000'

Test #28:

score: 0
Accepted
time: 70ms
memory: 41580kb

input:

200000 400000
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

200000

result:

ok single line: '200000'

Test #29:

score: 0
Accepted
time: 32ms
memory: 15596kb

input:

200000 10
BBBRBBBRRGRBRRRRBGBRBRRRGBBBRGRGGGGRGBGGGGRGRBBGGRGBBBRRRBBRBGGRRGBBRRRRGRRBGGRBBGBBBGBGGRGRGGGRRGGRRBRBGGRBBRBRRGRRRGGRGBBRRBGRGRBRRRGRBRRGRGBBRGGBBBRBBRRBGBGRBGGBBGGBBGRBGGBBGBRRRGBRBGRGBBBRBRBRBBRRRGBGBRRGRRRBGBGGGRGBGGGGRBGBBBRRGRGBRGRGRRGRGRBGBGGBGGGBRGRBBBBRBRBRBBGGBRRRGBGBGRRRGBBRRG...

output:

impossible

result:

ok single line: 'impossible'

Extra Test:

score: 0
Extra Test Passed