Submission #145843

#TimeUsernameProblemLanguageResultExecution timeMemory
145843leewj1025짝수 정렬 (tutorial3)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include<algorithm> void sort_even(int N, int *A) { int i; sort(A, A + N); for(i = 0; i < N; i++) { if(A[i] % 2 == 0) Report(A[i]); } }

Compilation message (stderr)

tutorial3.cpp: In function 'void sort_even(int, int*)':
tutorial3.cpp:5:2: error: 'sort' was not declared in this scope
  sort(A, A + N);
  ^~~~
tutorial3.cpp:5:2: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
                 from tutorial3.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:4856:5: note:   'std::sort'
     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
     ^~~~