Submission #14085

#TimeUsernameProblemLanguageResultExecution timeMemory
14085uhmtoto버블 정렬 (OJUZ10_bubblesort)C++98
34 / 100
1000 ms1472 KiB
#include <stdio.h> #include <algorithm> using namespace std; int n, k, m[100010]; int main() { int p, i; scanf("%d %d", &n, &k); for(i=0;i<n;i++) { scanf("%d", &m[i]); } for(p=0;p<k;p++) { for(i=0;i<n-1;i++) { if(m[i]>m[i+1]) swap(m[i], m[i+1]); } } for(i=0;i<n;i++) { printf("%d ", m[i]); } printf("\n"); 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...