QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#117267#6661. 야유회99pts_WACompile Error//C++14813b2023-06-30 19:38:292023-06-30 19:38:53

詳細信息

answer.code:5:6: error: ‘vector’ in namespace ‘std’ does not name a template type
    5 | std::vector<int> s20, s6, s4;
      |      ^~~~~~
answer.code:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
    1 | #include "workshop.h"
  +++ |+#include <vector>
    2 | 
answer.code:7:51: error: ‘std::vector’ has not been declared
    7 | void dfs(int cur, int lim, int cnt, int msk, std::vector<int> &arr) {
      |                                                   ^~~~~~
answer.code:7:57: error: expected ‘,’ or ‘...’ before ‘<’ token
    7 | void dfs(int cur, int lim, int cnt, int msk, std::vector<int> &arr) {
      |                                                         ^
answer.code: In function ‘void dfs(int, int, int, int, int)’:
answer.code:10:17: error: ‘arr’ was not declared in this scope
   10 |                 arr.push_back(msk);
      |                 ^~~
answer.code:13:37: error: ‘arr’ was not declared in this scope
   13 |         dfs(cur + 1, lim, cnt, msk, arr);
      |                                     ^~~
answer.code: In function ‘void init()’:
answer.code:18:26: error: ‘s20’ was not declared in this scope
   18 |         dfs(0, 20, 0, 0, s20);
      |                          ^~~
answer.code:19:25: error: ‘s6’ was not declared in this scope
   19 |         dfs(0, 6, 0, 0, s6);
      |                         ^~
answer.code:20:25: error: ‘s4’ was not declared in this scope
   20 |         dfs(0, 4, 0, 0, s4);
      |                         ^~
answer.code: In function ‘int morning(int, int)’:
answer.code:24:30: error: ‘s20’ was not declared in this scope
   24 |         return __builtin_ctz(s20[x - 1] & ~s20[r - 1]);
      |                              ^~~
answer.code: In function ‘int afternoon(int, int, int)’:
answer.code:28:30: error: ‘s4’ was not declared in this scope
   28 |         return __builtin_ctz(s4[__builtin_ctz(s6[l] & ~s6[x])] & ~s4[__builtin_ctz(s6[x] & ~s6[r])]);
      |                              ^~
answer.code:28:47: error: ‘s6’ was not declared in this scope
   28 |         return __builtin_ctz(s4[__builtin_ctz(s6[l] & ~s6[x])] & ~s4[__builtin_ctz(s6[x] & ~s6[r])]);
      |                                               ^~
answer.code: In function ‘int evening(int, int, int)’:
answer.code:34:1: warning: control reaches end of non-void function [-Wreturn-type]
   34 | }
      | ^