Submission #19222

#TimeUsernameProblemLanguageResultExecution timeMemory
19222LK149짝수 정렬 (tutorial3)C++98
100 / 100
0 ms1084 KiB
#include "grader.h" #include <stdlib.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]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...