QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#402536#8320. 种树jxy2012#Compile Error//C++202.0kb2024-04-30 19:44:262024-04-30 19:44:27

Details

answer.code:7:23: error: declaration does not declare anything [-fpermissive]
    7 | #define u128 unsigned __int128;
      |                       ^~~~~~~~
answer.code:8:1: note: in expansion of macro ‘u128’
    8 | u128 f[N][N][N];
      | ^~~~
answer.code:8:6: error: ‘f’ does not name a type
    8 | u128 f[N][N][N];
      |      ^
answer.code: In function ‘void init(int)’:
answer.code:11:5: error: ‘f’ was not declared in this scope
   11 |     f[n][n][n] = 1;
      |     ^
answer.code: At global scope:
answer.code:7:23: error: declaration does not declare anything [-fpermissive]
    7 | #define u128 unsigned __int128;
      |                       ^~~~~~~~
answer.code:37:1: note: in expansion of macro ‘u128’
   37 | u128 encode(int n, const int *p) {
      | ^~~~
answer.code:37:6: error: ISO C++ forbids declaration of ‘encode’ with no type [-fpermissive]
   37 | u128 encode(int n, const int *p) {
      |      ^~~~~~
answer.code: In function ‘int encode(int, const int*)’:
answer.code:7:23: error: declaration does not declare anything [-fpermissive]
    7 | #define u128 unsigned __int128;
      |                       ^~~~~~~~
answer.code:50:5: note: in expansion of macro ‘u128’
   50 |     u128 res = 0;
      |     ^~~~
answer.code:50:10: error: ‘res’ was not declared in this scope
   50 |     u128 res = 0;
      |          ^~~
answer.code:53:20: error: ‘f’ was not declared in this scope
   53 |             res += f[n - 1][a + 1][b];
      |                    ^
answer.code: At global scope:
answer.code:7:31: error: expected ‘)’ before ‘;’ token
    7 | #define u128 unsigned __int128;
      |                               ^
answer.code:62:20: note: in expansion of macro ‘u128’
   62 | void decode(int n, u128 M, int *p) {
      |                    ^~~~
answer.code:62:12: note: to match this ‘(’
   62 | void decode(int n, u128 M, int *p) {
      |            ^
answer.code:62:25: error: ‘M’ does not name a type
   62 | void decode(int n, u128 M, int *p) {
      |                         ^
grader_encoder.cpp: In function ‘__int128 unsigned {anonymous}::read()’:
grader_encoder.cpp:7:45: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 | #define gc() ((buff == buf + 100000 ? (fread(buf,1,100000,stdin),buff = buf) : 0),*(buff++))
      |                                        ~~~~~^~~~~~~~~~~~~~~~~~~~
grader_encoder.cpp:12:17: note: in expansion of macro ‘gc’
   12 |         int c = gc();
      |                 ^~
grader_encoder.cpp:7:45: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 | #define gc() ((buff == buf + 100000 ? (fread(buf,1,100000,stdin),buff = buf) : 0),*(buff++))
      |                                        ~~~~~^~~~~~~~~~~~~~~~~~~~
grader_encoder.cpp:13:39: note: in expansion of macro ‘gc’
   13 |         while(c < '0' || c > '9') c = gc();
      |                                       ^~
grader_encoder.cpp:7:45: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 | #define gc() ((buff == buf + 100000 ? (fread(buf,1,100000,stdin),buff = buf) : 0),*(buff++))
      |                                        ~~~~~^~~~~~~~~~~~~~~~~~~~
grader_encoder.cpp:14:62: note: in expansion of macro ‘gc’
   14 |         while(c >= '0' && c <= '9') x = x * 10 + c - '0',c = gc();
      |                                                              ^~