Submission #525232

#TimeUsernameProblemLanguageResultExecution timeMemory
525232pokmui9909짝수 정렬 (tutorial3)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; int sort_even(int N, int *A){ vector<ll> V; for(int i = 0; i < N; i++){ if(A[i] % 2 == 0){ V.push_back(A[i]); } } sort(V.begin(), V.end()); for(int i = 0; i < V.size(); i++){ Report(V[i]); } }

Compilation message (stderr)

tutorial3.cpp: In function 'int sort_even(int, int*)':
tutorial3.cpp:13:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |     for(int i = 0; i < V.size(); i++){
      |                    ~~^~~~~~~~~~
tutorial3.cpp:14:9: error: 'Report' was not declared in this scope
   14 |         Report(V[i]);
      |         ^~~~~~
tutorial3.cpp:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | }
      | ^