QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#536418 | #8680. Turning Red | qiuzx | AC ✓ | 173ms | 55068kb | C++20 | 2.2kb | 2024-08-29 11:33:34 | 2024-08-29 11:33:34 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 51ms
memory: 22880kb
input:
200000 171004 RGRGBBBGGBRRRBBRRBRBBGRRRGGGGRRRRGBBBRGGGBGGRGGRGRRBRBRRGGBGGGGBRBRBRRBRBRGRRGRBRRBGRRRRBRBBBRGBBBGRRBRGRRGGRGGBGRBGRBRGBBRRBBBGBGRGBBRBGGGGBBBBRBRRRGBGRRBBGGGRRBRBBRGRBGRBRGGBRBBBBRGGRRRBGRBGRBRRRGRGRRBRGRRGRRGBBBBRGGBBRRBGGBGBGRBRGBGGRRGRBRRGGRGRBBBRRBBRRGGRRRRGBRGGGGGGRGBRGRBBBGRBBG...
output:
impossible
result:
ok single line: 'impossible'
Test #2:
score: 0
Accepted
time: 2ms
memory: 9096kb
input:
10 0 RRRRRRRRRR
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 0ms
memory: 10480kb
input:
10 0 GGGGGGGGGG
output:
impossible
result:
ok single line: 'impossible'
Test #4:
score: 0
Accepted
time: 0ms
memory: 9424kb
input:
10 0 BBBBBBBBBB
output:
impossible
result:
ok single line: 'impossible'
Test #5:
score: 0
Accepted
time: 2ms
memory: 10092kb
input:
10 0 RGBRGBRGBR
output:
impossible
result:
ok single line: 'impossible'
Test #6:
score: 0
Accepted
time: 2ms
memory: 9608kb
input:
10 0 GBBRRRBRGB
output:
impossible
result:
ok single line: 'impossible'
Test #7:
score: 0
Accepted
time: 0ms
memory: 10804kb
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: 3ms
memory: 11100kb
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: 47ms
memory: 21340kb
input:
200000 10000 RBBBBGRRGGRBRGRGBBRBGGRGRGRBBRRRGRGRGRBGRBBBBGBGBBGGBBGGGGBRGBBBBBBRRGBBGGGRBBBGBRGGGRRGGGGBGBGBGRBBGGRRRGGGRGGRBRRBGRGRBBGBGGRGBBRBBBGGRGBBGBBBBBGRGBGGRGBGGBGRRBGBBGRBGBGGRBBBGBBBGGGBBBRBBGRRRBGBBRBRBBGRGGGBBRGRRRGRRRRGRRBGBRRRRGBBRBBGRRRRBRBRRRGBGRGGBGRBRBGBBRRGBBRBBBGBGGGBBRGRBRRGBBR...
output:
impossible
result:
ok single line: 'impossible'
Test #10:
score: 0
Accepted
time: 45ms
memory: 21408kb
input:
200000 49974 GRBRRGBRRRRRGBRBGRRBGGGRRRRBGGBBBGRRGBBRBGBRBRRBRBBRGRBGGBBGBBRRRBGGBRBRRGBRRRBRRGRGRGRBGRBGBBBGGGRGRBGRGGRBBRBRGGBRBBRRGGGRBGBGBGRBRBRGGBBBRBBRGRRBBGBGRBBRBBBRGGGGRRBGBBRGBGBGGBRBGGRGGGBRRRBBBGRRRRGBBBGBBGRRRBGRGGGRGBRGBGRBBRBRRBGGRGBBRGBBBRGRBBBRRGGRRRGGRRRGRRBGGGBGRRGBRRRRRGRGBGGRRRR...
output:
impossible
result:
ok single line: 'impossible'
Test #11:
score: 0
Accepted
time: 48ms
memory: 23592kb
input:
200000 97963 GRBBRBGGGBGBBGRBBBRGRGBBBGBRBGBGGGBRBBGRGRRBRRGBRRBBGRRGBRRGBBRBGRRRGRGRRRBGBBRGGBRRBBBGRBBGBBRRRGRRGRGRRRBBRGBRRRRRGGGGGBGRRBGRGGBBBBRBBRBBBBBBRRRGBGGRGRGRBBRRBGBRRBBRGBGRBRBRGBRRGBRBGGRGGGGBGGGRBBRGRGGBBGRRGRBGGRBGRBBBRRGGRGGBRRBBRGGRBRBBGRRRGGGBRBRGBRBRBBGGBRGRBBRGGBBBGGBGRRRRRRGGGBR...
output:
impossible
result:
ok single line: 'impossible'
Test #12:
score: 0
Accepted
time: 64ms
memory: 44472kb
input:
200000 400000 GRGBBBRRGGRGBBRBBGBRRRBBRBRGRGRRBBRBRGRBRGGRRGGBRGRRBRBRRBRRGGBBGRBBGRRRBRBGBBRBGBRBBBBBBGBRGRBBGRGBGBBGRGBGBBBBGRGRRRGGGBGGGGRBRBRBRRBGGBGRRGBGGGRRBBBGRBRBGGBBRBBGRGGBGRGBGRRGGBRGGRGRGGBGBRBBBRGGBRRRRBGRBGRRGBRBRGRRBBGGGRRGRGGBRBBBBRGBBGRGGBGGRBGGRBRBBRBBBGRGGGGGBGGRRBBGRGGGRGBRBGGGGR...
output:
200051
result:
ok single line: '200051'
Test #13:
score: 0
Accepted
time: 3ms
memory: 10020kb
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: 165ms
memory: 52692kb
input:
200000 199999 BRGBBBRBBGGRRGBGRBGBRRGGGBRGGBBGRRRGGBRBBGRBGGBGRGBGBRBGGRBRRGBRBGRBGGGRRGGBGGBBBBBRRGRRRRBGRBGGGBBGGGRGRRGRGRGBGRBBBGGRGRRRRGRGGGGGGGBBBBGRGRGGRBRGRGBBBRRBGRGRGGBGRBRRRRGBBRBBGBGRRRGBRRRBRRGBBBRRBGRBRRBGBGBGGRBBRRGGRRRBBRRGBRGRRGBRRGRRGGRGRRRRGBGRBBRRGRRBRRBBRGBRRBRGGRRBBBRGRGBBGGBRRR...
output:
199855
result:
ok single line: '199855'
Test #15:
score: 0
Accepted
time: 146ms
memory: 55068kb
input:
200000 199999 BRGGGBBBGGRBGGBRGGGBBBBBBBRRGBBBGBBRBGGBGGGBGBBGBBGRBRRGGRRBBGGBRRGBRGBBBGGGRBRRRBRBBBRGBRRBRRGBGBRGBGRGGGGBBRGGRRGBGGBBGBBRBGRRBRBRGGBBRRRGBBGRRBRRBRGGGBBGGRGRGGGBGGGRBRGGRBGGGGBBRBRRBRRGRBBRBGGBBBGRGRBGRRBGGRRRBRBRGGGBGGRBGBBBRGGRRRRBGRGRBGGRBGBBBGBBRRRGGRGBRRRBRGRRRGGGRRRBGRRGGRBRBR...
output:
impossible
result:
ok single line: 'impossible'
Test #16:
score: 0
Accepted
time: 161ms
memory: 54924kb
input:
200000 200000 RRBBBGRBBGRBGBBRRGGBRBBGGBRGRBGBGBBBRBBGGBGRGBBRBRGBGRRGBBBGBGRRRBGRGBBGBBRGBRGBGGBBGBRRRRRRBBRBGGBGGRBBRBBBRBBBRRRGGGGRGBBBRBBGRRBRBBRBBGGRRRGGBRGRRRGRBBRGGGGRBGGBBGGRRRBGBBGBBRGRBRGRBGBRBGBGGGBBGGRBRRGBBRRGRBGBRBRRBBGGBGGRBGRGGGRRGGBGRRBBRBRRGGBRGGRGRBBRRRRBBRBGRBBBRGGGRGRGBGRGRGBRGR...
output:
199859
result:
ok single line: '199859'
Test #17:
score: 0
Accepted
time: 173ms
memory: 52488kb
input:
200000 200000 RRRRBRRGGGGGGRBBBGRRGBBRRBGRRBRRGRRBGGRGBRBGBRGGBRRBBGGGRGRGRGBGRBRGRBBGBRRBRRBGGGRBGBRGBBGGRGBRGGRBGBGGRBGGRGGGGRGGGGRRRGBBGRBRRGBRRBGRBBBRRBGRGRGBBGRRBBRBBGGRBRBGRBGBGBRRGGGBBGGBGRRGRRBGGBBRGGBRGRGBGGGRBBBRGRRGRBGRRGGGRBRGGGGRRGGRGGRBGRGBRBGBBRGBGRGBBBGRRGRGGBBBRBGGRGBRGRBGRRRRBBGRGR...
output:
200292
result:
ok single line: '200292'
Test #18:
score: 0
Accepted
time: 3ms
memory: 12400kb
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: 86ms
memory: 42696kb
input:
200000 199999 BRRGBGBBGRGBGRGRGRBRRGBGBRRGBBBRGBBBRBBRRRGRRRBBRBGGRRGBBBGRRRBBBRBBRRBRRBBBGGGBRRRBRBGRBGRBRGGBGRBRGGGBGRGRGBBBRGGRRRBBBGBGGRRGRBRBBBBRRGBGRBRBGRGBRGRGRBRBGRGBRBRGBBBRGGGGGBRRGBRBBBGBRGRRGBRBGBBRBGGRGRGBBGRGRBGRRGBRGRBGRBBRBGRBRBRRBBBGGGBBGGBGBGGBGBBRRGGGGRBRBGBGBBGRBGRGRBBBBRGRGBBGRG...
output:
200007
result:
ok single line: '200007'
Test #20:
score: 0
Accepted
time: 80ms
memory: 37536kb
input:
200000 199999 RBRGBRGRRGRBGGBGRRRGBGRBRRBGGBRBGBRGRGRRRBBRRRRRRGGBBGRGRGBGRGRBBBRBGRBBGGGRBBRRGBRGGRRGBRGGRBRRRGRGRRRBGRRRBRGBRBBBRGGRGRRGGRBGGRBRRGBGGGBGGBRGBGGBBRRBRRRRGBBBRGBRBGBBGRBRGGBBBBRGRGGBRBRRGGBRGBGBRBGBGBGGBRRGRGGRRGRBRRRBGGBGRBGRGRGGGBRGRGRRBBGRBRGRRGGBGRRBGGGRRRBGRBGRGRBBRGBBGBGRRGRBGG...
output:
impossible
result:
ok single line: 'impossible'
Test #21:
score: 0
Accepted
time: 3ms
memory: 12172kb
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: 154ms
memory: 53920kb
input:
200000 200000 RRGBBGRGBGGRBRBRRRBGGBBGGBGRBGBGRRBRRBBGBBGBBGGGGBBGBRRRGBRRBRBGGGRBRRGBGRRGBGGBBGRBRRBGBRGBBBBGGRRRGBGGBBBBRRBBGBBBBGGGRGRGBBBRRGBGRBGRBRGRRRBBRGGRRBBGRRGGGBBBBBRGGRBGBGGGGGGGRGGRRBGGBBBBBRGRRBBBRRGGGBGRGRGGRBGRRBGBBRBGRGBBGRGBBGRGGRGRRRBGGGRRBRGRGGRRGRGBBBGBGBBBBBRGBBBRBGGGGGBRGBBBRG...
output:
impossible
result:
ok single line: 'impossible'
Test #23:
score: 0
Accepted
time: 145ms
memory: 54704kb
input:
200000 200000 RRRGGRBRRBBRBBGBGGGBBBGGBGRRGRGBBGBGBRBRGGGBGRGRGGBGGGRBRRGBGGBRGRBBBBBRGRRRRBRRRBRRRGRGRBBGRGGBGBRRBGRRGRGRBGGRBRBBRRBBBBBBBBGBBBRGBGRRBRGBBBBRGBBBRGBGGRBRRBBRGRGGRRGGRRGGBRGBBGRGGGGRBRGRGGBGRRGGBBBGRGBBBBGBGRBGBBBBBRRRGRGBBBBBBRRBGRRBRRBGGBRRGBBRRBRBRBRBBBGGRBBGRRGRBGRRBGBGRBRBRRRGGR...
output:
impossible
result:
ok single line: 'impossible'
Test #24:
score: 0
Accepted
time: 23ms
memory: 18760kb
input:
60000 50000 BRGGGRGRRGGGGBBBGGBGRGGRGBGBGRGBBBBRGGRBRBGRBRGBGRBBRRRBRRGGRGBBBRGRBRBRBRBBBBGBGRGGBRRGGBGBGBGBGBGGRBRRGRRGBGGGBBRBBGGGRRGRBBBBBGGBBGRBBBGBGGRRRRRGRBGRRRRBGRBRRBBGRRBGRBGRGGGGBBGGRGRBGRRRRRGGRRBRRRBRBRBRBBRGBRGBRRBRGBGBRRGRBRBRRRBBGGRGGRRBGRRBBGGBRRBBBBRRRGBRRBRBRGGBGBGGGGBBGGGRBGRGRGBB...
output:
30280
result:
ok single line: '30280'
Test #25:
score: 0
Accepted
time: 22ms
memory: 19184kb
input:
54937 54937 GGGRGBGRRRRRBGBBRGRBBGBGBRRRBBGGBGGRBBGRBRGBGRBBGGGRBBGGGBRGRGRRRGRRGGGBGGRBRBGBGRGRGRGGGBGRRBRBGBBBGRRRGBRBGGGGGRBGGGRRGRRBBGGGGGBRGBBGGRBGRGRBRGBRRGGRGGBRRBGRBRRBBGGGRBGBRRRRBGBGRRBRGBRRRBRRGGRRGBBGBBGBGRGGRBRGRGRBGBGGRRRRGGGRGGRGRRGBGRBBGBRBGBRGGBBGBGGBRBBGBBBGGRRGGBBBBRRBGRGGRRBGRRRR...
output:
54911
result:
ok single line: '54911'
Test #26:
score: 0
Accepted
time: 67ms
memory: 45048kb
input:
200000 400000 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
output:
0
result:
ok single line: '0'
Test #27:
score: 0
Accepted
time: 62ms
memory: 43452kb
input:
200000 400000 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...
output:
400000
result:
ok single line: '400000'
Test #28:
score: 0
Accepted
time: 77ms
memory: 44540kb
input:
200000 400000 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...
output:
200000
result:
ok single line: '200000'
Test #29:
score: 0
Accepted
time: 47ms
memory: 22960kb
input:
200000 10 BBBRBBBRRGRBRRRRBGBRBRRRGBBBRGRGGGGRGBGGGGRGRBBGGRGBBBRRRBBRBGGRRGBBRRRRGRRBGGRBBGBBBGBGGRGRGGGRRGGRRBRBGGRBBRBRRGRRRGGRGBBRRBGRGRBRRRGRBRRGRGBBRGGBBBRBBRRBGBGRBGGBBGGBBGRBGGBBGBRRRGBRBGRGBBBRBRBRBBRRRGBGBRRGRRRBGBGGGRGBGGGGRBGBBBRRGRGBRGRGRRGRGRBGBGGBGGGBRGRBBBBRBRBRBBGGBRRRGBGBGRRRGBBRRG...
output:
impossible
result:
ok single line: 'impossible'
Extra Test:
score: 0
Extra Test Passed