Submission #243479

#TimeUsernameProblemLanguageResultExecution timeMemory
243479prarie짝수 정렬 (tutorial3)C++14
100 / 100
5 ms384 KiB
#include <vector> #include <algorithm> #include "grader.h" using namespace std; void sort_even(int n, int *a) { vector<int> res; for (int i = 0; i < n; i++) if (a[i] % 2 == 0) res.push_back(a[i]); sort(res.begin(), res.end()); for (int i = 0; i < res.size(); i++) Report(res[i]); }

Compilation message (stderr)

tutorial3.cpp: In function 'void sort_even(int, int*)':
tutorial3.cpp:11:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < res.size(); i++) Report(res[i]);
                  ~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...