Submission #561743

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5617432022-05-13 12:30:45nghiass001Parrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#define FOR(i,l,r) for(int i=(l); i<=(r); ++i)
#define REP(i,l,r) for(int i=(l); i<(r); ++i)
#define FORD(i,r,l) for(int i=(r); i>=(l); --i)
#define REPD(i,r,l) for(int i=(r)-1; i>=(l); --i)
#define getbit(x, i) (((x) >> (i)) & 1)
#define MASK(i) (1 << (i))
using namespace std;
/// BigNum
const long long MOD = (long long)1e16;
typedef vector<long long> BigNum;
bool operator < (BigNum A, BigNum B) {
if (A.size() != B.size()) return A.size() < B.size();
REPD(i, (int)A.size(), 0) if (A[i] != B[i]) return A[i] < B[i];
return false;
}
bool operator <= (BigNum A, BigNum B) {
if (A.size() != B.size()) return A.size() < B.size();
REPD(i, (int)A.size(), 0) if (A[i] != B[i]) return A[i] < B[i];
return true;
}
BigNum operator + (BigNum A, BigNum B) {
BigNum C(max(A.size(), B.size()));
long long carry = 0;
REP(i, 0, C.size()) {
if (i < A.size()) carry += A[i];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

encoder.cpp: In function 'BigNum operator+(BigNum, BigNum)':
encoder.cpp:3:36: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    3 | #define REP(i,l,r) for(int i=(l); i<(r); ++i)
      |                                    ^
encoder.cpp:29:5: note: in expansion of macro 'REP'
   29 |     REP(i, 0, C.size()) {
      |     ^~~
encoder.cpp:30:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 |         if (i < A.size()) carry += A[i];
      |             ~~^~~~~~~~~~
encoder.cpp:31:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   31 |         if (i < B.size()) carry += B[i];
      |             ~~^~~~~~~~~~
encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:102:19: error: 'send' was not declared in this scope
  102 |     REP(i, 0, sz) send(code[i]);
      |                   ^~~~
encoder.cpp:76:9: warning: unused variable 'num' [-Wunused-variable]
   76 |     int num = 0;
      |         ^~~
encoder.cpp: In function 'void decode(int, int, int*)':
encoder.cpp:126:18: error: 'output' was not declared in this scope
  126 |     REP(i, 0, n) output(a[i]);
      |                  ^~~~~~

/usr/bin/ld: /tmp/cc23ygvo.o: in function `main':
grader_decoder.cpp:(.text.startup+0x1ef): undefined reference to `decode(int, int, int*)'
collect2: error: ld returned 1 exit status