#include<iostream>
#include<algorithm>
#include<unordered_set>
using namespace std;
const int inf=0x3f3f3f3f;
int main()
{
int n,m,a=inf,b;
cin>>n>>m;
unordered_set <int> hash ;
while(n--)
{
int x;
cin>>x;
int y=m-x;
if(hash.count(y))
{
hash.insert(x);
if(x>y) swap(x,y);
if(x<a) a=x,b=y;
}
else hash.insert(x);
}
if(a!=inf) cout<<a<<' '<<b<<endl;
else puts("No Solution");
return 0;
}
1522..
最新推荐文章于 2025-08-05 19:50:13 发布