QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#472385#4928. Game With NumbersMaMengQiCompile Error//C++14644b2024-07-11 16:04:492024-07-11 16:04:49

Details

answer.code: In function ‘int main()’:
answer.code:26:17: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=]
   26 |         scanf("%d",&n,&m);
      |                ~^  ~~
      |                 |  |
      |                 |  long long int*
      |                 int*
      |                %lld
answer.code:26:15: warning: too many arguments for format [-Wformat-extra-args]
   26 |         scanf("%d",&n,&m);
      |               ^~~~
answer.code:33:25: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=]
   33 |                 scanf("%d",&x);
      |                        ~^  ~~
      |                         |  |
      |                         |  long long int*
      |                         int*
      |                        %lld
answer.code:37:39: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=]
   37 |         for(int i=1;i<=m;i++) scanf("%d",&a[i]);
      |                                      ~^  ~~~~~
      |                                       |  |
      |                                       |  long long int*
      |                                       int*
      |                                      %lld
answer.code:38:27: error: ‘g’ was not declared in this scope
   38 |         printf("%d",cmp(1,g));
      |                           ^
answer.code:26:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   26 |         scanf("%d",&n,&m);
      |         ~~~~~^~~~~~~~~~~~
answer.code:33:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   33 |                 scanf("%d",&x);
      |                 ~~~~~^~~~~~~~~
answer.code:37:36: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   37 |         for(int i=1;i<=m;i++) scanf("%d",&a[i]);
      |                               ~~~~~^~~~~~~~~~~~