[亚麻社招OA]Two Sum Closest(APP前后端内存版)

Input:

List of foregroundApp

List of backgroundApp

int capacity

Example:

Input : 

capacity = 52

foregroundApp =  [ [1, 4], [2, 43], [3, 54], [4, 67] ]     (备注:第一个是ID, 第二个是需要用到的内存)

backgroundApp =  [ [1, 10], [2, 22], [3, 55], [4, 99] ]   (备注:第一个是ID, 第二个是需要用到的内存)

Output:

[[2,1]]

注意: 

有的会要求返回一个合法解; 有的会要求返回所可能解。注意读题

猜你喜欢

转载自www.cnblogs.com/liuliu5151/p/11026144.html