Difference between revisions of "2019 Multi-University,HDU Day 10"

From EOJ Wiki
Jump to navigation Jump to search
(Created page with "== Problem A == Unsolved. == Problem B == Unsolved. == Problem C == Solved by Kilo_5723. 00:43:29 (+2) == Problem D == Unsolved. == Problem E == Solved by Xiejiadong....")
 
Line 18: Line 18:
  
 
Solved by Xiejiadong. 01:34:34 (+1)
 
Solved by Xiejiadong. 01:34:34 (+1)
 +
 +
题意:每个人有两个属性 $a_i$ 和 $b_i$ ,将人分类,使得 $|max{a_i}-max{b_i}|$ 最小。
 +
 +
题解:对 $a_i$ 排序,枚举每一个 $a_i$ 作为 $a$ 属性上限的时候的情况,显然比当前 $a_i$ 大的一定是 $b$ ,然后可以选择在比他小的或者相等(不能是自己)中挑一个和 $a_i$ 最接近的且能称为最大值的。
 +
 +
直接拿 set 、 map 玩一下就好了。
 +
 +
lower_bound 写炸了,白给了一发。
  
 
== Problem F ==
 
== Problem F ==

Revision as of 15:26, 21 August 2019

Problem A

Unsolved.

Problem B

Unsolved.

Problem C

Solved by Kilo_5723. 00:43:29 (+2)

Problem D

Unsolved.

Problem E

Solved by Xiejiadong. 01:34:34 (+1)

题意:每个人有两个属性 $a_i$ 和 $b_i$ ,将人分类,使得 $|max{a_i}-max{b_i}|$ 最小。

题解:对 $a_i$ 排序,枚举每一个 $a_i$ 作为 $a$ 属性上限的时候的情况,显然比当前 $a_i$ 大的一定是 $b$ ,然后可以选择在比他小的或者相等(不能是自己)中挑一个和 $a_i$ 最接近的且能称为最大值的。

直接拿 set 、 map 玩一下就好了。

lower_bound 写炸了,白给了一发。

Problem F

Unsolved.

Problem G

Unsolved. (-10)

Problem H

Solved by Xiejiadong. 03:59:44 (+4)

Problem I

Solved by Kilo_5723. 00:26:16 (+)

Problem J

Unsolved.

Problem K

Unsolved.