QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#373894#8329. Excuseucup-team241#Compile Error//C++234.9kb2024-04-02 10:08:372024-04-02 10:08:37

详细

answer.code:36:19: error: ‘int select [10005][7]’ redeclared as different kind of entity
   36 | int select[maxn][7];
      |                   ^
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179,
                 from /usr/include/stdlib.h:394,
                 from /usr/include/c++/13/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:42,
                 from answer.code:2:
/usr/include/x86_64-linux-gnu/sys/select.h:101:12: note: previous declaration ‘int select(int, fd_set*, fd_set*, fd_set*, timeval*)’
  101 | extern int select (int __nfds, fd_set *__restrict __readfds,
      |            ^~~~~~
answer.code: In function ‘void init_ways()’:
answer.code:41:33: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   41 |             if (i == 0) select[i][j] = (j == 0);
      |                                 ^
answer.code:41:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   41 |             if (i == 0) select[i][j] = (j == 0);
      |                                    ^
answer.code:41:38: error: assignment of read-only location ‘*(select + (((sizetype)i) + ((sizetype)j)))’
   41 |             if (i == 0) select[i][j] = (j == 0);
      |                         ~~~~~~~~~~~~~^~~~~~~~~~
answer.code:43:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   43 |                 select[i][j] = (select[i - 1][j] + select[i - 1][(j + 6) % 7]) % mod;
      |                         ^
answer.code:43:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   43 |                 select[i][j] = (select[i - 1][j] + select[i - 1][(j + 6) % 7]) % mod;
      |                            ^
answer.code:43:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   43 |                 select[i][j] = (select[i - 1][j] + select[i - 1][(j + 6) % 7]) % mod;
      |                                             ^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
answer.code:43:48: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   43 |                 select[i][j] = (select[i - 1][j] + select[i - 1][(j + 6) % 7]) % mod;
      |                                                ^
answer.code:43:64: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   43 |                 select[i][j] = (select[i - 1][j] + select[i - 1][(j + 6) % 7]) % mod;
      |                                                                ^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
answer.code:43:77: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   43 |                 select[i][j] = (select[i - 1][j] + select[i - 1][(j + 6) % 7]) % mod;
      |                                                                             ^
answer.code:43:50: error: invalid operands of types ‘int(int, fd_set*, fd_set*, fd_set*, timeval*)’ and ‘int(int, fd_set*, fd_set*, fd_set*, timeval*)’ to binary ‘operator+’
   43 |                 select[i][j] = (select[i - 1][j] + select[i - 1][(j + 6) % 7]) % mod;
      |                                 ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                |                            |
      |                                                |                            int(int, fd_set*, fd_set*, fd_set*, timeval*)
      |                                                int(int, fd_set*, fd_set*, fd_set*, timeval*)
answer.code: In function ‘int ways(int, int)’:
answer.code:72:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   72 |         else ans = ans * select[total][goal] % mod;
      |                                      ^
answer.code:72:44: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   72 |         else ans = ans * select[total][goal] % mod;
      |                                            ^
answer.code:72:24: error: invalid operands of types ‘long long int’ and ‘int(int, fd_set*, fd_set*, fd_set*, timeval*)’ to binary ‘operator*’
   72 |         else ans = ans * select[total][goal] % mod;
      |                    ~~~ ^ ~~~~~~~~~~~~~~~~~~~
      |                    |                       |
      |                    long long int           int(int, fd_set*, fd_set*, fd_set*, timeval*)
answer.code: In function ‘int main()’:
answer.code:165:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  165 |         scanf("%s", s + 1);
      |         ~~~~~^~~~~~~~~~~~~