delete pics to save space

This commit is contained in:
2023-08-03 09:22:52 +08:00
commit de60cd6ed4
1334 changed files with 66221 additions and 0 deletions

View File

@ -0,0 +1,25 @@
#include<cstdio>
#include<algorithm>
using std::sort;
int main()
{
int n,m;
scanf("%d",&n);
int a[n],*p;
for(int i=0;i<n;i++) scanf("%d",a+i);
sort(a,a+n);
scanf("%d",&m);
int le=0,ri=n-1;
while(le<ri)
{
if(a[le]+a[ri]==m)
{
printf("%d %d\n",a[le],a[ri]);
return 0;
}
if(a[le]+a[ri]<m) le++;
else ri--;
}
printf("No\n");
return 0;
}