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<cstdio>
#include<set>
int a,b,i,x;
std::multiset<int>S;
std::multiset<int>::iterator t;
main()
{
scanf("%d%d",&a,&b);
for(i=0;i<=b;i++)
{
scanf("%d",&x);
S.insert(x);
}
for(;!S.empty();i++)
{
t=S.begin();
printf("%d ",*t);
S.erase(t);
if(i<a)scanf("%d",&x),S.insert(x);
}
}
# | 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... |