Submission #145837

#TimeUsernameProblemLanguageResultExecution timeMemory
145837j07801짝수 정렬 (tutorial3)C++14
Compilation error
0 ms0 KiB
#include<stdio.h> #include<algorithm> #include "grader.h" using namespace std; int B[1000000]; int sort_even(int N, A[]){ int cnt = 0; for (int i = 0; i < N; i++){ if (A[i] % 2 == 0){ B[cnt++] = A[i]; } } sort(B, B + cnt); for (int i = 0; i < cnt; i++){ Report(B[i]); } return 0; }

Compilation message (stderr)

tutorial3.cpp:6:22: error: 'A' has not been declared
 int sort_even(int N, A[]){
                      ^
tutorial3.cpp: In function 'int sort_even(int, int*)':
tutorial3.cpp:10:7: error: 'A' was not declared in this scope
   if (A[i] % 2 == 0){
       ^