
差分约束
zeng_jun_yv
title:
退役小曾
展开
-
Too Many Segments (easy version) CodeForces - 1249D1(贪心+差分)
题意给多组线段,而每一个点的覆盖次数不超过K,每次可去除一个线段,问最少去多少线段以及线段的位置。The only difference between easy and hard versions is constraints.You are given nn segments on the coordinate axis OX. Segments can intersect, lie i...原创 2019-11-02 08:32:28 · 444 阅读 · 0 评论 -
POJ 3159 Candies(差分约束+SPAF)
题意:给n个小朋友分发糖果,但小朋友们之间有嫉妒心。接下来m行,每行三个数,分别表示小朋友A希望B得到的糖果不能比他多x个。要求你计算在满足所有小朋友的条件的情况下最多需要准备多少颗糖。题目:During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candie原创 2020-09-22 19:31:34 · 128 阅读 · 0 评论