제출 #14561

#제출 시각아이디문제언어결과실행 시간메모리
14561eric4266버블 정렬 (OJUZ10_bubblesort)C++98
11 / 100
6 ms1716 KiB
#include <iostream> using namespace std; int main() { int i,j,n,s,tmp,A[1001]; 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...