제출 #15644

#제출 시각아이디문제언어결과실행 시간메모리
15644ggoh버블 정렬 (OJUZ10_bubblesort)C++98
100 / 100
81 ms6224 KiB
#include<cstdio> #include<set> int a,b,i,x[100001]; 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...