제출 #145828

#제출 시각아이디문제언어결과실행 시간메모리
145828hahorse짝수 정렬 (tutorial3)C++14
100 / 100
2 ms504 KiB
#include <stdio.h>
#include <vector>
#include <algorithm>
#include "grader.h"
using namespace std;
int sort_even(int n, int *a){
	vector <int > v;
	for(int i=0;i<n;i++){
      if(a[i]%2==0){
        v.push_back(a[i]);
      }
    }
  sort(v.begin(),v.end());
	for(auto it:v){
      Report(it);
    }
}

컴파일 시 표준 에러 (stderr) 메시지

tutorial3.cpp: In function 'int sort_even(int, int*)':
tutorial3.cpp:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...