Borderou de evaluare (job #3243971)
Utilizator | Data | 22 septembrie 2024 17:03:06 | |
---|---|---|---|
Problema | Euclid1 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:16:21: error: reference to 'gcd' is ambiguous
16 | gcd=v[a];
| ^~~
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:6:29: note: 'int gcd'
6 | int n,m,v[100005],c,a,b,k,i,gcd,j;
| ^~~
main.cpp:17:42: error: reference to 'gcd' is ambiguous
17 | for (j=a+1;j<=b;j++) gcd=__gcd(gcd,v[j]);
| ^~~
/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:6:29: note: 'int gcd'
6 | int n,m,v[100005],c,a,b,k,i,gcd,j;
| ^~~
main.cpp:17:52: error: reference to 'gcd' is ambiguous
17 | for (j=a+1;j<=b;j++) gcd=__gcd(gcd,v[j]);
| ^~~
/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:6:29: note: 'int gcd'
6 | int n,m,v[100005],c,a,b,k,i,gcd,j;
| ^~~
main.cpp:18:27: error: reference to 'gcd' is ambiguous
18 | fout<<gcd<<"\n";
| ^~~
/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:6:29: note: 'int gcd'
6 | int n,m,v[100005],c,a,b,k,i,gcd,j;
| ^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !