cf/mirror

Too Many Segments (hard version)

CF
1249D21800· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
7 2
11 11
9 11
7 8
8 9
7 8
9 11
7 9
Output
3
4 6 7
Sample 2of 3
Input
5 1
29 30
30 30
29 29
28 30
30 30
Output
3
1 4 5
Sample 3of 3
Input
6 1
2 3
3 3
2 3
2 2
2 3
2 3
Output
4
1 3 5 6
1249D2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)