Submission #14152

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