Submission #1128290

#TimeUsernameProblemLanguageResultExecution timeMemory
1128290aarpen버블 정렬 (OJUZ10_bubblesort)C++20
34 / 100
1096 ms1000 KiB
#include<bits/stdc++.h> using namespace std; int main(){ int N, K; cin >> N; cin >> K; vector<int> seq; for(int i = 0; i < N; i++){ int temp; cin >> temp; seq.push_back(temp); } for (int z = 0; z < K; z++){ for(int l = 0; l < N - 1; l++){ if(seq[l] > seq[l + 1]){ int lemp; lemp = seq[l]; seq[l] = seq[l + 1]; seq[l + 1] = lemp; } } } for(int ll = 0; ll < N; ll++){ cout << seq[ll] << " "; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...