QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#307343#8128. Alternating Pathsucup-team003#WA 341ms4116kbC++144.0kb2024-01-18 14:17:362024-01-18 14:17:37

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3976kb

input:

3
6 6
1 2
2 3
3 1
4 1
5 2
6 3
6 6
1 2
2 3
3 1
3 4
4 5
4 6
4 3
1 2
4 2
2 3

output:

RRRBBB
RBBRBB
IMPOSSIBLE

result:

ok ok (3 test cases)

Test #2:

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

input:

1
4 6
1 2
1 3
1 4
2 3
2 4
3 4

output:

RRBRRR

result:

ok ok (1 test case)

Test #3:

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

input:

1
5 6
1 2
1 3
1 5
2 4
2 5
3 4

output:

RBRBRR

result:

ok ok (1 test case)

Test #4:

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

input:

1
5 8
1 2
1 4
1 5
2 3
2 4
2 5
3 4
4 5

output:

RRBRRBBR

result:

ok ok (1 test case)

Test #5:

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

input:

1
7 12
1 2
1 3
1 6
2 3
2 5
2 7
3 4
3 5
3 6
4 6
4 7
5 7

output:

RRBRBRBRRRBB

result:

ok ok (1 test case)

Test #6:

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

input:

1
7 13
1 2
1 3
1 4
1 6
1 7
2 5
3 5
3 7
4 6
4 7
5 6
5 7
6 7

output:

BRRBRRRRRBBRR

result:

ok ok (1 test case)

Test #7:

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

input:

1
4 5
1 2
1 3
1 4
2 3
2 4

output:

RRBRR

result:

ok ok (1 test case)

Test #8:

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

input:

1
5 7
1 2
1 4
2 3
2 4
3 4
3 5
4 5

output:

RRBRRRB

result:

ok ok (1 test case)

Test #9:

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

input:

1
5 7
1 2
1 5
2 3
2 5
3 4
3 5
4 5

output:

RRBRRRB

result:

ok ok (1 test case)

Test #10:

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

input:

1
6 6
1 2
1 4
2 3
2 6
3 5
4 5

output:

RRBRRB

result:

ok ok (1 test case)

Test #11:

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

input:

1
6 10
1 2
1 3
1 5
1 6
2 4
3 4
3 5
3 6
4 5
4 6

output:

BRRBRBRRRR

result:

ok ok (1 test case)

Test #12:

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

input:

1
9 14
1 2
1 5
1 8
2 3
2 4
3 6
3 9
4 6
4 7
4 8
5 7
5 8
6 8
7 8

output:

BRRBRRBBRBBRRB

result:

ok ok (1 test case)

Test #13:

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

input:

1
7 12
1 2
1 3
1 4
1 6
1 7
2 5
2 7
3 4
3 6
3 7
4 5
5 6

output:

RBRBRRRBRBBR

result:

ok ok (1 test case)

Test #14:

score: 0
Accepted
time: 6ms
memory: 4016kb

input:

1000
2 1
2 1
2 1
1 2
2 1
2 1
2 1
2 1
2 1
1 2
2 1
1 2
2 1
1 2
2 1
1 2
2 1
1 2
2 1
1 2
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
1 2
2 1
2 1
2 1
1 2
2 1
1 2
2 1
2 1
2 1
1 2
2 1
2 1
2 1
1 2
2 1
2 1
2 1
1 2
2 1
1 2
2 1
2 1
2 1
1 2
2 1
1 2
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1...

output:

R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

result:

ok ok (1000 test cases)

Test #15:

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

input:

1000
2 1
1 2
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
2 1
2 1
1 2
2 1
1 2
2 1
1 2
2 1
2 1
2 1
1 2
2 1
2 1
2 1
2 1
2 1
1 2
2 1
2 1
2 1
1 2
2 1
1 2
2 1
2 1
2 1
2 1
2 1
1 2
2 1
1 2
2 1
1 2
2 1
2 1
2 1
1 2
2 1
2 1
2 1
1 2
2 1
1 2
2 1
1 2
2 1
2 1
2 1
1 2
2 1
2 1
2 1
2 1
2 1
1 2
2 1
1 2...

output:

R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
...

result:

ok ok (1000 test cases)

Test #16:

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

input:

1000
3 3
2 1
1 3
3 2
3 2
3 1
3 2
3 3
2 3
2 1
3 1
3 2
2 1
3 2
3 3
2 3
3 1
1 2
3 3
1 3
2 1
2 3
3 3
2 1
3 2
3 1
3 3
1 3
1 2
3 2
3 3
3 1
2 1
3 2
3 3
1 3
1 2
3 2
3 2
3 1
1 2
3 3
3 2
1 3
1 2
3 2
3 1
2 1
3 3
3 2
1 2
3 1
3 3
2 1
3 2
1 3
3 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RR
RB
...

result:

ok ok (1000 test cases)

Test #18:

score: 0
Accepted
time: 49ms
memory: 4052kb

input:

1000
4 4
2 1
4 2
3 2
1 3
4 4
2 1
1 4
2 4
2 3
4 5
1 3
2 4
1 2
1 4
3 2
4 3
3 4
1 4
4 2
4 6
1 4
3 1
4 2
1 2
4 3
3 2
4 3
1 3
4 3
2 3
4 3
3 2
4 2
2 1
4 5
1 3
2 4
4 3
2 3
1 4
4 4
1 4
3 2
3 4
2 1
4 6
3 4
4 2
2 1
4 1
1 3
3 2
4 6
4 2
1 4
2 3
4 3
2 1
3 1
4 6
4 1
3 4
3 2
3 1
2 1
4 2
4 6
4 1
2 4
2 1
1 3
3 2
3 4...

output:

RBRR
RRRB
RRRBR
IMPOSSIBLE
BRRRRR
IMPOSSIBLE
IMPOSSIBLE
RRRBR
RRBB
RRRBRR
RBRRRR
BRRRRR
BRRRRR
RRRB
BRR
RRRRRB
RRRB
RBRR
RBR
BRRRR
RRRBR
RRRB
RRBRRR
RRBRR
RRB
RRBRRR
BRRRRR
BRRRRR
RBRRRR
RRBRR
RBRRRR
BRRRR
BRR
IMPOSSIBLE
RRRB
RBRR
BRR
RRRB
RRRBRR
IMPOSSIBLE
BRR
RBRRR
IMPOSSIBLE
IMPOSSIBLE
RBRRRR
RRB...

result:

ok ok (1000 test cases)

Test #19:

score: 0
Accepted
time: 57ms
memory: 4088kb

input:

1000
4 6
4 2
4 1
3 4
3 1
1 2
3 2
4 3
4 2
3 2
1 3
4 6
4 3
1 2
2 3
1 3
2 4
4 1
4 4
2 1
3 1
4 1
3 2
4 5
2 4
1 2
1 3
4 1
3 2
4 3
2 3
2 4
1 4
4 4
1 2
3 2
1 4
2 4
4 5
2 1
1 3
3 2
4 1
4 2
4 4
1 2
4 2
3 2
4 1
4 6
2 4
3 4
3 2
3 1
4 1
1 2
4 3
1 3
2 4
3 2
4 6
4 3
4 1
2 1
4 2
3 1
3 2
4 4
1 2
4 3
1 3
2 3
4 6
3 2...

output:

RBRRRR
RBR
RRRRRB
RRBR
RRRBR
RBR
RBRR
RRRBR
RRBR
RRRRBR
RRB
RBRRRR
RBRR
RRRBRR
RBRRR
IMPOSSIBLE
RBRRRR
RRRB
RRRRB
RRBRR
RBR
RRRRB
BRRRRR
RBRRR
RRRRBR
RRRRB
RRRBR
RBRR
RBRRRR
RBBR
RRBRRR
BRRR
RRRBRR
RBR
RRBRR
IMPOSSIBLE
RBRRR
RBRR
RRRRBR
BRRR
RRBR
BRRRRR
BRR
RRRBR
BRRRRR
RRB
IMPOSSIBLE
RRRB
RBR
RRRBR...

result:

ok ok (1000 test cases)

Test #20:

score: 0
Accepted
time: 79ms
memory: 4024kb

input:

1000
5 8
5 1
4 5
2 4
3 2
2 1
5 3
1 3
3 4
5 9
2 4
4 5
5 2
1 5
3 1
3 5
4 1
4 3
1 2
5 5
1 4
3 1
1 5
5 2
4 2
5 9
1 2
5 4
4 3
4 2
4 1
5 3
1 5
5 2
2 3
5 9
3 4
3 2
2 5
3 1
4 5
5 3
4 1
1 5
4 2
5 10
3 5
2 1
2 5
5 4
1 3
4 2
1 4
5 1
2 3
4 3
5 5
3 4
5 3
5 1
5 4
2 5
5 6
1 2
2 4
1 5
3 2
3 1
3 4
5 8
4 2
4 3
1 2
1 ...

output:

BRRRRRRB
RBBBBRRRR
RRBRB
RRBRRRBBR
RBRRBRRBR
RRBRRRBBRB
RBRBR
RBBRRR
RBRRRRBR
BRRB
RRRRRRBBR
BRRRR
RRRRBR
RBBRR
BBRRRBRBRR
RBRBR
RBRRRRBRB
RRRRBR
RRRRRB
RBRBBBRRRR
IMPOSSIBLE
RBRRBRR
BRRBRB
RRBBRBRRRB
RBRRRBRRB
IMPOSSIBLE
RRRRRBRBRB
RRBRRBRR
RRRRBBRBBR
IMPOSSIBLE
RBRBRBRRRB
RRRRBBRBR
BBRBRRRRR
BRRRR...

result:

ok ok (1000 test cases)

Test #21:

score: 0
Accepted
time: 72ms
memory: 3964kb

input:

1000
5 9
3 2
5 4
4 1
4 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BBRRRBRBRR
BRRRBBRRR
RRRRRRBBRBBB
RBBRRRRRRBBB
RRRBBBBRRRRBRR
RBRRRRBBR
BBRRRRRRBBRB
RRBBBBRBRRRRRRR
RRBRRBRRBRBR
RBRRRBRBBR
BRRRRB
RRBRRRBRB
RRBRRBRRB
IMPOSSIBLE
BBRRBRRRRRRBB
IMPOSSIBLE
RBBBBRR
IMPOSSIBLE
I...

result:

ok ok (1000 test cases)

Test #23:

score: 0
Accepted
time: 139ms
memory: 3980kb

input:

1000
6 7
4 3
2 4
2 6
1 2
6 4
5 1
3 5
6 13
2 6
4 6
2 5
4 2
4 1
3 6
4 5
2 1
1 3
6 1
5 6
1 5
3 2
6 14
2 6
6 4
2 1
3 4
1 5
5 3
3 6
2 4
1 6
4 5
5 2
6 5
1 4
3 2
6 14
5 2
6 5
3 2
1 4
5 1
1 6
6 3
5 4
2 4
3 5
6 2
3 1
3 4
6 4
6 5
6 5
4 3
3 2
2 6
1 6
6 15
3 4
2 3
4 2
3 1
6 3
4 5
1 5
6 1
1 4
6 5
5 3
4 6
6 2
5 2...

output:

RRRBRRB
RBBBRRRRRBRBR
RBRBBRRRBRRBRB
RBBRBBRBBRRRRR
IMPOSSIBLE
RRRRBRRBBRBBRBR
BRBRRBRR
RRRBRRBRRBBBRRR
BRRBRBRBRBBBRR
RBRRBRRRRB
BRRRBBRRRRB
RBRRBBRR
RBBRRBRRRBBRR
RRRRBRRBBB
BRRBRR
BBRRRR
RRBRBRBRRBB
RRBRBRR
RRBRRB
BRBBRBRBRRR
RBBRRRRBBRBRRR
RRRBRBRBR
RBRBRRBRBRR
BBRRR
RRBBBRRRBR
BBRRRRR
RBRRRBBRR...

result:

ok ok (1000 test cases)

Test #24:

score: 0
Accepted
time: 139ms
memory: 3980kb

input:

1000
7 15
5 1
5 4
7 4
2 5
3 4
3 7
5 6
3 6
2 4
6 4
1 6
2 6
7 5
7 1
3 1
7 15
4 1
6 4
3 1
5 6
4 3
3 6
5 4
7 2
1 2
3 2
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RRRBBRRRRR
RRBRRRRBBBRBBRRRBR
IMPOSSIBLE
RRBRBBBRRBR
RRBRRBRRBRB
RBRRBRRRRBRB
RRBRRBBRBRRBRRBRBBRRB
BBRRRRBBRBBBRR
B...

result:

ok ok (1000 test cases)

Test #26:

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

input:

1000
8 12
1 6
7 2
7 8
5 2
8 4
8 1
8 5
2 6
1 5
3 6
4 7
8 3
8 28
2 3
5 4
8 4
8 2
4 6
1 2
6 5
2 6
5 8
7 1
1 6
2 5
3 1
7 2
4 3
3 6
8 7
4 2
5 7
8 1
5 1
3 8
7 3
4 1
7 6
5 3
6 8
4 7
8 24
1 2
5 2
1 8
7 4
2 4
4 6
8 5
8 6
2 7
8 4
2 6
1 5
6 5
3 8
4 5
3 4
5 7
1 4
2 3
6 1
8 7
5 3
3 7
8 2
8 28
7 2
7 1
7 5
3 6
3 7...

output:

BRRBRRRBRRBB
RBRRBRBBBBRRRBRRBRRBRBBBRRRR
RRBRRRBRBBBRBRBBBRRBRBBB
BBRRBBRRRRRBBRBRRBBRBRRRBRRR
RRRRBBBR
RRRRBRBRRBRBRBRRBBBB
RRBBBRRRRRRRBRBRBBBBRBBB
BRBRRRRRBRB
RRBBRBRRRBB
RRRRBRBBRRBBBRRR
RBRBRBRRRRBBRRBBRBBRB
RBBRRRRRRRBBBBBBRBRBR
RRBRRRRBB
BRRRBRRRRB
RRBRBRRBRBRBRRBBRB
BBRRRRBBBRRRRBBRBBR
BBBR...

result:

ok ok (1000 test cases)

Test #27:

score: 0
Accepted
time: 178ms
memory: 4116kb

input:

1000
8 27
8 3
6 2
7 3
5 4
2 7
3 6
1 4
5 6
6 1
4 3
3 2
1 5
3 5
8 2
1 7
5 7
7 6
8 6
4 7
4 2
4 8
5 8
8 7
4 6
1 3
1 2
1 8
8 13
4 1
7 1
6 2
6 3
3 5
2 1
1 8
6 5
6 8
2 8
2 3
7 8
1 6
8 26
6 8
2 7
8 2
1 2
7 3
7 4
4 1
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BR
RBRRRRRBBRBRBRBR
BBRRR...

result:

ok ok (1000 test cases)

Test #29:

score: 0
Accepted
time: 146ms
memory: 4032kb

input:

1000
9 17
8 3
9 7
3 5
2 8
9 5
2 5
1 9
8 7
1 7
4 7
3 2
2 1
3 9
8 5
6 8
8 4
9 4
9 36
4 3
9 1
8 2
3 2
7 4
2 7
3 6
9 5
7 5
6 7
6 8
4 1
5 3
2 1
1 5
2 6
4 6
2 5
8 3
7 3
1 8
4 9
1 6
3 1
7 1
9 8
8 7
8 5
4 8
6 9
5 6
4 2
5 4
3 9
2 9
7 9
9 27
6 1
6 3
1 5
7 1
7 2
3 7
2 5
5 9
4 2
7 5
7 6
3 1
7 9
4 8
1 4
4 3
8 1
...

output:

BRRRBRRBRRBBRBBRB
RRRRRBBBRRBBRRRRBBRBBRBRBBRBRRRBBBRB
BBRBBRRBRBRRRRRRBBRBBBBRRRR
IMPOSSIBLE
BRBBRRBRBRBBRRR
RRBRRRBBBBRBRRBRRBBRRRRRBBB
RRRBBBRRRRBRBBRRBB
RRBRRBRRBRRBRBRRBBRBRBRRBBBBRBRBBBR
BBBRRRRBBBB
RBRBRRBRRBBRRB
BRRRBRRRRBRRBRBRRRBBRBRRBBRBRRBB
BRRBBBBBRBBR
RBBRBRBRRBBBRBBRRBRRRRRR
RBRBRRRRB...

result:

ok ok (1000 test cases)

Test #30:

score: 0
Accepted
time: 223ms
memory: 3984kb

input:

1000
10 40
7 10
6 3
1 8
5 1
5 4
9 7
1 10
10 8
9 4
3 10
2 7
7 8
4 10
2 10
6 10
3 4
1 7
5 8
5 7
1 6
7 3
2 3
3 8
9 8
6 2
3 5
7 4
1 2
2 8
9 1
2 9
5 10
6 8
10 9
3 9
6 7
4 6
2 5
6 9
6 5
10 33
9 3
6 3
2 6
3 4
8 9
10 5
7 5
10 1
8 5
7 6
3 10
3 5
9 6
5 9
9 7
3 7
10 2
9 1
4 5
4 10
3 2
4 9
4 8
3 8
2 5
4 7
8 2
8...

output:

BBBRBRBBRRRRRRRBBBRRBRRRBRBRBRBRRBBBRRBB
RBBBRRRBBBBRRBBRBBRRRBRBBRRBBRRRR
RRBBRBRRBBBRBRRRRBRBRRRBRRBBBBRR
BRRBRRBRBBRRRBBRBBBRBRRRBRBBBBRRR
RBBRRRBRRBRRRBRRBBRRRBBBBRBBRR
RBBRRBRBRBBRRRRRBRRBRRRRBBBBRB
RBBRBBRBRRRRR
RRBBRRRRBBRBRBBRBBRBBRRRRBBBBRRRBRRRBRBBB
RRBRBRRRRBRBBRRRBBB
RRRBBBRRBRBBRRBRRBBR...

result:

ok ok (1000 test cases)

Test #31:

score: 0
Accepted
time: 178ms
memory: 4016kb

input:

1000
10 24
2 7
3 9
5 2
5 1
6 4
6 5
6 10
7 9
5 7
8 1
4 7
10 8
3 7
10 7
9 1
5 9
9 2
2 4
10 1
8 2
8 6
2 1
9 4
5 4
10 42
2 1
3 8
7 3
4 6
7 1
2 5
7 5
4 1
10 9
2 10
2 3
3 5
6 7
1 9
8 5
7 8
10 5
1 8
1 6
10 3
6 8
8 9
1 5
3 1
2 4
4 7
9 7
4 10
5 4
10 6
10 1
2 9
8 10
7 10
3 9
7 2
6 3
9 5
3 4
2 6
9 6
4 8
10 21
...

output:

BBRRRBRRRBBRRBRBRBBRBRBR
RBRRRRBBBRRBBBRRRBRRRRBRBRBBBBRRBRBBBRRBRB
RBRBRBBBBBBRRRRBRRBRR
RBBBRBBRBRBRRBRRBRBBRBRRRBBRRBRRBRBBRRRB
BRRRBRBBRBRBRRBBRRRRRBRBRBBBR
RRRBBRBRRBRBBRRRBBBBR
BRBRBBRRBBRRRBBRRBBBRRBRRRBBBBBRBRRRRRBRBBR
BBRRRBBRBRRBBBRRRR
RBBBBRRRBRBRBRR
RBRBRBRBBBRBBRRBRRBBBRBRRRRRBRRBR
BRRR...

result:

ok ok (1000 test cases)

Test #32:

score: 0
Accepted
time: 225ms
memory: 3968kb

input:

1000
11 50
5 1
1 10
5 7
11 1
7 8
5 2
5 11
10 9
2 4
10 7
3 1
3 11
3 6
2 10
9 4
9 5
10 3
8 4
11 4
7 11
10 8
5 10
9 7
6 5
4 7
9 3
9 2
10 11
9 6
7 1
2 8
2 11
11 8
3 5
1 9
6 1
4 5
4 3
4 1
10 4
9 8
6 7
8 3
6 2
2 3
2 1
3 7
6 8
6 10
2 7
11 32
3 2
5 8
5 3
3 8
3 11
1 3
11 8
5 7
7 9
10 1
10 11
7 10
9 2
6 9
10 ...

output:

RRRBBBRBBRRRRBRBBBBBRBRBBRRBBBBRRBBBRBRRRBBRRRRRRR
BRRBRRBRBRBBRRRBBRRRBRBBBBRRRBBB
RBRRBRRBBBBBBRRRRBBRRBRBRBBBBBRRRRRB
BBBRBRRRRBRRRRBRRBBRBRBBBRRBRRBBRRRRBBBBRRR
RBBRBBRBBRRRRRBBBBBRBBRRBRRRRBRRBRBRBRRBR
RRBRRRRBRBRBBBRBBBRBBBRBBBBRBRRRRBRBRR
RRRRRBBBRBRRRRBRRBRRBRRRRBRBBBRRBBBBBBRBBBRBRRRBR
IMPO...

result:

ok ok (1000 test cases)

Test #33:

score: 0
Accepted
time: 201ms
memory: 3992kb

input:

1000
11 29
3 5
10 9
11 5
8 9
5 1
4 11
4 10
7 11
3 2
11 6
4 7
6 3
8 2
1 10
7 9
6 1
9 3
11 8
7 2
4 2
2 10
1 8
4 9
4 3
6 5
1 7
1 4
10 8
1 2
11 39
7 1
7 11
8 4
5 9
10 9
3 10
7 10
3 11
9 1
5 1
5 2
1 3
8 7
6 11
5 11
6 3
11 1
9 8
4 2
11 8
11 9
4 7
2 7
10 5
2 3
5 7
4 5
6 5
3 7
10 4
6 1
8 10
5 8
3 4
7 9
1 8
...

output:

BBRBBBRBRBBRRRRBBRBRBBRBRRRRR
BBBBBRRRBRRRBRBRBRRRRRBBBRBRBRRBRBRRBBB
BRRRBRRBBRBBRRRRBRBBRBRBRBBRBBBBBRRBRRRRRBBRR
BRRBBRRRBRBBRBBBBBBRBBRRBBRRRRRRBRBBRR
RRRRBRBBRBRBBRBBR
RBBRRRRBRRRBBRBRRBBBBB
RBRBRBRBBRRBBBBBBRBRRBBRBBRRRRBRRRRRBBBRRBBRBRRRB
RBRBBBBRRBRRBRRRRRRRB
BRRRBRBBRRRRRRBRBBRRRRRBBBBBRBRB...

result:

ok ok (1000 test cases)

Test #34:

score: 0
Accepted
time: 220ms
memory: 3968kb

input:

1000
12 25
6 9
3 1
6 10
11 6
12 1
7 8
11 12
6 5
4 1
5 4
7 5
6 7
8 1
6 2
12 4
10 11
9 12
2 9
8 4
7 3
6 1
6 8
7 2
11 3
5 12
12 25
8 5
1 8
2 12
5 1
7 5
8 4
1 11
6 7
7 4
4 1
12 10
8 11
12 6
8 2
6 10
10 9
6 2
7 10
4 3
9 6
10 2
5 2
11 12
1 7
9 5
12 24
6 8
7 8
12 10
4 10
12 5
8 12
3 1
1 11
12 3
4 5
1 5
11 ...

output:

BBRRRRBBRRBRRRBBRBRBBBBRR
BBBRRRBBRRBRRRBRRRBRBRRRB
BRBBRBRRRRBBRRBRBBRRRRBR
RBBBBRRRBBRBBRRBBBRRRRBRRRRRBBBRBRRBRBRRRRRRBRRBBBBBRRRBB
RRBBBRBBRRBRBBRRBRRBRRRRBRBRBBBRRBBBRRRRBRBRRRBRRB
RRBBRBRRRRBRBRBBRRRRBRBBBRBRRRBBRBRBB
BRRRBRRRRRRBBRBRBRBBRRRBRBRBRBBBBR
RRBRRBRRBBRRRRRBBRRBBBBBRBRBRRBRBB
RBRRRB...

result:

ok ok (1000 test cases)

Test #35:

score: 0
Accepted
time: 209ms
memory: 3956kb

input:

1000
12 52
7 9
4 7
2 8
10 11
4 2
1 4
9 1
10 5
1 10
9 2
3 11
8 6
5 7
3 7
6 1
5 9
10 9
2 7
5 4
3 4
2 10
12 6
5 1
2 3
12 11
5 6
3 10
3 1
4 11
7 1
6 2
9 12
3 6
12 2
5 11
12 7
1 8
1 2
11 7
12 8
6 9
3 9
8 5
1 12
3 5
6 10
6 4
3 12
10 8
8 9
6 11
12 5
12 49
12 1
5 2
8 6
11 6
7 9
6 4
11 5
12 2
7 3
5 1
12 9
4 ...

output:

BBBBRRBBBBRBRRBRRRBBBBRRRBRRBBRRBBBRRRBBRRRBBRRBRBRR
BBBBBRRBRBBRRRRRRRRRBRRBBBBRBRBRBRBRRRRBBBBRRRBRB
BRRBRRRBRRRBRBRRBRRBRBRBRRRBRRRBRBBBRBBBBBBRB
BBRBRRBRRBRRRBRBBRBBBBRBRRRBRRRRBBRBBR
BRRBRBBBRRRRBRBBRBRBRBBRRRRR
RRBBRRRBRBBRRRBRRBRBRBBBBBRRBRRRBRRBRBBBRRRRBBRRBBRRRBBBBR
BBRBRBBBRBBRRRBB
BBBBBRR...

result:

ok ok (1000 test cases)

Test #36:

score: 0
Accepted
time: 281ms
memory: 4052kb

input:

1000
13 28
8 2
11 13
9 11
1 8
7 8
5 8
2 13
13 9
11 3
11 7
4 5
4 7
10 12
8 13
7 13
6 3
3 5
6 12
7 2
4 13
7 3
8 12
10 2
6 9
4 11
10 11
1 5
3 13
13 19
12 11
7 8
4 5
6 9
10 13
8 2
10 6
7 13
10 3
2 4
4 13
7 2
5 3
5 1
3 7
12 5
8 5
12 8
9 8
13 40
7 13
13 4
12 11
8 9
3 6
12 6
5 12
9 11
2 12
8 1
3 4
6 1
13 1...

output:

RBBRBRBRRRBBRBRRBBRRBBBRRBRB
RRRBRRRBBBRRRBRBBRR
BRRBRBRRBRBBRRBRBBBRBRBRBRRRRRRBBBBBRRRR
BBBBBRRRRRBBBRRBRBRRBRRRRBRBBRBBRRBBRBRRRB
BRBBBBRBRRBRBRBRBBRRBRRBRRRBBRRBRRBRRRRRRRBRBBBBBRRRBRBRBBRBRBRBBRBBRBBR
RBRRBBBRRBRBRBRRRRRRBRBRBRRBBRBBRRBBRBBBBBBBBBBRRRBRRRBRBRRRRRBRRB
BBRRRRBBRRBRRBRBRRRRRRBBBRR...

result:

ok ok (1000 test cases)

Test #37:

score: 0
Accepted
time: 198ms
memory: 4036kb

input:

1000
13 70
8 2
8 12
13 1
2 10
13 2
7 3
5 4
8 7
7 9
10 4
11 6
1 12
12 13
1 5
1 9
12 9
3 2
12 2
6 13
13 11
12 3
1 11
8 6
8 4
7 13
7 6
10 11
9 11
11 7
5 9
11 2
8 13
8 5
8 1
9 6
2 9
2 6
8 11
9 13
11 5
12 11
13 3
7 5
13 10
6 10
4 11
8 10
7 2
6 4
3 9
3 5
4 9
6 3
5 13
4 2
10 7
10 9
4 12
8 9
2 1
7 1
3 8
3 1...

output:

BRBRRRRBRBRRBRBRBBBBRBBRRBBRRBBRBRRRRBBRBRRRRRRRRBBBBBRBRBBRBRBBRBRBBR
BBBBRRRRBRBRBBRRBRRRRRRRRBBRBRRRBRBBBRRBRRRBRBBBBBBBRRRBBBRRRBBBRR
RRBRBRRRRRBBRBRBBRBBRBRBBRRRRBBRRRBRB
IMPOSSIBLE
BRRRBBBBRRRRBRRRRRRRRBRRBBBBRBBBBRBRBRBRRBRRBRBBBRBRBBBRBRBRBRRRBRB
RRRBRRRRRRBBBRRRBBRBBBBRBRBBB
BRBRRBBRRRBRBBR...

result:

ok ok (1000 test cases)

Test #38:

score: 0
Accepted
time: 205ms
memory: 4052kb

input:

1000
14 89
8 6
14 12
3 2
14 7
14 4
11 10
5 14
9 13
3 9
12 2
2 8
1 11
11 5
3 1
14 1
8 5
4 9
12 11
13 2
10 6
12 10
11 13
8 3
11 2
9 11
8 13
7 1
4 1
7 2
4 6
5 4
11 14
7 13
8 12
1 10
5 2
6 7
4 11
10 5
9 12
1 13
13 10
7 4
12 13
6 13
9 5
3 12
10 2
6 2
7 5
10 7
13 5
8 9
14 8
10 4
14 9
6 9
2 9
3 4
4 13
9 1
...

output:

BRRRBRRBRBRRBRBRBBBRRRRRBBBRBRRBRRBRBBRRRBRRRRBRBBRBBRBRRRRBBBBBRRBBBBRBBRBRBBRRRBRBBRRRB
RBBRBRBRRRRRBBRBBRRBBRRRR
BBBRRBBRRBRRBRBRRRRRBBRRBBRRBRBRRRBRRRRRBBBBRBBBRR
RRRBBRRBBBRBBRRBRBBBBBRRBRBRRBBBBRBRRRRRBRBRRRRBBR
RRBRBRBRRBRRRBBBBBRRBBRRRRBRRRRRRRRRBBBBBBB
BRBRRBBRRRRRRBRRRBBBBBRBBRRBBRBRBRBBBB...

result:

ok ok (1000 test cases)

Test #39:

score: 0
Accepted
time: 189ms
memory: 4028kb

input:

1000
14 31
7 10
12 6
9 1
14 4
7 2
7 12
14 11
6 7
10 6
14 13
10 1
7 1
7 9
11 8
13 4
14 7
13 5
9 10
6 2
2 13
4 8
6 13
4 7
7 13
11 13
12 10
12 8
9 5
13 8
11 3
9 11
14 39
10 4
13 9
7 5
10 6
14 2
1 10
12 7
3 7
10 11
6 12
1 12
4 9
11 13
12 3
3 10
10 8
7 14
11 12
13 3
1 5
2 6
12 4
9 12
5 12
11 14
1 13
8 14...

output:

RBRRRRRBRBBRRBRBRRRBBRBBBBRBRBR
RRRBBBRBRRBBBRBRRBRRRRBBBRRBBRBBRRRBRRR
BBRRRBBBRRRRBBBBBRBRRB
RRRBBBRBRBBRBBRBBBBRBBRRBBBBBRBRRRBRRRRRBBRBRRBRRRBRRRBRBBRRBBRBRBBBBRRRRBRBR
BBRRBBRBBRRBRRRBBBBBBBBBBRRRBRRRRBRRRBRBBBBRRRRBBRBRRRBRBRRRB
BRBBBRBRBRBBRBRRRBBBRRRRRRRRRBBBBBBRBRBRBRRR
RRRRBRBBRRBRRBBRRBBR...

result:

ok ok (1000 test cases)

Test #40:

score: 0
Accepted
time: 241ms
memory: 4056kb

input:

1000
15 52
8 6
15 14
2 5
11 3
4 2
1 13
14 8
8 4
6 5
5 8
13 3
10 8
6 14
10 12
8 9
7 2
9 5
1 2
12 5
12 4
2 3
5 11
9 15
6 15
9 14
7 5
13 11
5 3
10 1
9 4
7 8
3 15
15 7
9 1
10 14
7 10
9 11
15 8
13 4
9 3
15 12
8 3
5 13
15 1
3 6
13 15
8 2
15 4
2 13
13 9
4 14
5 1
15 56
3 7
8 5
6 1
11 12
14 5
13 5
4 6
8 2
15...

output:

RRRRRRRBRBBBBRRRBRRRBBBBBRBBBRBRBBRRRRBRBRRRBRBRRBBR
BBBRRBBRBBBRRRRBBRBBBBRRBRRRRRRRRRBBBBBRRBBBRRRBRRBBRRBR
BBRBRRRRRRBRRBRBRBBRRRBBRRBBRBRBBBBBRRBBRBRRRRBBBRBBBRBRRRRBRRBRRBBBBBBRBBRBRBBRRBRRRRBRBBB
BBBBBRRRBRRRRBRBRRBB
RRRBRBBRBRBBBBRBBBBBRRRBRBBBRRRBRBRRBRRRRBRRRB
RRBRRRBBBBRBBRRRRBRRBRRBR
BRRB...

result:

ok ok (1000 test cases)

Test #41:

score: 0
Accepted
time: 283ms
memory: 4116kb

input:

1000
15 14
8 14
7 2
5 2
3 12
11 9
14 2
11 2
5 13
15 6
1 11
9 4
5 10
11 15
14 12
15 37
5 13
9 5
7 11
5 10
13 10
10 8
8 5
8 9
5 3
1 6
4 3
10 11
11 1
13 3
1 3
12 7
10 2
1 12
7 3
8 13
14 5
13 11
8 3
15 4
2 13
15 14
1 14
13 14
3 15
7 8
4 9
12 6
2 9
2 6
6 9
5 7
2 7
15 31
15 5
2 5
5 3
6 14
4 9
7 3
10 9
8 4...

output:

IMPOSSIBLE
RRBBRBBRBRRRRBBBRRBBRBRBBBBRRRBRBRBRR
RRBRBBBBBRRRBBRRRRBBRBRRRRRBRBB
BRRRRRRBBBBBRRRRRBBRRRBRBBBRBB
RRBRRRBBBRRBBBR
BBBRRRRBRBBBRRBBRRRRRRRBRBBBBRBBBRRRBBBBBRBRBRRBRRRBBBBRRRBRBRRBRR
RRBBBBRRBRBRRBRRBBBRBBBBRRRRRBBRRBRRRRRBBRRRRBRRRRBRRBBRRBBBBBBRRRRBRBRBRBRBRBBRBRRRBBBBBBBBR
BRRRBBRRRRB...

result:

ok ok (1000 test cases)

Test #42:

score: 0
Accepted
time: 201ms
memory: 3988kb

input:

1000
16 37
7 5
6 9
4 15
7 10
7 15
11 3
5 6
13 2
1 4
2 10
6 15
1 3
14 1
16 7
15 12
7 9
9 10
2 12
4 2
13 6
6 2
8 16
13 4
3 7
9 8
16 5
10 1
6 7
13 7
10 4
1 9
2 15
6 16
12 13
1 8
4 8
10 16
16 101
1 2
4 7
12 15
8 16
11 9
14 13
12 14
6 9
16 12
16 4
11 16
16 3
2 13
15 4
5 11
12 3
5 9
10 8
2 5
10 1
15 1
3 4...

output:

BRRRRRRRRRBRBRBRRBRRBRBBBBBBBBBBBRRRB
RBRRRBBRBRBRRRRRBRBBRRRBBRRRBRBRRBBRBBRBRRBRRBBBRRBRRBBBRBRBRBRRBRRBBBBBBRBRRBRBBBRBRBRRBRRRBRBRBBBBR
RBRRBBBBBRRRBBBRBRBRBBBBRBBRBRRBRRRBRRRBRRRRRBRRRRBBRBBRBRBBRBBRRRRRBBRRBBBRRRRBBBRBRRBRRRRBBBRRBBRRRBRBBBBBBBRBR
RBBBBBBRRBRRBBBRRRBBBRRRRBRBBBBRBBBBRRRRBRBRBR...

result:

ok ok (1000 test cases)

Test #43:

score: 0
Accepted
time: 209ms
memory: 3968kb

input:

1000
16 45
12 13
12 7
12 3
6 13
13 7
13 3
4 11
5 13
10 8
13 4
10 13
3 6
4 3
15 2
9 11
16 14
11 2
11 15
15 5
9 5
5 14
4 7
15 6
8 2
6 8
10 1
1 4
7 2
1 5
2 16
14 7
9 12
10 2
3 8
11 16
12 4
12 16
9 13
1 9
12 11
8 14
13 11
2 1
13 14
12 10
16 116
15 14
3 8
8 4
7 15
2 6
6 4
11 3
7 9
5 7
5 14
7 11
1 6
16 2
...

output:

BBRRRBBRBBBRRBRBBRRBBRBRBRRBBRBRRBBBRBBRRRRRR
RBBBBRRRBRBRBRBRRRBRRRBRBBRBBRBBRBBBRBRBRBBBRBBRBRBBRRRRBBBRBRBBRRBBBRRBBRBRRBBRRRBRRBBBRBRBBBBRRRRRRBRRRRBBBBRRRRRR
RBBRRBRRBRRRBRBBBBRRRRBBRRRBBBBBBRRR
BBRBRRRBBBRBBRBRBRRRRRBRRBBBRRBBRBRBBRBRRRRBBRBBRBRRRBBBRRBBRBRRRRRBBBRRBBRBRRRBRRRRBBBRBBBBRRRRBBBR...

result:

ok ok (1000 test cases)

Test #44:

score: 0
Accepted
time: 228ms
memory: 4024kb

input:

1000
17 43
2 4
10 12
7 17
10 4
15 17
16 15
5 14
5 3
4 11
7 3
1 2
16 6
12 8
15 12
8 15
4 6
8 16
11 8
16 5
13 1
14 17
14 16
11 1
15 6
16 17
8 2
14 3
9 1
17 13
6 10
3 17
17 8
13 15
11 3
3 12
8 9
17 10
13 8
8 5
11 7
11 13
7 15
4 1
17 135
16 2
13 6
8 15
15 12
13 15
13 7
10 11
12 11
11 3
5 9
17 7
17 11
5 ...

output:

RRBBBRBRRBRRRBRBBBRRRBBBBRRBBRRRBBBRBBBRRRR
BRBRBRBBRRBRBRBBRBBRBRRBRBBBRBRBBBBRRRRRBBRRBBRBRRBRRRRRBBBRRBBBBRBBRRBBBRRRBRBRBBRBBBRBRRBRBBBRBRRRRBBRBRRRRRRBRRBBRBRRBBRRBRBBBBBRRRR
BRRBBBRRBBBRBBRRRBRBBBRBRRBRBBBRRRBRRRRBRRRRRRBBBBBBRRBBRBRBBBRBBBRRBRRBRBBRRRRRBR
RBRBRRRBRBRRRRBBRRBRBBRBRBRBBBBRRRBBB...

result:

ok ok (1000 test cases)

Test #45:

score: 0
Accepted
time: 341ms
memory: 4024kb

input:

1000
17 111
16 13
8 4
2 17
2 5
11 17
12 16
9 8
4 6
17 8
2 10
17 4
2 6
3 2
13 6
15 4
9 10
8 3
5 6
2 4
7 9
9 2
11 12
3 13
5 11
17 13
13 4
13 14
7 1
16 4
6 1
16 8
17 6
17 15
10 13
8 2
3 15
12 6
10 8
9 16
4 1
15 2
4 12
7 4
1 14
11 14
16 6
16 10
9 4
14 7
3 11
1 17
9 3
12 8
4 14
5 17
4 5
1 16
17 7
6 10
6 ...

output:

RRBBBBBBRRRBRRRRBRRRBBRRBBBRBBRRBBBRBBBRBRBBRRBBBBBBBBRBRBBRRRRRRRRRBRBBRRRBBBRBRBBRBBBRRBBRBRRRRRBRRRRRRRRBRRB
BRRRBBRRBRBBRRRBBBRBBRBBBRBRBRRRBBBBRRRBRBBRRBRBRRBRRBBRBRRRRBBRBBRRR
BRRRBRRRBBBRRBBBRRBRRBBRRBBBRBBBRBRBBBBRRBRRBBRBBRBBRRBRBBRBRBBRBRBRRRRBBRRRRBBBRRRRRRBBRBRBRBRRRBBBBRBRBBRRRRBRBRRRBB...

result:

ok ok (1000 test cases)

Test #46:

score: -100
Wrong Answer
time: 306ms
memory: 4092kb

input:

1000
18 73
10 12
5 11
12 17
5 15
11 14
1 17
16 11
13 10
18 9
18 5
17 10
12 9
14 4
3 12
2 5
2 17
5 13
8 13
10 2
2 3
15 17
12 16
5 4
1 4
8 7
7 18
11 7
16 9
10 4
5 3
17 13
17 11
3 15
15 18
2 18
17 7
9 13
5 17
2 6
18 6
8 16
6 15
16 17
5 14
10 6
2 11
10 3
3 13
18 17
18 1
1 3
15 7
14 10
7 9
4 16
5 10
15 4...

output:

BRBBRBBBBBRBBRRRBBRRBRBRRRBBBRBBBRBRRRBBBRRBBBBRRBRBRRRRRRBBRBRBBRBRBRRRR
RRBRBBRRRBRRRRRRRBRBBRRRRBBBRBBBRRRBB
BRRRBRRRRRRBRRRRRRBBRBRRBRRBBRBBRBRBBBRBRBBBRBRBBRRRBBRRRBBRBBBBBRBR
BRRBBRRRBBRRRRBBBBBBRBRRRRBBRBRRBRRRRRBRRRBBRBBBRRBBB
RRRBRRRBBRBRRBBBBBRBBRRRRBRB
RBRRRRRBBBRBBBBRRBRRBRRRBBBRBBRBRBRB...

result:

wrong answer jury has answer but participant doesn't (test case 396)