Submission #164281

#TimeUsernameProblemLanguageResultExecution timeMemory
164281daddy0h짝수 정렬 (tutorial3)C++11
Compilation error
0 ms0 KiB
/// https://oj.uz/problem/view/tutorial3 #include <bits/stdc++.h> using namespace std; void sort_even(int N, int A[]) { vector<int> even; for(int id=0; id<N; ++id) { if(A[id] % 2 == 0) even.push_back(A[id]); } sort(even.begin(), even.end()); if(even.size() == 0) return; else { for(int id=0; id<even.size(); ++id) { Report(even[id]); } } }

Compilation message (stderr)

tutorial3.cpp: In function 'void sort_even(int, int*)':
tutorial3.cpp:19:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int id=0; id<even.size(); ++id)
                       ~~^~~~~~~~~~~~
tutorial3.cpp:21:13: error: 'Report' was not declared in this scope
             Report(even[id]); 
             ^~~~~~
tutorial3.cpp:21:13: note: suggested alternative: 'qsort'
             Report(even[id]); 
             ^~~~~~
             qsort