Submission #15641

#TimeUsernameProblemLanguageResultExecution timeMemory
15641ggoh버블 정렬 (OJUZ10_bubblesort)C++98
100 / 100
85 ms6456 KiB
#include<cstdio> #include<set> int a,b,i,x[160001]; std::multiset<int>S; main() { scanf("%d%d",&a,&b); for(i=0;i<a;i++) { scanf("%d",&x[i]); if(i<=b)S.insert(x[i]); } for(i=0;i<a;i++) { std::multiset<int>::iterator t=S.begin(); printf("%d ",*t); S.erase(t); if(i+b+1<a)S.insert(x[i+b+1]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...