Submission #14148

#TimeUsernameProblemLanguageResultExecution timeMemory
14148ggoh버블 정렬 (OJUZ10_bubblesort)C++98
0 / 100
234 ms11836 KiB
#include<cstdio> #include<algorithm> #include<map> int a,b,i,j,t,p,q,m,n,s,x[160001],y[160001]; std::map<int,int>D,U; main() { scanf("%d%d",&a,&b); for(i=0;i<a;i++) { scanf("%d",&x[i]); y[i]=x[i]; U[x[i]]++; } std::sort(y,y+a); for(i=a-b;i<a;i++) { D[y[i]]++; } for(i=0;i<a;i++) { if(D[x[i]]!=U[x[i]]) { printf("%d ",x[i]); D[x[i]]++; } } for(i=a-b;i<a;i++) { printf("%d ",y[i]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...