Borderou de evaluare (job #3182576)
Utilizator | Data | 9 decembrie 2023 10:34:52 | |
---|---|---|---|
Problema | Abx | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'long long unsigned int Binary_Search(long long unsigned int, long long int)':
main.cpp:32:27: warning: comparison of integer expressions of different signedness: 'long long int' and 'long long unsigned int' [-Wsign-compare]
32 | if (res==-1 || res>=x) {
| ~~~^~~
main.cpp:35:21: warning: comparison of integer expressions of different signedness: 'long long unsigned int' and 'long long int' [-Wsign-compare]
35 | if (mid > res) {
| ~~~~^~~~~
main.cpp: In function 'int main()':
main.cpp:54:36: warning: comparison of integer expressions of different signedness: 'long long int' and 'long long unsigned int' [-Wsign-compare]
54 | if (power!=-1 && power <=m && std::abs(x-power)<=abs(x-best)) {
| ~~~~~~^~~
main.cpp:54:51: error: call of overloaded 'abs(long long unsigned int)' is ambiguous
54 | if (power!=-1 && power <=m && std::abs(x-power)<=abs(x-best)) {
| ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/12.2.1/cstdlib:75,
from /usr/include/c++/12.2.1/ext/string_conversions.h:41,
from /usr/include/c++/12.2.1/bits/basic_string.h:3960,
from /usr/include/c++/12.2.1/string:53,
from /usr/include/c++/12.2.1/bits/locale_classes.h:40,
from /usr/include/c++/12.2.1/bits/ios_base.h:41,
from /usr/include/c++/12.2.1/ios:42,
from /usr/include/c++/12.2.1/ostream:38,
from /usr/include/c++/12.2.1/iostream:39,
from main.cpp:1:
/usr/include/stdlib.h:861:12: note: candidate: 'int abs(int)'
861 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
In file included from /usr/include/c++/12.2.1/cstdlib:77:
/usr/include/c++/12.2.1/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
/usr/include/c++/12.2.1/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/usr/include/c++/12.2.1/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/usr/include/c++/12.2.1/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
75 | abs(float __x)
| ^~~
/usr/include/c++/12.2.1/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
79 | abs(long double __x)
| ^~~
main.cpp:58:36: warning: comparison of integer expressions of different signedness: 'long long int' and 'long long unsigned int' [-Wsign-compare]
58 | if (power!=-1 && power <=m && std::abs(x-power)<abs(x-best)) {
| ~~~~~~^~~
main.cpp:58:51: error: call of overloaded 'abs(long long unsigned int)' is ambiguous
58 | if (power!=-1 && power <=m && std::abs(x-power)<abs(x-best)) {
| ~~~~~~~~^~~~~~~~~
/usr/include/stdlib.h:861:12: note: candidate: 'int abs(int)'
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !