Suppose that in the final coloring there will be m yellow consecutive segments of lengths c1,c2,…,bm. Consider some segment, it was formed from some subset of operations, suppose with length b1,b2,…,bs. It's clear that from seg