QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#729473#9570. Binary Treeucup-team4883#Compile Error//C++141.8kb2024-11-09 17:12:032024-11-09 17:12:03

Details

answer.code: In function ‘void init()’:
answer.code:86:13: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
   86 |         tot=cnt=0;
      |             ^~~
      |             int
answer.code: In function ‘int query(int, int)’:
answer.code:32:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   32 |         scanf("%d",&res);
      |         ~~~~~^~~~~~~~~~~
answer.code: In function ‘void solve()’:
answer.code:90:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   90 |         scanf("%d",&n);
      |         ~~~~~^~~~~~~~~
answer.code:94:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   94 |                 scanf("%d%d",&x,&y);
      |                 ~~~~~^~~~~~~~~~~~~~