Submission #14283

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