Borderou de evaluare (job #3249542)
Utilizator | Data | 16 octombrie 2024 20:12:22 | |
---|---|---|---|
Problema | Copaci | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int32_t main()':
main.cpp:29:23: error: call of overloaded 'abs(long long unsigned int)' is ambiguous
29 | k += __gcd(abs(v[i].first - v[i+1].second), abs(v[i].second - v[i+1].second));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/bits/std_abs.h:38,
from /usr/include/c++/12.2.1/cmath:47,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:41,
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;
| ^~~
/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)
| ^~~
/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:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/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:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
main.cpp:29:56: error: call of overloaded 'abs(long long unsigned int)' is ambiguous
29 | k += __gcd(abs(v[i].first - v[i+1].second), abs(v[i].second - v[i+1].second));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:861:12: note: candidate: 'int abs(int)'
861 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
/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)
| ^~~
/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:71:3: note: candidate: 'constexpr double std::abs(double)'
71 | abs(double __x)
| ^~~
/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:56:3: note: candidate: 'long int std::abs(long int)'
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !