vus专题

Codeforces 1186 F. Vus the Cossack and a Graph —— 线段树,贪心

This way 题意: 现在有一张简单图,n个点m条边,让你留下最多 ⌈ n + m 2 ⌉ \lceil{\frac{n+m}{2}}\rceil ⌈2n+m​⌉条边,假设每个点的当前度数为di,每个点的最终度数要大于等于 ⌈ d i 2 ⌉ \lceil{\frac{d_i}{2}}\rceil ⌈2di​​⌉。问你留下来哪些边 题解: 我最近做题目都先考虑线段树是否能做…不知道这