QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#841154#8857. Low PowerZhaoZiLongCompile Error//C++14971b2025-01-03 14:30:412025-01-03 14:30:42

详细

answer.code: In function ‘bool check(const VI&, int)’:
answer.code:6:39: warning: no return statement in function returning non-void [-Wreturn-type]
    6 | bool check(const VI& P, const int d) {}
      |                                       ^
answer.code: In function ‘int main()’:
answer.code:29:11: error: no match for call to ‘(main()::<lambda(int)>) (std::vector<int>&, int&)’
   29 |     (check(P, d = (l + r) / 2)) ? (r = d - 1, ans = d) : (l = d + 1);
      |      ~~~~~^~~~~~~~~~~~~~~~~~~~
answer.code:14:16: note: candidate: ‘main()::<lambda(int)>’
   14 |   auto check = [&](int d) {
      |                ^
answer.code:14:16: note:   candidate expects 1 argument, 2 provided