Submission #14142

#TimeUsernameProblemLanguageResultExecution timeMemory
14142minchurl버블 정렬 (OJUZ10_bubblesort)C++98
34 / 100
1000 ms1472 KiB
#include<stdio.h> int b[100005],n,k; int main(){ int temp,i,j; scanf("%d %d",&n,&k); for(i=0;i<n;i++) scanf("%d",&b[i]); for(i=1;i<=k;i++){ for(j=0;j<n-i;j++){ if(b[j]>b[j+1]){ temp=b[j]; b[j]=b[j+1]; b[j+1]=temp; } } } for(i=0;i<n;i++) printf("%d ",b[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...