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 <stdio.h>
int arr[100000];
int main()
{
int t, n, k, i, j;
scanf("%d%d", &n, &k);
if(n>2000)
return 0;
for(i=0;i<n;i++)
scanf("%d", &arr[i]);
for(i=0;i<k;i++)
{
for(j=1;j<n;j++)
{
if(arr[j-1]>arr[j])
{
t=arr[j-1];
arr[j-1]=arr[j];
arr[j]=t;
}
}
}
for(i=0;i<n;i++)
printf("%d ", arr[i]);
return 0;
}
# | 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... |