6
GBGBBG
3 1 2 100 3 7
expected:
3
2 3
5 6
1 4 //区间的维护上最好还是使用posl,posr两个指针进行维护,如使用nxtl用以表示右端点可能会导致输出为
1 4