답안 #575332

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
575332 2022-06-10T08:16:27 Z SilentVisitor 짝수 정렬 (tutorial3) C++17
컴파일 오류
0 ms 0 KB
#include "grader.h" 
#include<bits/stdc++.h> 
using namespace std; 

#define ll long long 

void sort_even(int n, int* a){{
            vector<int> dp; 
            for(int i = 0; i < n; i += 1){
                 if(!(a[i] & 1)) 
                      dp.push_back(a[i]); 

            sort(dp.begin(), dp.end()); 
            for(int x : dp)
                  Report(x); 
}

Compilation message

tutorial3.cpp: In function 'void sort_even(int, int*)':
tutorial3.cpp:16:1: error: expected '}' at end of input
   16 | }
      | ^
tutorial3.cpp:7:31: note: to match this '{'
    7 | void sort_even(int n, int* a){{
      |                               ^
tutorial3.cpp:16:1: error: expected '}' at end of input
   16 | }
      | ^
tutorial3.cpp:7:30: note: to match this '{'
    7 | void sort_even(int n, int* a){{
      |                              ^