Submission #511140

#TimeUsernameProblemLanguageResultExecution timeMemory
511140Salama짝수 정렬 (tutorial3)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include <grader.h> using namespace std; int z[100000]; void q2(int x,int *q){ int d=0; for(int o=0;o<x;o++){ if(q[o]%2==0){z[d]=q[o]; d++;}} sort(z,z+d); for(int o=0;o<d;o++)Report z[o]; }

Compilation message (stderr)

tutorial3.cpp: In function 'void q2(int, int*)':
tutorial3.cpp:5:126: error: expected ';' before 'z'
    5 | void q2(int x,int *q){ int d=0; for(int o=0;o<x;o++){ if(q[o]%2==0){z[d]=q[o]; d++;}} sort(z,z+d); for(int o=0;o<d;o++)Report z[o];
      |                                                                                                                              ^~
      |                                                                                                                              ;
tutorial3.cpp:5:120: warning: statement is a reference, not call, to function 'Report' [-Waddress]
    5 | void q2(int x,int *q){ int d=0; for(int o=0;o<x;o++){ if(q[o]%2==0){z[d]=q[o]; d++;}} sort(z,z+d); for(int o=0;o<d;o++)Report z[o];
      |                                                                                                                        ^~~~~~
tutorial3.cpp:5:120: warning: statement has no effect [-Wunused-value]