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>
int arr[100000];
int main() {
int N, K, i, j;
scanf("%d %d", &N, &K);
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]) {
arr[j-1] ^= arr[j] ^= arr[j-1] ^= arr[j];
}
}
}
for (i=0; i<N; ++i) {
printf("%d ", arr[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... |