Submission #14562

#TimeUsernameProblemLanguageResultExecution timeMemory
14562eric4266버블 정렬 (OJUZ10_bubblesort)C++98
34 / 100
1000 ms1984 KiB
#include <iostream> using namespace std; int main() { int i,j,n,s,tmp,A[100001]; cin>>n>>s; for(i=1;i<=n;i++) cin>>A[i]; for(i=n;i>=n-s+1;i--) for (j=1;j<=i-1;j++) if (A[j]>A[j+1]) { tmp=A[j]; A[j]=A[j+1]; A[j+1]=tmp; } for(i=1;i<=n;i++) cout<<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...