Borderou de evaluare (job #3306323)

Utilizator Costy2345Costi Dimian Costy2345 Data 9 august 2025 17:39:26
Problema Pairs 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:33:16: error: reference to 'gcd' is ambiguous 33 | if(gcd.count({v[i], v[j]})) | ^~~ 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:18:46: note: 'std::unordered_map<std::pair<int, int>, int, PairHash> gcd' 18 | unordered_map<pair<int, int>, int, PairHash> gcd; | ^~~ main.cpp:35:21: error: reference to 'gcd' is ambiguous 35 | g = gcd[{v[i], 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:18:46: note: 'std::unordered_map<std::pair<int, int>, int, PairHash> gcd' 18 | unordered_map<pair<int, int>, int, PairHash> gcd; | ^~~ main.cpp:37:21: error: reference to 'gcd' is ambiguous 37 | else if(gcd.count({v[j], v[i]})) | ^~~ /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:18:46: note: 'std::unordered_map<std::pair<int, int>, int, PairHash> gcd' 18 | unordered_map<pair<int, int>, int, PairHash> gcd; | ^~~ main.cpp:39:21: error: reference to 'gcd' is ambiguous 39 | g = gcd[{v[j], v[i]}]; | ^~~ /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:18:46: note: 'std::unordered_map<std::pair<int, int>, int, PairHash> gcd' 18 | unordered_map<pair<int, int>, int, PairHash> gcd; | ^~~ main.cpp:43:17: error: reference to 'gcd' is ambiguous 43 | gcd[{v[i], v[j]}] = g; | ^~~ /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:18:46: note: 'std::unordered_map<std::pair<int, int>, int, PairHash> gcd' 18 | unordered_map<pair<int, int>, int, PairHash> gcd; | ^~~ main.cpp:44:17: error: reference to 'gcd' is ambiguous 44 | gcd[{v[j], v[i]}] = g; Non zero exit status: 1

Ceva nu functioneaza?