2018 Benelux Algorithm Programming Contest

From EOJ Wiki
Revision as of 12:33, 24 April 2019 by Xiejiadong (talk | contribs) (Created page with "== Problem A == Solved by Weaver_zhu. 0:10 (+) == Problem B == Solved by Kilo_5723. 0:54 (+1) == Problem C == Solved by Kilo_5723. 0:18 (+) == Problem D == Unsolved. (-...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Problem A

Solved by Weaver_zhu. 0:10 (+)

Problem B

Solved by Kilo_5723. 0:54 (+1)

Problem C

Solved by Kilo_5723. 0:18 (+)

Problem D

Unsolved. (-4)

Problem E

Unsolved.

Problem F

Solved by Xiejiadong. 1:03 (+)

题意;有$n$个物品可供选择,每个物品需要花费$c_i$,之后每天都能获得的$p_i$的价值,求最小的天数获得价值$M$。

题解:二分天数,对于所有能赚的物品都收入囊中,和$M$比较大小即可。

Problem G

Solved by Xiejiadong. 1:36 (+)

题意:环上坐着三个队伍,要求同一个队伍的人都坐在一起,求最小化被交换的人数。

题解:首先如果确定了最终状态,那么被交换的人数最少就是和最终状态位置不一样的人数。

于是就是枚举最终状态,枚举三个队伍的相对关系,用暴力,一$6$种情况;

枚举每种情况下所有的队伍关系按照环移动的情况,用六个指针来表示没一个队伍的开头个结尾,用滑动窗口$O(1)$维护就好了。

Problem H

Solved by kilo_5723. 4:10 (+1)

Problem I

Solved by Xiejiadong. 3:21 (+1)

Problem J

Solved by Kilo_5723. 1:24 (+2)

Problem K

Solved by Weaver_zhu. 2:06 (+1)