Submission #16623

#TimeUsernameProblemLanguageResultExecution timeMemory
16623eaststar버블 정렬 (OJUZ10_bubblesort)C++14
100 / 100
63 ms2492 KiB
#include <bits/stdc++.h> using namespace std; priority_queue<int,vector<int>,greater<int> > q; int main(){ int i,n,k,a; scanf("%d%d",&n,&k); for(i=1;i<=k;++i){ scanf("%d",&a); q.push(a); } for(;i<=n;++i){ scanf("%d",&a); q.push(a); printf("%d ",q.top()); q.pop(); } while(!q.empty())printf("%d ",q.top()),q.pop(); 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...