QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#514124#9168. Square Locatorucup-team2622#Compile Error//C++201.9kb2024-08-10 22:06:012024-08-10 22:06:02

Details

answer.code: In function ‘__int128 sqt(__int128)’:
answer.code:42:22: error: call of overloaded ‘sqrt(__int128&)’ is ambiguous
   42 |     __int128 n = sqrt(x) + 5;
      |                  ~~~~^~~
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/c++config.h:679,
                 from /usr/include/c++/13/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:33,
                 from answer.code:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:143:1: note: candidate: ‘double sqrt(double)’
  143 | __MATHCALL (sqrt,, (_Mdouble_ __x));
      | ^~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:114:
/usr/include/c++/13/cmath:442:3: note: candidate: ‘constexpr long double std::sqrt(long double)’
  442 |   sqrt(long double __x)
      |   ^~~~
/usr/include/c++/13/cmath:438:3: note: candidate: ‘constexpr float std::sqrt(float)’
  438 |   sqrt(float __x)
      |   ^~~~