Submission #15643

#TimeUsernameProblemLanguageResultExecution timeMemory
15643ggoh버블 정렬 (OJUZ10_bubblesort)C++98
100 / 100
81 ms6460 KiB
#include<cstdio> #include<set> int a,b,i,x[160001]; std::multiset<int>S; std::multiset<int>::iterator t; 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++) { 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...