# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19221 | 2016-02-21T11:18:00 Z | LK149 | 짝수 정렬 (tutorial3) | C++ | 0 ms | 0 KB |
#include "grader.h" int compare(const void* n1, const void* n2){ int a = *(int*)n1; int b = *(int*)n2; if (a>b) return 1; else if (a<b) return -1; else return 0; } void sort_even(int N, int *A) { int i; qsort(A, N, sizeof(int), compare); for (i = 0; i < N; i++) { if (A[i] % 2 == 0) Report(A[i]); } }