Difference between revisions of "2018 Benelux Algorithm Programming Contest (BAPC 18)"
Jump to navigation
Jump to search
Line 27: | Line 27: | ||
== Problem G == | == Problem G == | ||
− | Solved by ultmaster. | + | Solved by ultmaster. 01:20 (+) |
+ | |||
+ | 题意:一个由 ABC 构成的环,问最少要让几个人离席才能让所有同一队的都坐在一起。 | ||
+ | |||
+ | 题解:枚举最终状态(A 开始的位置,后面是 B 还是 C),然后用前缀和快速算出要改的个数。 | ||
== Problem I == | == Problem I == |
Revision as of 07:46, 30 March 2019
Problem A
Solved by ultmaster. 00:17 (+)
在 $n$ 个数里选尽可能多的数,使得没有两个数加起来超过 $x$。
Problem B
Solved by zerol. 01:57 (+)
Problem C
Solved by ultmaster. 01:08 (+)
题意:$\min (ab + ac + bc)$ subject to $abc = n$.
题解:预处理 $n$ 的所有因子,然后三方枚举一下。
Problem F
Solved by ultmaster. 00:42 (+)
题意:有 $n$ 个东西,选第 $i$ 个意味着 第一天赔本 $c_i$,后面每天有 $p_i$ 的利润。可以多选。求最少几天能赚到 $k$ 元跑路。本金无限。
题解:二分答案,然后赚的要,不赚的不要,加起来判一判就好。
Problem G
Solved by ultmaster. 01:20 (+)
题意:一个由 ABC 构成的环,问最少要让几个人离席才能让所有同一队的都坐在一起。
题解:枚举最终状态(A 开始的位置,后面是 B 还是 C),然后用前缀和快速算出要改的个数。
Problem I
Solved by ultmaster. 03:20 (+)
Problem J
Solved by kblack. 01:00 (+)
Problem K
Solved by kblack. 01:44 (+)