Submission #14063

#TimeUsernameProblemLanguageResultExecution timeMemory
14063kipa00버블 정렬 (OJUZ10_bubblesort)C++98
34 / 100
1000 ms1472 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...