let denote size maximum match graph g mathitmmgyou give bipartite graph the vertex number 1 n vertex second number n1 2n each vertexs degree 2for tuple integer l r L R 1 le l le r le n n1 le L le R le 2n let define Gl r L R graph consist vertex give graph include segment l r segment L R edge give graph endpoint belong segment in word obtain Gl r L R original graph remove vertex notin l r notin L R edge incident verticesCalculate sum mathitMMGl r L R tuple integer l r l R have 1 le l le r le n n1 le L le R le 2n