Submission #1219871

#TimeUsernameProblemLanguageResultExecution timeMemory
1219871SpyrosAlivParrots (IOI11_parrots)C++20
Compilation error
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" #include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; void encode(int n, int m[]) { int fin = 0; for (int i = 0; i < n; i++) { fin |= (1 << m[i]); } send(fin); }
#include "encoder.h" #include "encoderlib.h" #include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; void decode(int n, int l, int x[]) { int fin[n]; for (int i = 0; i < n; i++) { if ((x[0] >> i) & 1) fin[i] = 1; else fin[i] = 0; } output(fin); }

Compilation message (stderr)

# 2번째 컴파일 단계

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:14:12: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   14 |     output(fin);
      |            ^~~
      |            |
      |            int*
In file included from decoder.cpp:4:
decoderlib.h:1:17: note:   initializing argument 1 of 'void output(int)'
    1 | void output(int b);
      |             ~~~~^