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>
#include <algorithm>
using namespace std;
int n, k, m[100010];
int main() {
int p, i;
scanf("%d %d", &n, &k);
for(i=0;i<n;i++) {
scanf("%d", &m[i]);
}
for(p=0;p<k;p++) {
for(i=0;i<n-1;i++) {
if(m[i]>m[i+1]) swap(m[i], m[i+1]);
}
}
for(i=0;i<n;i++) {
printf("%d ", m[i]);
}
printf("\n");
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... |