码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2019-06-15 09:33:15      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:app   返回   inpu   for   lis   output   aci   第一个   注意   

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]]

 

 

注意: 

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

 

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

标签:app   返回   inpu   for   lis   output   aci   第一个   注意   

原文地址:https://www.cnblogs.com/liuliu5151/p/11026144.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!