QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#659689#9484. Colored Complete Graphucup-team5055#AC ✓155ms4780kbC++171.1kb2024-10-19 21:19:562024-10-19 21:19:56

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3456kb

input:

3
R
B
B

output:

? 1 3
? 2 3
? 1 2
! 
2 3
1 2

result:

ok AC

Test #2:

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

input:

983
B
R
R
B
B
B
B
B
R
B
R
R
R
R
R
R
R
B
B
R
R
B
R
B
R
R
B
B
R
B
R
R
R
R
B
R
B
B
B
R
R
R
B
B
R
R
B
R
B
R
B
B
B
R
B
R
R
B
R
B
B
R
R
R
B
B
B
B
R
B
R
R
B
R
B
B
R
B
R
B
R
B
R
R
R
B
B
B
R
R
B
B
B
R
R
B
R
B
B
B
R
B
B
R
R
B
B
R
R
R
R
B
R
R
B
B
B
R
B
B
B
B
R
B
R
R
B
R
R
R
B
R
R
B
R
R
B
R
R
B
R
B
R
B
B
R
B
R
...

output:

? 1 983
? 2 983
? 3 983
? 4 983
? 5 983
? 6 983
? 7 983
? 8 983
? 9 983
? 10 983
? 11 983
? 12 983
? 13 983
? 14 983
? 15 983
? 16 983
? 17 983
? 18 983
? 19 983
? 20 983
? 21 983
? 22 983
? 23 983
? 24 983
? 25 983
? 26 983
? 27 983
? 28 983
? 29 983
? 30 983
? 31 983
? 32 983
? 33 983
? 34 983
? 3...

result:

ok AC

Test #3:

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

input:

75
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

output:

? 1 75
? 2 75
? 3 75
? 4 75
? 5 75
? 6 75
? 7 75
? 8 75
? 9 75
? 10 75
? 11 75
? 12 75
? 13 75
? 14 75
? 15 75
? 16 75
? 17 75
? 18 75
? 19 75
? 20 75
? 21 75
? 22 75
? 23 75
? 24 75
? 25 75
? 26 75
? 27 75
? 28 75
? 29 75
? 30 75
? 31 75
? 32 75
? 33 75
? 34 75
? 35 75
? 36 75
? 37 75
? 38 75
? 39 ...

result:

ok AC

Test #4:

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

input:

430
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
...

output:

? 1 430
? 2 430
? 3 430
? 4 430
? 5 430
? 6 430
? 7 430
? 8 430
? 9 430
? 10 430
? 11 430
? 12 430
? 13 430
? 14 430
? 15 430
? 16 430
? 17 430
? 18 430
? 19 430
? 20 430
? 21 430
? 22 430
? 23 430
? 24 430
? 25 430
? 26 430
? 27 430
? 28 430
? 29 430
? 30 430
? 31 430
? 32 430
? 33 430
? 34 430
? 3...

result:

ok AC

Test #5:

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

input:

238
B
R
R
B
B
B
B
B
R
B
R
R
R
R
R
R
R
B
B
R
R
B
R
B
R
R
B
B
R
B
R
R
R
R
B
R
B
B
B
R
R
R
B
B
R
R
B
R
B
R
B
B
B
R
B
R
R
B
R
B
B
R
R
R
B
B
B
B
R
B
R
R
B
R
B
B
R
B
R
B
R
B
R
R
R
B
B
B
R
R
B
B
B
R
R
B
R
B
B
B
R
B
B
R
R
B
B
R
R
R
R
B
R
R
B
B
B
R
B
B
B
B
R
B
R
R
B
R
R
R
B
R
R
B
R
R
B
R
R
B
R
B
R
B
B
R
B
R
...

output:

? 1 238
? 2 238
? 3 238
? 4 238
? 5 238
? 6 238
? 7 238
? 8 238
? 9 238
? 10 238
? 11 238
? 12 238
? 13 238
? 14 238
? 15 238
? 16 238
? 17 238
? 18 238
? 19 238
? 20 238
? 21 238
? 22 238
? 23 238
? 24 238
? 25 238
? 26 238
? 27 238
? 28 238
? 29 238
? 30 238
? 31 238
? 32 238
? 33 238
? 34 238
? 3...

result:

ok AC

Test #6:

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

input:

42
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
B
R
R
R
R
R
R
R
R
R
R
R
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B

output:

? 1 42
? 2 42
? 3 42
? 4 42
? 5 42
? 6 42
? 7 42
? 8 42
? 9 42
? 10 42
? 11 42
? 12 42
? 13 42
? 14 42
? 15 42
? 16 42
? 17 42
? 18 42
? 19 42
? 20 42
? 21 42
? 22 42
? 23 42
? 24 42
? 25 42
? 26 42
? 27 42
? 28 42
? 29 42
? 30 42
? 31 42
? 32 42
? 33 42
? 34 42
? 35 42
? 36 42
? 37 42
? 38 42
? 39 ...

result:

ok AC

Test #7:

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

input:

759
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
...

output:

? 1 759
? 2 759
? 3 759
? 4 759
? 5 759
? 6 759
? 7 759
? 8 759
? 9 759
? 10 759
? 11 759
? 12 759
? 13 759
? 14 759
? 15 759
? 16 759
? 17 759
? 18 759
? 19 759
? 20 759
? 21 759
? 22 759
? 23 759
? 24 759
? 25 759
? 26 759
? 27 759
? 28 759
? 29 759
? 30 759
? 31 759
? 32 759
? 33 759
? 34 759
? 3...

result:

ok AC

Test #8:

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

input:

389
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
...

output:

? 1 389
? 2 389
? 3 389
? 4 389
? 5 389
? 6 389
? 7 389
? 8 389
? 9 389
? 10 389
? 11 389
? 12 389
? 13 389
? 14 389
? 15 389
? 16 389
? 17 389
? 18 389
? 19 389
? 20 389
? 21 389
? 22 389
? 23 389
? 24 389
? 25 389
? 26 389
? 27 389
? 28 389
? 29 389
? 30 389
? 31 389
? 32 389
? 33 389
? 34 389
? 3...

result:

ok AC

Test #9:

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

input:

47
R
R
R
R
R
R
R
R
B
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
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B
B

output:

? 1 47
? 2 47
? 3 47
? 4 47
? 5 47
? 6 47
? 7 47
? 8 47
? 9 47
? 10 47
? 11 47
? 12 47
? 13 47
? 14 47
? 15 47
? 16 47
? 17 47
? 18 47
? 19 47
? 20 47
? 21 47
? 22 47
? 23 47
? 24 47
? 25 47
? 26 47
? 27 47
? 28 47
? 29 47
? 30 47
? 31 47
? 32 47
? 33 47
? 34 47
? 35 47
? 36 47
? 37 47
? 38 47
? 39 ...

result:

ok AC

Test #10:

score: 0
Accepted
time: 21ms
memory: 3664kb

input:

14657
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
...

output:

? 1 14657
? 2 14657
? 3 14657
? 4 14657
? 5 14657
? 6 14657
? 7 14657
? 8 14657
? 9 14657
? 10 14657
? 11 14657
? 12 14657
? 13 14657
? 14 14657
? 15 14657
? 16 14657
? 17 14657
? 18 14657
? 19 14657
? 20 14657
? 21 14657
? 22 14657
? 23 14657
? 24 14657
? 25 14657
? 26 14657
? 27 14657
? 28 14657
?...

result:

ok AC

Test #11:

score: 0
Accepted
time: 17ms
memory: 3888kb

input:

15755
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
...

output:

? 1 15755
? 2 15755
? 3 15755
? 4 15755
? 5 15755
? 6 15755
? 7 15755
? 8 15755
? 9 15755
? 10 15755
? 11 15755
? 12 15755
? 13 15755
? 14 15755
? 15 15755
? 16 15755
? 17 15755
? 18 15755
? 19 15755
? 20 15755
? 21 15755
? 22 15755
? 23 15755
? 24 15755
? 25 15755
? 26 15755
? 27 15755
? 28 15755
?...

result:

ok AC

Test #12:

score: 0
Accepted
time: 36ms
memory: 3688kb

input:

14236
B
R
R
B
B
B
B
B
R
B
R
R
R
R
R
R
R
B
B
R
R
B
R
B
R
R
B
B
R
B
R
R
R
R
B
R
B
B
B
R
R
R
B
B
R
R
B
R
B
R
B
B
B
R
B
R
R
B
R
B
B
R
R
R
B
B
B
B
R
B
R
R
B
R
B
B
R
B
R
B
R
B
R
R
R
B
B
B
R
R
B
B
B
R
R
B
R
B
B
B
R
B
B
R
R
B
B
R
R
R
R
B
R
R
B
B
B
R
B
B
B
B
R
B
R
R
B
R
R
R
B
R
R
B
R
R
B
R
R
B
R
B
R
B
B
R
B
...

output:

? 1 14236
? 2 14236
? 3 14236
? 4 14236
? 5 14236
? 6 14236
? 7 14236
? 8 14236
? 9 14236
? 10 14236
? 11 14236
? 12 14236
? 13 14236
? 14 14236
? 15 14236
? 16 14236
? 17 14236
? 18 14236
? 19 14236
? 20 14236
? 21 14236
? 22 14236
? 23 14236
? 24 14236
? 25 14236
? 26 14236
? 27 14236
? 28 14236
?...

result:

ok AC

Test #13:

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

input:

19615
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
...

output:

? 1 19615
? 2 19615
? 3 19615
? 4 19615
? 5 19615
? 6 19615
? 7 19615
? 8 19615
? 9 19615
? 10 19615
? 11 19615
? 12 19615
? 13 19615
? 14 19615
? 15 19615
? 16 19615
? 17 19615
? 18 19615
? 19 19615
? 20 19615
? 21 19615
? 22 19615
? 23 19615
? 24 19615
? 25 19615
? 26 19615
? 27 19615
? 28 19615
?...

result:

ok AC

Test #14:

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

input:

30668
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
...

output:

? 1 30668
? 2 30668
? 3 30668
? 4 30668
? 5 30668
? 6 30668
? 7 30668
? 8 30668
? 9 30668
? 10 30668
? 11 30668
? 12 30668
? 13 30668
? 14 30668
? 15 30668
? 16 30668
? 17 30668
? 18 30668
? 19 30668
? 20 30668
? 21 30668
? 22 30668
? 23 30668
? 24 30668
? 25 30668
? 26 30668
? 27 30668
? 28 30668
?...

result:

ok AC

Test #15:

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

input:

39166
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
...

output:

? 1 39166
? 2 39166
? 3 39166
? 4 39166
? 5 39166
? 6 39166
? 7 39166
? 8 39166
? 9 39166
? 10 39166
? 11 39166
? 12 39166
? 13 39166
? 14 39166
? 15 39166
? 16 39166
? 17 39166
? 18 39166
? 19 39166
? 20 39166
? 21 39166
? 22 39166
? 23 39166
? 24 39166
? 25 39166
? 26 39166
? 27 39166
? 28 39166
?...

result:

ok AC

Test #16:

score: 0
Accepted
time: 33ms
memory: 3948kb

input:

35168
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
...

output:

? 1 35168
? 2 35168
? 3 35168
? 4 35168
? 5 35168
? 6 35168
? 7 35168
? 8 35168
? 9 35168
? 10 35168
? 11 35168
? 12 35168
? 13 35168
? 14 35168
? 15 35168
? 16 35168
? 17 35168
? 18 35168
? 19 35168
? 20 35168
? 21 35168
? 22 35168
? 23 35168
? 24 35168
? 25 35168
? 26 35168
? 27 35168
? 28 35168
?...

result:

ok AC

Test #17:

score: 0
Accepted
time: 62ms
memory: 3872kb

input:

45420
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
...

output:

? 1 45420
? 2 45420
? 3 45420
? 4 45420
? 5 45420
? 6 45420
? 7 45420
? 8 45420
? 9 45420
? 10 45420
? 11 45420
? 12 45420
? 13 45420
? 14 45420
? 15 45420
? 16 45420
? 17 45420
? 18 45420
? 19 45420
? 20 45420
? 21 45420
? 22 45420
? 23 45420
? 24 45420
? 25 45420
? 26 45420
? 27 45420
? 28 45420
?...

result:

ok AC

Test #18:

score: 0
Accepted
time: 46ms
memory: 3764kb

input:

45526
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
...

output:

? 1 45526
? 2 45526
? 3 45526
? 4 45526
? 5 45526
? 6 45526
? 7 45526
? 8 45526
? 9 45526
? 10 45526
? 11 45526
? 12 45526
? 13 45526
? 14 45526
? 15 45526
? 16 45526
? 17 45526
? 18 45526
? 19 45526
? 20 45526
? 21 45526
? 22 45526
? 23 45526
? 24 45526
? 25 45526
? 26 45526
? 27 45526
? 28 45526
?...

result:

ok AC

Test #19:

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

input:

48225
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
...

output:

? 1 48225
? 2 48225
? 3 48225
? 4 48225
? 5 48225
? 6 48225
? 7 48225
? 8 48225
? 9 48225
? 10 48225
? 11 48225
? 12 48225
? 13 48225
? 14 48225
? 15 48225
? 16 48225
? 17 48225
? 18 48225
? 19 48225
? 20 48225
? 21 48225
? 22 48225
? 23 48225
? 24 48225
? 25 48225
? 26 48225
? 27 48225
? 28 48225
?...

result:

ok AC

Test #20:

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

input:

40451
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
...

output:

? 1 40451
? 2 40451
? 3 40451
? 4 40451
? 5 40451
? 6 40451
? 7 40451
? 8 40451
? 9 40451
? 10 40451
? 11 40451
? 12 40451
? 13 40451
? 14 40451
? 15 40451
? 16 40451
? 17 40451
? 18 40451
? 19 40451
? 20 40451
? 21 40451
? 22 40451
? 23 40451
? 24 40451
? 25 40451
? 26 40451
? 27 40451
? 28 40451
?...

result:

ok AC

Test #21:

score: 0
Accepted
time: 52ms
memory: 3864kb

input:

47265
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
...

output:

? 1 47265
? 2 47265
? 3 47265
? 4 47265
? 5 47265
? 6 47265
? 7 47265
? 8 47265
? 9 47265
? 10 47265
? 11 47265
? 12 47265
? 13 47265
? 14 47265
? 15 47265
? 16 47265
? 17 47265
? 18 47265
? 19 47265
? 20 47265
? 21 47265
? 22 47265
? 23 47265
? 24 47265
? 25 47265
? 26 47265
? 27 47265
? 28 47265
?...

result:

ok AC

Test #22:

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

input:

40881
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
...

output:

? 1 40881
? 2 40881
? 3 40881
? 4 40881
? 5 40881
? 6 40881
? 7 40881
? 8 40881
? 9 40881
? 10 40881
? 11 40881
? 12 40881
? 13 40881
? 14 40881
? 15 40881
? 16 40881
? 17 40881
? 18 40881
? 19 40881
? 20 40881
? 21 40881
? 22 40881
? 23 40881
? 24 40881
? 25 40881
? 26 40881
? 27 40881
? 28 40881
?...

result:

ok AC

Test #23:

score: 0
Accepted
time: 86ms
memory: 4692kb

input:

44327
B
R
R
B
B
B
B
B
R
B
R
R
R
R
R
R
R
B
B
R
R
B
R
B
R
R
B
B
R
B
R
R
R
R
B
R
B
B
B
R
R
R
B
B
R
R
B
R
B
R
B
B
B
R
B
R
R
B
R
B
B
R
R
R
B
B
B
B
R
B
R
R
B
R
B
B
R
B
R
B
R
B
R
R
R
B
B
B
R
R
B
B
B
R
R
B
R
B
B
B
R
B
B
R
R
B
B
R
R
R
R
B
R
R
B
B
B
R
B
B
B
B
R
B
R
R
B
R
R
R
B
R
R
B
R
R
B
R
R
B
R
B
R
B
B
R
B
...

output:

? 1 44327
? 2 44327
? 3 44327
? 4 44327
? 5 44327
? 6 44327
? 7 44327
? 8 44327
? 9 44327
? 10 44327
? 11 44327
? 12 44327
? 13 44327
? 14 44327
? 15 44327
? 16 44327
? 17 44327
? 18 44327
? 19 44327
? 20 44327
? 21 44327
? 22 44327
? 23 44327
? 24 44327
? 25 44327
? 26 44327
? 27 44327
? 28 44327
?...

result:

ok AC

Test #24:

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

input:

48093
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
...

output:

? 1 48093
? 2 48093
? 3 48093
? 4 48093
? 5 48093
? 6 48093
? 7 48093
? 8 48093
? 9 48093
? 10 48093
? 11 48093
? 12 48093
? 13 48093
? 14 48093
? 15 48093
? 16 48093
? 17 48093
? 18 48093
? 19 48093
? 20 48093
? 21 48093
? 22 48093
? 23 48093
? 24 48093
? 25 48093
? 26 48093
? 27 48093
? 28 48093
?...

result:

ok AC

Test #25:

score: 0
Accepted
time: 71ms
memory: 3948kb

input:

49999
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
...

output:

? 1 49999
? 2 49999
? 3 49999
? 4 49999
? 5 49999
? 6 49999
? 7 49999
? 8 49999
? 9 49999
? 10 49999
? 11 49999
? 12 49999
? 13 49999
? 14 49999
? 15 49999
? 16 49999
? 17 49999
? 18 49999
? 19 49999
? 20 49999
? 21 49999
? 22 49999
? 23 49999
? 24 49999
? 25 49999
? 26 49999
? 27 49999
? 28 49999
?...

result:

ok AC

Test #26:

score: 0
Accepted
time: 114ms
memory: 4588kb

input:

50000
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
...

output:

? 1 50000
? 2 50000
? 3 50000
? 4 50000
? 5 50000
? 6 50000
? 7 50000
? 8 50000
? 9 50000
? 10 50000
? 11 50000
? 12 50000
? 13 50000
? 14 50000
? 15 50000
? 16 50000
? 17 50000
? 18 50000
? 19 50000
? 20 50000
? 21 50000
? 22 50000
? 23 50000
? 24 50000
? 25 50000
? 26 50000
? 27 50000
? 28 50000
?...

result:

ok AC

Test #27:

score: 0
Accepted
time: 76ms
memory: 4652kb

input:

50000
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
...

output:

? 1 50000
? 2 50000
? 3 50000
? 4 50000
? 5 50000
? 6 50000
? 7 50000
? 8 50000
? 9 50000
? 10 50000
? 11 50000
? 12 50000
? 13 50000
? 14 50000
? 15 50000
? 16 50000
? 17 50000
? 18 50000
? 19 50000
? 20 50000
? 21 50000
? 22 50000
? 23 50000
? 24 50000
? 25 50000
? 26 50000
? 27 50000
? 28 50000
?...

result:

ok AC

Test #28:

score: 0
Accepted
time: 155ms
memory: 4716kb

input:

49999
B
R
R
B
B
B
B
B
R
B
R
R
R
R
R
R
R
B
B
R
R
B
R
B
R
R
B
B
R
B
R
R
R
R
B
R
B
B
B
R
R
R
B
B
R
R
B
R
B
R
B
B
B
R
B
R
R
B
R
B
B
R
R
R
B
B
B
B
R
B
R
R
B
R
B
B
R
B
R
B
R
B
R
R
R
B
B
B
R
R
B
B
B
R
R
B
R
B
B
B
R
B
B
R
R
B
B
R
R
R
R
B
R
R
B
B
B
R
B
B
B
B
R
B
R
R
B
R
R
R
B
R
R
B
R
R
B
R
R
B
R
B
R
B
B
R
B
...

output:

? 1 49999
? 2 49999
? 3 49999
? 4 49999
? 5 49999
? 6 49999
? 7 49999
? 8 49999
? 9 49999
? 10 49999
? 11 49999
? 12 49999
? 13 49999
? 14 49999
? 15 49999
? 16 49999
? 17 49999
? 18 49999
? 19 49999
? 20 49999
? 21 49999
? 22 49999
? 23 49999
? 24 49999
? 25 49999
? 26 49999
? 27 49999
? 28 49999
?...

result:

ok AC

Test #29:

score: 0
Accepted
time: 137ms
memory: 4780kb

input:

50000
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
...

output:

? 1 50000
? 2 50000
? 3 50000
? 4 50000
? 5 50000
? 6 50000
? 7 50000
? 8 50000
? 9 50000
? 10 50000
? 11 50000
? 12 50000
? 13 50000
? 14 50000
? 15 50000
? 16 50000
? 17 50000
? 18 50000
? 19 50000
? 20 50000
? 21 50000
? 22 50000
? 23 50000
? 24 50000
? 25 50000
? 26 50000
? 27 50000
? 28 50000
?...

result:

ok AC

Test #30:

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

input:

4
B
R
R
B
B

output:

? 1 4
? 2 4
? 3 4
? 2 1
? 3 1
! 
1 4
2 1
3 1

result:

ok AC

Test #31:

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

input:

5
B
R
R
B
B
B

output:

? 1 5
? 2 5
? 3 5
? 4 5
? 2 1
? 3 1
! 
1 5
4 5
2 1
3 1

result:

ok AC

Test #32:

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

input:

6
B
B
B
B
B

output:

? 1 6
? 2 6
? 3 6
? 4 6
? 5 6
! 
1 6
2 6
3 6
4 6
5 6

result:

ok AC

Test #33:

score: 0
Accepted
time: 98ms
memory: 4628kb

input:

50000
B
R
R
B
B
B
B
B
R
B
R
R
R
R
R
R
R
B
B
R
R
B
R
B
R
R
B
B
R
B
R
R
R
R
B
R
B
B
B
R
R
R
B
B
R
R
B
R
B
R
B
B
B
R
B
R
R
B
R
B
B
R
R
R
B
B
B
B
R
B
R
R
B
R
B
B
R
B
R
B
R
B
R
R
R
B
B
B
R
R
B
B
B
R
R
B
R
B
B
B
R
B
B
R
R
B
B
R
R
R
R
B
R
R
B
B
B
R
B
B
B
B
R
B
R
R
B
R
R
R
B
R
R
B
R
R
B
R
R
B
R
B
R
B
B
R
B
...

output:

? 1 50000
? 2 50000
? 3 50000
? 4 50000
? 5 50000
? 6 50000
? 7 50000
? 8 50000
? 9 50000
? 10 50000
? 11 50000
? 12 50000
? 13 50000
? 14 50000
? 15 50000
? 16 50000
? 17 50000
? 18 50000
? 19 50000
? 20 50000
? 21 50000
? 22 50000
? 23 50000
? 24 50000
? 25 50000
? 26 50000
? 27 50000
? 28 50000
?...

result:

ok AC

Test #34:

score: 0
Accepted
time: 77ms
memory: 4564kb

input:

50000
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
...

output:

? 1 50000
? 2 50000
? 3 50000
? 4 50000
? 5 50000
? 6 50000
? 7 50000
? 8 50000
? 9 50000
? 10 50000
? 11 50000
? 12 50000
? 13 50000
? 14 50000
? 15 50000
? 16 50000
? 17 50000
? 18 50000
? 19 50000
? 20 50000
? 21 50000
? 22 50000
? 23 50000
? 24 50000
? 25 50000
? 26 50000
? 27 50000
? 28 50000
?...

result:

ok AC

Test #35:

score: 0
Accepted
time: 82ms
memory: 3856kb

input:

50000
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
...

output:

? 1 50000
? 2 50000
? 3 50000
? 4 50000
? 5 50000
? 6 50000
? 7 50000
? 8 50000
? 9 50000
? 10 50000
? 11 50000
? 12 50000
? 13 50000
? 14 50000
? 15 50000
? 16 50000
? 17 50000
? 18 50000
? 19 50000
? 20 50000
? 21 50000
? 22 50000
? 23 50000
? 24 50000
? 25 50000
? 26 50000
? 27 50000
? 28 50000
?...

result:

ok AC

Test #36:

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

input:

50000
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
...

output:

? 1 50000
? 2 50000
? 3 50000
? 4 50000
? 5 50000
? 6 50000
? 7 50000
? 8 50000
? 9 50000
? 10 50000
? 11 50000
? 12 50000
? 13 50000
? 14 50000
? 15 50000
? 16 50000
? 17 50000
? 18 50000
? 19 50000
? 20 50000
? 21 50000
? 22 50000
? 23 50000
? 24 50000
? 25 50000
? 26 50000
? 27 50000
? 28 50000
?...

result:

ok AC

Extra Test:

score: 0
Extra Test Passed