Submission #18930

#TimeUsernameProblemLanguageResultExecution timeMemory
18930chan492811버블 정렬 (OJUZ10_bubblesort)C++98
0 / 100
47 ms1980 KiB
#include <cstdio> #include <vector> #include <queue> using namespace std; int n,m; priority_queue<int,vector<int>,greater<int> > pq; int main(){ int i,a; scanf("%d %d",&n,&m); for(i=0;i<=m;i++) scanf("%d",&a),pq.push(a); for(i=m+1;i<n;i++){ printf("%d ",pq.top()); pq.pop(); scanf("%d",&a); pq.push(a); } while(!pq.empty()) printf("%d ",pq.top()),pq.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...