0
点赞
收藏
分享

微信扫一扫

Maximum Sum Not Exceeding K(翻译)

静守幸福 2022-02-07 阅读 42
c++

http://noi.openjudge.cn/english/16/

描述

Given N numbers, find two different numbers from them such that the sum of the two numbers is maximum but not exceeding K.

输入

First line: two positive integers N (N <= 1000) and K (K <= 1000000).
Second line: N positive integers (<= 1000000).

输出

Two integers.

                                最大和不超过K

描述:

给定N个数字,找到两个不同的数字并使其和最大但不超过K。

输入:

第一行:两个正整数NN <= 1000 KK < = 1000000

第二行:N个正整数<= 1000000

输出:

两个整数

      

举报

相关推荐

0 条评论