QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#523393 | #8680. Turning Red | ucup-team1005# | AC ✓ | 131ms | 32608kb | C++20 | 2.2kb | 2024-08-18 10:04:11 | 2024-08-18 10:04:11 |
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: 111ms
memory: 28720kb
input:
200000 171004 RGRGBBBGGBRRRBBRRBRBBGRRRGGGGRRRRGBBBRGGGBGGRGGRGRRBRBRRGGBGGGGBRBRBRRBRBRGRRGRBRRBGRRRRBRBBBRGBBBGRRBRGRRGGRGGBGRBGRBRGBBRRBBBGBGRGBBRBGGGGBBBBRBRRRGBGRRBBGGGRRBRBBRGRBGRBRGGBRBBBBRGGRRRBGRBGRBRRRGRGRRBRGRRGRRGBBBBRGGBBRRBGGBGBGRBRGBGGRRGRBRRGGRGRBBBRRBBRRGGRRRRGBRGGGGGGRGBRGRBBBGRBBG...
output:
impossible
result:
ok single line: 'impossible'
Test #2:
score: 0
Accepted
time: 1ms
memory: 5736kb
input:
10 0 RRRRRRRRRR
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 1ms
memory: 7712kb
input:
10 0 GGGGGGGGGG
output:
impossible
result:
ok single line: 'impossible'
Test #4:
score: 0
Accepted
time: 1ms
memory: 5808kb
input:
10 0 BBBBBBBBBB
output:
impossible
result:
ok single line: 'impossible'
Test #5:
score: 0
Accepted
time: 1ms
memory: 7712kb
input:
10 0 RGBRGBRGBR
output:
impossible
result:
ok single line: 'impossible'
Test #6:
score: 0
Accepted
time: 1ms
memory: 9808kb
input:
10 0 GBBRRRBRGB
output:
impossible
result:
ok single line: 'impossible'
Test #7:
score: 0
Accepted
time: 1ms
memory: 9904kb
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: 1ms
memory: 9820kb
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: 86ms
memory: 20700kb
input:
200000 10000 RBBBBGRRGGRBRGRGBBRBGGRGRGRBBRRRGRGRGRBGRBBBBGBGBBGGBBGGGGBRGBBBBBBRRGBBGGGRBBBGBRGGGRRGGGGBGBGBGRBBGGRRRGGGRGGRBRRBGRGRBBGBGGRGBBRBBBGGRGBBGBBBBBGRGBGGRGBGGBGRRBGBBGRBGBGGRBBBGBBBGGGBBBRBBGRRRBGBBRBRBBGRGGGBBRGRRRGRRRRGRRBGBRRRRGBBRBBGRRRRBRBRRRGBGRGGBGRBRBGBBRRGBBRBBBGBGGGBBRGRBRRGBBR...
output:
impossible
result:
ok single line: 'impossible'
Test #10:
score: 0
Accepted
time: 90ms
memory: 22048kb
input:
200000 49974 GRBRRGBRRRRRGBRBGRRBGGGRRRRBGGBBBGRRGBBRBGBRBRRBRBBRGRBGGBBGBBRRRBGGBRBRRGBRRRBRRGRGRGRBGRBGBBBGGGRGRBGRGGRBBRBRGGBRBBRRGGGRBGBGBGRBRBRGGBBBRBBRGRRBBGBGRBBRBBBRGGGGRRBGBBRGBGBGGBRBGGRGGGBRRRBBBGRRRRGBBBGBBGRRRBGRGGGRGBRGBGRBBRBRRBGGRGBBRGBBBRGRBBBRRGGRRRGGRRRGRRBGGGBGRRGBRRRRRGRGBGGRRRR...
output:
impossible
result:
ok single line: 'impossible'
Test #11:
score: 0
Accepted
time: 96ms
memory: 24996kb
input:
200000 97963 GRBBRBGGGBGBBGRBBBRGRGBBBGBRBGBGGGBRBBGRGRRBRRGBRRBBGRRGBRRGBBRBGRRRGRGRRRBGBBRGGBRRBBBGRBBGBBRRRGRRGRGRRRBBRGBRRRRRGGGGGBGRRBGRGGBBBBRBBRBBBBBBRRRGBGGRGRGRBBRRBGBRRBBRGBGRBRBRGBRRGBRBGGRGGGGBGGGRBBRGRGGBBGRRGRBGGRBGRBBBRRGGRGGBRRBBRGGRBRBBGRRRGGGBRBRGBRBRBBGGBRGRBBRGGBBBGGBGRRRRRRGGGBR...
output:
impossible
result:
ok single line: 'impossible'
Test #12:
score: 0
Accepted
time: 108ms
memory: 31364kb
input:
200000 400000 GRGBBBRRGGRGBBRBBGBRRRBBRBRGRGRRBBRBRGRBRGGRRGGBRGRRBRBRRBRRGGBBGRBBGRRRBRBGBBRBGBRBBBBBBGBRGRBBGRGBGBBGRGBGBBBBGRGRRRGGGBGGGGRBRBRBRRBGGBGRRGBGGGRRBBBGRBRBGGBBRBBGRGGBGRGBGRRGGBRGGRGRGGBGBRBBBRGGBRRRRBGRBGRRGBRBRGRRBBGGGRRGRGGBRBBBBRGBBGRGGBGGRBGGRBRBBRBBBGRGGGGGBGGRRBBGRGGGRGBRBGGGGR...
output:
200051
result:
ok single line: '200051'
Test #13:
score: 0
Accepted
time: 2ms
memory: 9820kb
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: 123ms
memory: 29292kb
input:
200000 199999 BRGBBBRBBGGRRGBGRBGBRRGGGBRGGBBGRRRGGBRBBGRBGGBGRGBGBRBGGRBRRGBRBGRBGGGRRGGBGGBBBBBRRGRRRRBGRBGGGBBGGGRGRRGRGRGBGRBBBGGRGRRRRGRGGGGGGGBBBBGRGRGGRBRGRGBBBRRBGRGRGGBGRBRRRRGBBRBBGBGRRRGBRRRBRRGBBBRRBGRBRRBGBGBGGRBBRRGGRRRBBRRGBRGRRGBRRGRRGGRGRRRRGBGRBBRRGRRBRRBBRGBRRBRGGRRBBBRGRGBBGGBRRR...
output:
199855
result:
ok single line: '199855'
Test #15:
score: 0
Accepted
time: 126ms
memory: 30764kb
input:
200000 199999 BRGGGBBBGGRBGGBRGGGBBBBBBBRRGBBBGBBRBGGBGGGBGBBGBBGRBRRGGRRBBGGBRRGBRGBBBGGGRBRRRBRBBBRGBRRBRRGBGBRGBGRGGGGBBRGGRRGBGGBBGBBRBGRRBRBRGGBBRRRGBBGRRBRRBRGGGBBGGRGRGGGBGGGRBRGGRBGGGGBBRBRRBRRGRBBRBGGBBBGRGRBGRRBGGRRRBRBRGGGBGGRBGBBBRGGRRRRBGRGRBGGRBGBBBGBBRRRGGRGBRRRBRGRRRGGGRRRBGRRGGRBRBR...
output:
impossible
result:
ok single line: 'impossible'
Test #16:
score: 0
Accepted
time: 129ms
memory: 29056kb
input:
200000 200000 RRBBBGRBBGRBGBBRRGGBRBBGGBRGRBGBGBBBRBBGGBGRGBBRBRGBGRRGBBBGBGRRRBGRGBBGBBRGBRGBGGBBGBRRRRRRBBRBGGBGGRBBRBBBRBBBRRRGGGGRGBBBRBBGRRBRBBRBBGGRRRGGBRGRRRGRBBRGGGGRBGGBBGGRRRBGBBGBBRGRBRGRBGBRBGBGGGBBGGRBRRGBBRRGRBGBRBRRBBGGBGGRBGRGGGRRGGBGRRBBRBRRGGBRGGRGRBBRRRRBBRBGRBBBRGGGRGRGBGRGRGBRGR...
output:
199859
result:
ok single line: '199859'
Test #17:
score: 0
Accepted
time: 128ms
memory: 28168kb
input:
200000 200000 RRRRBRRGGGGGGRBBBGRRGBBRRBGRRBRRGRRBGGRGBRBGBRGGBRRBBGGGRGRGRGBGRBRGRBBGBRRBRRBGGGRBGBRGBBGGRGBRGGRBGBGGRBGGRGGGGRGGGGRRRGBBGRBRRGBRRBGRBBBRRBGRGRGBBGRRBBRBBGGRBRBGRBGBGBRRGGGBBGGBGRRGRRBGGBBRGGBRGRGBGGGRBBBRGRRGRBGRRGGGRBRGGGGRRGGRGGRBGRGBRBGBBRGBGRGBBBGRRGRGGBBBRBGGRGBRGRBGRRRRBBGRGR...
output:
200292
result:
ok single line: '200292'
Test #18:
score: 0
Accepted
time: 2ms
memory: 11864kb
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: 131ms
memory: 28916kb
input:
200000 199999 BRRGBGBBGRGBGRGRGRBRRGBGBRRGBBBRGBBBRBBRRRGRRRBBRBGGRRGBBBGRRRBBBRBBRRBRRBBBGGGBRRRBRBGRBGRBRGGBGRBRGGGBGRGRGBBBRGGRRRBBBGBGGRRGRBRBBBBRRGBGRBRBGRGBRGRGRBRBGRGBRBRGBBBRGGGGGBRRGBRBBBGBRGRRGBRBGBBRBGGRGRGBBGRGRBGRRGBRGRBGRBBRBGRBRBRRBBBGGGBBGGBGBGGBGBBRRGGGGRBRBGBGBBGRBGRGRBBBBRGRGBBGRG...
output:
200007
result:
ok single line: '200007'
Test #20:
score: 0
Accepted
time: 124ms
memory: 25132kb
input:
200000 199999 RBRGBRGRRGRBGGBGRRRGBGRBRRBGGBRBGBRGRGRRRBBRRRRRRGGBBGRGRGBGRGRBBBRBGRBBGGGRBBRRGBRGGRRGBRGGRBRRRGRGRRRBGRRRBRGBRBBBRGGRGRRGGRBGGRBRRGBGGGBGGBRGBGGBBRRBRRRRGBBBRGBRBGBBGRBRGGBBBBRGRGGBRBRRGGBRGBGBRBGBGBGGBRRGRGGRRGRBRRRBGGBGRBGRGRGGGBRGRGRRBBGRBRGRRGGBGRRBGGGRRRBGRBGRGRBBRGBBGBGRRGRBGG...
output:
impossible
result:
ok single line: 'impossible'
Test #21:
score: 0
Accepted
time: 2ms
memory: 9748kb
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: 126ms
memory: 27296kb
input:
200000 200000 RRGBBGRGBGGRBRBRRRBGGBBGGBGRBGBGRRBRRBBGBBGBBGGGGBBGBRRRGBRRBRBGGGRBRRGBGRRGBGGBBGRBRRBGBRGBBBBGGRRRGBGGBBBBRRBBGBBBBGGGRGRGBBBRRGBGRBGRBRGRRRBBRGGRRBBGRRGGGBBBBBRGGRBGBGGGGGGGRGGRRBGGBBBBBRGRRBBBRRGGGBGRGRGGRBGRRBGBBRBGRGBBGRGBBGRGGRGRRRBGGGRRBRGRGGRRGRGBBBGBGBBBBBRGBBBRBGGGGGBRGBBBRG...
output:
impossible
result:
ok single line: 'impossible'
Test #23:
score: 0
Accepted
time: 125ms
memory: 28280kb
input:
200000 200000 RRRGGRBRRBBRBBGBGGGBBBGGBGRRGRGBBGBGBRBRGGGBGRGRGGBGGGRBRRGBGGBRGRBBBBBRGRRRRBRRRBRRRGRGRBBGRGGBGBRRBGRRGRGRBGGRBRBBRRBBBBBBBBGBBBRGBGRRBRGBBBBRGBBBRGBGGRBRRBBRGRGGRRGGRRGGBRGBBGRGGGGRBRGRGGBGRRGGBBBGRGBBBBGBGRBGBBBBBRRRGRGBBBBBBRRBGRRBRRBGGBRRGBBRRBRBRBRBBBGGRBBGRRGRBGRRBGBGRBRBRRRGGR...
output:
impossible
result:
ok single line: 'impossible'
Test #24:
score: 0
Accepted
time: 32ms
memory: 13644kb
input:
60000 50000 BRGGGRGRRGGGGBBBGGBGRGGRGBGBGRGBBBBRGGRBRBGRBRGBGRBBRRRBRRGGRGBBBRGRBRBRBRBBBBGBGRGGBRRGGBGBGBGBGBGGRBRRGRRGBGGGBBRBBGGGRRGRBBBBBGGBBGRBBBGBGGRRRRRGRBGRRRRBGRBRRBBGRRBGRBGRGGGGBBGGRGRBGRRRRRGGRRBRRRBRBRBRBBRGBRGBRRBRGBGBRRGRBRBRRRBBGGRGGRRBGRRBBGGBRRBBBBRRRGBRRBRBRGGBGBGGGGBBGGGRBGRGRGBB...
output:
30280
result:
ok single line: '30280'
Test #25:
score: 0
Accepted
time: 29ms
memory: 16588kb
input:
54937 54937 GGGRGBGRRRRRBGBBRGRBBGBGBRRRBBGGBGGRBBGRBRGBGRBBGGGRBBGGGBRGRGRRRGRRGGGBGGRBRBGBGRGRGRGGGBGRRBRBGBBBGRRRGBRBGGGGGRBGGGRRGRRBBGGGGGBRGBBGGRBGRGRBRGBRRGGRGGBRRBGRBRRBBGGGRBGBRRRRBGBGRRBRGBRRRBRRGGRRGBBGBBGBGRGGRBRGRGRBGBGGRRRRGGGRGGRGRRGBGRBBGBRBGBRGGBBGBGGBRBBGBBBGGRRGGBBBBRRBGRGGRRBGRRRR...
output:
54911
result:
ok single line: '54911'
Test #26:
score: 0
Accepted
time: 123ms
memory: 32608kb
input:
200000 400000 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
output:
0
result:
ok single line: '0'
Test #27:
score: 0
Accepted
time: 122ms
memory: 30580kb
input:
200000 400000 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG...
output:
400000
result:
ok single line: '400000'
Test #28:
score: 0
Accepted
time: 123ms
memory: 31732kb
input:
200000 400000 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...
output:
200000
result:
ok single line: '200000'
Test #29:
score: 0
Accepted
time: 72ms
memory: 22208kb
input:
200000 10 BBBRBBBRRGRBRRRRBGBRBRRRGBBBRGRGGGGRGBGGGGRGRBBGGRGBBBRRRBBRBGGRRGBBRRRRGRRBGGRBBGBBBGBGGRGRGGGRRGGRRBRBGGRBBRBRRGRRRGGRGBBRRBGRGRBRRRGRBRRGRGBBRGGBBBRBBRRBGBGRBGGBBGGBBGRBGGBBGBRRRGBRBGRGBBBRBRBRBBRRRGBGBRRGRRRBGBGGGRGBGGGGRBGBBBRRGRGBRGRGRRGRGRBGBGGBGGGBRGRBBBBRBRBRBBGGBRRRGBGBGRRRGBBRRG...
output:
impossible
result:
ok single line: 'impossible'
Extra Test:
score: 0
Extra Test Passed