Submission #14128

#TimeUsernameProblemLanguageResultExecution timeMemory
14128ggoh버블 정렬 (OJUZ10_bubblesort)C++98
34 / 100
1000 ms3584 KiB
#include<cstdio> #include<algorithm> #include<vector> #include<queue> #include<cstring> long long a,b,i,j,t,p,q,m,n,s,x[160001],y[160001]; main() { scanf("%lld%lld",&a,&b); for(i=0;i<a;i++) { scanf("%lld",&x[i]); } while(b--) { for(i=0;i<a-1;i++) { if(x[i]>x[i+1]) { t=x[i]; x[i]=x[i+1]; x[i+1]=t; } } } for(i=0;i<a;i++) { printf("%lld ",x[i]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...