Description After the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≤ si ≤ 4), and
传送门 题目描述 给定一个有向图,改变其中某些边的方向,它将成为一个有向无环图。 现在求一个改变边方向的方案,使得所选边边权的最大值最小。 分析 很巧妙的一道题 首先因为是求最大值的最小值,很容易想到二分,所以怎么去构造 c h e c k check check函数呢? 我们去二分 m i d mid mid,把大于 m i d mid mid的边加入图中,判断图中是否有环,如果有环,必
描述 Running a taxi station is not all that simple. Apart from the obvious demand for a centralised coordination of the cabs in order to pick up the customers calling to get a cab as soon as possible,