Submission #915079

#TimeUsernameProblemLanguageResultExecution timeMemory
915079quanlt206Parrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> #define X first #define Y second #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define REP(i, a, b) for (int i = (a); i < (b); i++) #define FORD(i, b, a) for (int i = (b); i >= (a); i--) #define all(x) begin(x), end(x) #define MASK(x) (1LL << (x)) #define SQR(x) (1LL * (x) * (x)) using namespace std; typedef long long ll; typedef long double ld; typedef double db; typedef pair<int, int> pii; typedef pair<int, pii> piii; typedef pair<ll, ll> pll; typedef pair<ll, pll> plll; typedef pair<ll, int> pli; template<class A, class B> bool maximize(A& x, B y) { if (x < y) return x = y, true; else return false; } template<class A, class B> bool minimize(A& x, B y) { if (x > y) return x = y, true; else return false; } /* END OF TEMPLATE */ void encode(int n, int m[]) { int res = 0; REP(i, 0, n) res = res + MASK(i) * m[i]; send(res); } void decode(int n, int L, int x[]) { REP(i, 0, n) { output((x[0] >> i) & 1); } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> #define X first #define Y second #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define REP(i, a, b) for (int i = (a); i < (b); i++) #define FORD(i, b, a) for (int i = (b); i >= (a); i--) #define all(x) begin(x), end(x) #define MASK(x) (1LL << (x)) #define SQR(x) (1LL * (x) * (x)) using namespace std; typedef long long ll; typedef long double ld; typedef double db; typedef pair<int, int> pii; typedef pair<int, pii> piii; typedef pair<ll, ll> pll; typedef pair<ll, pll> plll; typedef pair<ll, int> pli; template<class A, class B> bool maximize(A& x, B y) { if (x < y) return x = y, true; else return false; } template<class A, class B> bool minimize(A& x, B y) { if (x > y) return x = y, true; else return false; } /* END OF TEMPLATE */ void encode(int n, int m[]) { int res = 0; REP(i, 0, n) res = res + MASK(i) * m[i]; send(res); } void decode(int n, int L, int x[]) { REP(i, 0, n) { output((x[0] >> i) & 1); } }

Compilation message (stderr)

encoder.cpp: In function 'void decode(int, int, int*)':
encoder.cpp:42:9: error: 'output' was not declared in this scope
   42 |         output((x[0] >> i) & 1);
      |         ^~~~~~

decoder.cpp: In function 'void encode(int, int*)':
decoder.cpp:37:5: error: 'send' was not declared in this scope
   37 |     send(res);
      |     ^~~~