cf/mirror

Segments Covering

CF
2125D1600· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3 3
1 2 1 3
3 3 1 2
1 3 2 3
Output
610038216
Sample 2of 3
Input
2 3
1 2 1 2
2 3 1 2
Output
0
Sample 3of 3
Input
8 5
1 3 1 2
1 5 1 6
1 4 4 5
5 5 1 7
4 5 1 2
4 5 2 5
3 3 2 7
1 2 1 3
Output
94391813
2125D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)