cf/mirror

Red-Blue Graph

CF
1266H3400· legendary gm4s512 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
6
2 1
5 5
2 1
6 3
4 3
21
1 BBBBB
1 RBBBB
2 BBBBB
5 BRBBB
3 BRBBR
1 BRRBR
1 RRRBR
2 BRRBR
5 BBRBR
4 BBRBB
3 BBRRB
2 BBBRB
5 BRBRB
3 BRBRR
1 BRRRR
1 RRRRR
2 BRRRR
5 BBRRR
4 BBRRB
2 BRBBB
4 BRBBR
Output
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-1
-1
1266H.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…