Borderou de evaluare (job #3321020)
| Utilizator | Data | 7 noiembrie 2025 22:28:12 | |
|---|---|---|---|
| Problema | Algoritmul lui Euclid | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void query(int, int, int, int, int)':
main.cpp:29:9: error: reference to 'gcd' is ambiguous
29 | gcd = __gcd(gcd,aint[nod]);
| ^~~
In file included from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:84,
from main.cpp:1:
/usr/include/c++/12.2.1/numeric:164:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)'
164 | gcd(_Mn __m, _Nn __n) noexcept
| ^~~
main.cpp:7:20: note: 'int gcd'
7 | int n,v[2],aint[4],gcd;
| ^~~
main.cpp:29:21: error: reference to 'gcd' is ambiguous
29 | gcd = __gcd(gcd,aint[nod]);
| ^~~
/usr/include/c++/12.2.1/numeric:164:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)'
164 | gcd(_Mn __m, _Nn __n) noexcept
| ^~~
main.cpp:7:20: note: 'int gcd'
7 | int n,v[2],aint[4],gcd;
| ^~~
main.cpp: In function 'int main()':
main.cpp:46:5: error: reference to 'gcd' is ambiguous
46 | gcd = v[1];
| ^~~
/usr/include/c++/12.2.1/numeric:164:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)'
164 | gcd(_Mn __m, _Nn __n) noexcept
| ^~~
main.cpp:7:20: note: 'int gcd'
7 | int n,v[2],aint[4],gcd;
| ^~~
main.cpp:50:13: error: reference to 'gcd' is ambiguous
50 | fout << gcd;
| ^~~
/usr/include/c++/12.2.1/numeric:164:5: note: candidates are: 'template<class _Mn, class _Nn> constexpr std::common_type_t<_Tp1, _Tp2> std::gcd(_Mn, _Nn)'
164 | gcd(_Mn __m, _Nn __n) noexcept
| ^~~
main.cpp:7:20: note: 'int gcd'
7 | int n,v[2],aint[4],gcd;
| ^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
