Codeforces Round #631 (Div. 2) C. Dreamoon Likes Coloring(贪心好题/意识流题解)
Dreamoonlikescoloringcellsverymuch.Thereisarowofnncells.Initially,allcellsareempty(don'tcontainanycolor).Cellsarenumberedfrom11tonn.Youaregivenanintegermmandmmintegersl1,l2,…,lml1,l2,…,lm(1≤li≤n1≤li≤n