QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#347232#8062. Guess WhoZhangYiDeCompile Error//C++17920b2024-03-09 12:31:202024-03-09 12:31:21

詳細信息

answer.code: In function ‘int main()’:
answer.code:40:9: error: ‘vector’ was not declared in this scope
   40 |         vector<int> ans;
      |         ^~~~~~
answer.code:5:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
    4 | #include <algorithm>
  +++ |+#include <vector>
    5 | #define ll long long
answer.code:40:16: error: expected primary-expression before ‘int’
   40 |         vector<int> ans;
      |                ^~~
answer.code:42:40: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
   42 |                 if((a[i]&set) == goal) ans.push_back(i+1);
      |                                        ^~~
      |                                        abs
answer.code:45:12: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
   45 |         if(ans.size() == 1) {
      |            ^~~
      |            abs
answer.code:26:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   26 |                 scanf("%s", str);
      |                 ~~~~~^~~~~~~~~~~
answer.code:33:36: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   33 |                 int x; rd(x); scanf("%s", str);
      |                               ~~~~~^~~~~~~~~~~