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<algorithm>
#include<vector>
#include<queue>
#include<cstring>
long long a,b,i,j,t,p,q,m,n,s,x[160001],y[160001];
main()
{
scanf("%lld%lld",&a,&b);
for(i=0;i<a;i++)
{
scanf("%lld",&x[i]);
}
while(b--)
{
for(i=0;i<a-1;i++)
{
if(x[i]>x[i+1])
{
t=x[i];
x[i]=x[i+1];
x[i+1]=t;
}
}
}
for(i=0;i<a;i++)
{
printf("%lld ",x[i]);
}
}
# | 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... |