QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#249603#5471. Interactive Number GuessingHuangHanShengCompile Error//C++17646b2023-11-12 13:09:462023-11-12 13:09:47

Details

answer.code: In function ‘int query(ll)’:
answer.code:11:17: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘int’ [-Wformat=]
   11 |         scanf("%d", response);
      |                ~^   ~~~~~~~~
      |                 |   |
      |                 |   int
      |                 int*
answer.code: In function ‘bool ok(ll)’:
answer.code:16:21: error: ‘z’ was not declared in this scope
   16 |         return v <= z;
      |                     ^
answer.code: In function ‘int main()’:
answer.code:20:9: error: ‘p’ was not declared in this scope
   20 |         p[0] = 1ll;
      |         ^
answer.code: In function ‘int query(ll)’:
answer.code:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |         scanf("%d", response);
      |         ~~~~~^~~~~~~~~~~~~~~~