# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
501 | 2013-02-28T04:54:49 Z | pl0892029 | 짝수 정렬 (tutorial3) | C++ | 0 ms | 0 KB |
void sort_even(int N,int *A) { int S[100]; int i,j,n=0; for(i=0;i<N;i++) if(A[i]%2==0) S[n++]=A[i]; for(i=n-1;i>0;i--) for(j=0;j<i;j++) if(S[j]>S[j+1]) { S[j+1]+=S[j]; S[j]=S[j+1]-S[j]; S[j+1]-=S[j]; } for(i=0;i<n;i++) Report(S[i]); }