QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#214505#7561. Digit DPucup-team2024Compile Error//C++144.0kb2023-10-14 20:22:222023-10-14 20:22:23

Details

answer.code: In function ‘int new_node(__int128, __int128)’:
answer.code:32:19: error: call of overloaded ‘log2(__int128&)’ is ambiguous
   32 |         int t=log2(l);
      |               ~~~~^~~
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h:586,
                 from /usr/include/c++/11/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:33,
                 from answer.code:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:133:1: note: candidate: ‘double log2(double)’
  133 | __MATHCALL (log2,, (_Mdouble_ __x));
      | ^~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from answer.code:1:
/usr/include/c++/11/cmath:1574:3: note: candidate: ‘constexpr long double std::log2(long double)’
 1574 |   log2(long double __x)
      |   ^~~~
/usr/include/c++/11/cmath:1570:3: note: candidate: ‘constexpr float std::log2(float)’
 1570 |   log2(float __x)
      |   ^~~~
answer.code:38:36: error: call of overloaded ‘log2(__int128)’ is ambiguous
   38 |                 s=add(s,a[(int)log2(r&(-r))]);
      |                                ~~~~^~~~~~~~
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h:586,
                 from /usr/include/c++/11/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:33,
                 from answer.code:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:133:1: note: candidate: ‘double log2(double)’
  133 | __MATHCALL (log2,, (_Mdouble_ __x));
      | ^~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from answer.code:1:
/usr/include/c++/11/cmath:1574:3: note: candidate: ‘constexpr long double std::log2(long double)’
 1574 |   log2(long double __x)
      |   ^~~~
/usr/include/c++/11/cmath:1570:3: note: candidate: ‘constexpr float std::log2(float)’
 1570 |   log2(float __x)
      |   ^~~~
answer.code: In function ‘int main()’:
answer.code:113:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  113 |         scanf("%d%d",&n,&q);
      |         ~~~~~^~~~~~~~~~~~~~
answer.code:114:36: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  114 |         for (int i=0;i<n;i++) scanf("%d",&a[i]);
      |                               ~~~~~^~~~~~~~~~~~
answer.code:131:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  131 |                 scanf("%d",&op);
      |                 ~~~~~^~~~~~~~~~
answer.code:132:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  132 |                 scanf("%s",s);
      |                 ~~~~~^~~~~~~~
answer.code:133:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  133 |                 scanf("%s",t);
      |                 ~~~~~^~~~~~~~
answer.code:137:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  137 |                         scanf("%d",&x);
      |                         ~~~~~^~~~~~~~~