Difference between revisions of "2019 Multi-University,Nowcoder Day 7"

From EOJ Wiki
Jump to navigation Jump to search
Line 18: Line 18:
  
 
Solved by Xiejiadong. 03:49:18 (+5)
 
Solved by Xiejiadong. 03:49:18 (+5)
 +
 +
题意:有 $n$ 种树,每种树砍掉一棵都需要 $p_i$ ,每种树有 $c_i$ 棵,现在要求高度最高的树数量超过一半,求最小的看法代价。
 +
 +
题解:把高度相同的树都放在一起。枚举当前最高的树是高度是多少,高度比当前高的肯定全部砍掉。高度比当前低的选择中选择代价最小的来砍掉就好了。
 +
 +
题目中 $c_i$ 和 $p_i$ 看反了,还过样例了。自闭了两个小时。
  
 
== Problem D ==
 
== Problem D ==

Revision as of 11:24, 8 August 2019

Problem A

Solved by Xiejiadong. 00:32:38 (+)

题意:将字符串尽可能少的断开,使得断开的每部分都是其循环串种字典序最小的。

题解:考虑最多的断开情况,一定是 $1111\; 0111\; 0011\; 0001\; 0000$ 如此的。

也就是断开的一定是 $\sqrt{n}$ 级别的。

于是考虑贪心的做,从后往前枚举断点,用最小表示法判断合法性即可。

Problem B

Solved by Weaver_zhu && Kilo_5723. 01:09:39 (+)

Problem C

Solved by Xiejiadong. 03:49:18 (+5)

题意:有 $n$ 种树,每种树砍掉一棵都需要 $p_i$ ,每种树有 $c_i$ 棵,现在要求高度最高的树数量超过一半,求最小的看法代价。

题解:把高度相同的树都放在一起。枚举当前最高的树是高度是多少,高度比当前高的肯定全部砍掉。高度比当前低的选择中选择代价最小的来砍掉就好了。

题目中 $c_i$ 和 $p_i$ 看反了,还过样例了。自闭了两个小时。

Problem D

Solved by Weaver_zhu. 00:03:13 (+)

Problem E

Solved by Kilo_5723. 04:48:49 (+)

Problem F

Unsolved.

Problem G

Unsolved.

Problem H

Unsolved. (-4)

Problem I

Solved by Kilo_5723. 03:13:21 (+)

Problem J

Solved by Xiejiadong. 00:06:51 (+)

Problem K

Unsolved.