
贪心
bwcxljsm
这个作者很懒,什么都没留下…
展开
-
561. Array Partition I
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as poss...原创 2018-02-13 21:10:09 · 133 阅读 · 0 评论 -
646. Maximum Length of Pair Chain
You are given n pairs of numbers. In every pair, the first number is always smaller than the second number.Now, we define a pair (c, d) can follow another pair (a, b) if and only if b < c. Chain of...原创 2018-04-11 20:01:19 · 149 阅读 · 0 评论