QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#510722#5207. Interactive Factorial GuessingZhangYiDeCompile Error//C++172.9kb2024-08-09 11:35:432024-08-09 11:35:44

詳細信息

answer.code: In function ‘void Solve()’:
answer.code:71:22: error: ‘sort’ is not a member of ‘std’; did you mean ‘sqrt’?
   71 |                 std::sort(action.begin(), action.end());
      |                      ^~~~
      |                      sqrt
answer.code: In lambda function:
answer.code:83:40: error: ‘upper_bound’ is not a member of ‘std’; did you mean ‘lower_bound’?
   83 |                         auto it = std::upper_bound(action.begin(), action.end(), std::pair<int, int>{best_position, 999999});
      |                                        ^~~~~~~~~~~
      |                                        lower_bound
answer.code: In function ‘int ask(int)’:
answer.code:57:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   57 |         scanf("%d", &r);
      |         ~~~~~^~~~~~~~~~
answer.code: In function ‘void Solve()’:
answer.code:106:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  106 |                         scanf("%s", response.data());
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
answer.code: In function ‘int main()’:
answer.code:118:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  118 |         scanf("%d", &T);
      |         ~~~~~^~~~~~~~~~