Submission #14195

#TimeUsernameProblemLanguageResultExecution timeMemory
14195ainu7버블 정렬 (OJUZ10_bubblesort)C++98
34 / 100
1000 ms2108 KiB
#include <math.h> #include <stdio.h> #include <string.h> #include <vector> #include <string> #include <queue> #include <map> #include <algorithm> #include <cmath> #include <iostream> #include <sstream> #include <set> using namespace std; int main() { int N, K; cin >> N >> K; vector<int> V(N); for (int i=0; i<N; i++) cin >> V[i]; for (int i=0; i<K; i++) { for (int j=0; j<N-1; j++) if (V[j] > V[j+1]) swap(V[j], V[j+1]); } for (int i=0; i<N; i++) cout << V[i] << " "; cout << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...