# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
501 | pl0892029 | 짝수 정렬 (tutorial3) | C++98 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
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]);
}