QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#111621#6337. Mizuyokan 2goodmanCompile Error//C++171.9kb2023-06-07 19:37:272023-06-07 19:37:31

詳細信息

answer.code: In function ‘int calc(int, int)’:
answer.code:35:32: error: ‘assert’ was not declared in this scope
   35 |         query(1,l,r,l,res);s=0;assert(l<=r);
      |                                ^~~~~~
answer.code:3:1: note: ‘assert’ is defined in header ‘<cassert>’; did you forget to ‘#include <cassert>’?
    2 | #include<iostream>
  +++ |+#include <cassert>
    3 | using namespace std;
answer.code: In function ‘int main()’:
answer.code:40:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   40 |         scanf("%d",&n);
      |         ~~~~~^~~~~~~~~
answer.code:41:36: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   41 |         for(int i=1;i<=n;++i) scanf("%d",&L[i]),chg(i,L[i]);
      |                               ~~~~~^~~~~~~~~~~~
answer.code:43:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   43 |         scanf("%d",&q);
      |         ~~~~~^~~~~~~~~
answer.code:45:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   45 |                 scanf("%d%d%d%d",&x,&y,&l,&r);++l;ans=1;
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~