# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
689806 | TomitaMatei | Table Tennis (info1cup20_tabletennis) | C++14 | 8 ms | 860 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <algorithm>
using namespace std;
int n,k,i,j,i1,j1,st,dr,s,nr,v[16000];
int main()
{
cin>>n>>k;
for (i=1; i<=n+k; i++)
cin>>v[i];
sort (v,v+n+1);
for (st=1; st<=k+1; st++)
for (dr=n; dr>=st+n-1; dr--)
{
i=st;
j=dr;
s=v[i]+v[j];
i++;
j--;
nr=2;
while (s==v[i]+v[j])
{
nr=nr+2;
if (nr==n)
{
for (i1=st; i1<=i; i1++)
cout<<v[i1]<<" ";
for (j1=j; j1<=dr; j1++)
cout<<v[j1]<<" ";
return 0;
}
i++;
j--;
}
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |