Borderou de evaluare (job #3160124)

Utilizator divadddDavid Curca divaddd Data 23 octombrie 2023 08:35:57
Problema Inv 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:49:9: error: reference to 'norm' is ambiguous 49 | norm[perm[i]] = i; | ^~~~ In file included from /usr/include/c++/12.2.1/ccomplex:39, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:54, from main.cpp:1: /usr/include/c++/12.2.1/complex:1841:5: note: candidates are: 'template<class _Tp> constexpr typename __gnu_cxx::__promote<_Tp, std::__is_integer<_Tp>::__value>::__type std::norm(_Tp)' 1841 | norm(_Tp __x) | ^~~~ /usr/include/c++/12.2.1/complex:693:5: note: 'template<class _Tp> constexpr _Tp std::norm(const complex<_Tp>&)' 693 | norm(const complex<_Tp>& __z) | ^~~~ main.cpp:5:15: note: 'std::map<int, int> norm' 5 | map<int, int> norm; | ^~~~ main.cpp:52:19: error: reference to 'norm' is ambiguous 52 | for(auto &it: norm){ | ^~~~ /usr/include/c++/12.2.1/complex:1841:5: note: candidates are: 'template<class _Tp> constexpr typename __gnu_cxx::__promote<_Tp, std::__is_integer<_Tp>::__value>::__type std::norm(_Tp)' 1841 | norm(_Tp __x) | ^~~~ /usr/include/c++/12.2.1/complex:693:5: note: 'template<class _Tp> constexpr _Tp std::norm(const complex<_Tp>&)' 693 | norm(const complex<_Tp>& __z) | ^~~~ main.cpp:5:15: note: 'std::map<int, int> norm' 5 | map<int, int> norm; | ^~~~ main.cpp:56:19: error: reference to 'norm' is ambiguous 56 | perm[i] = norm[perm[i]]; | ^~~~ /usr/include/c++/12.2.1/complex:1841:5: note: candidates are: 'template<class _Tp> constexpr typename __gnu_cxx::__promote<_Tp, std::__is_integer<_Tp>::__value>::__type std::norm(_Tp)' 1841 | norm(_Tp __x) | ^~~~ /usr/include/c++/12.2.1/complex:693:5: note: 'template<class _Tp> constexpr _Tp std::norm(const complex<_Tp>&)' 693 | norm(const complex<_Tp>& __z) | ^~~~ main.cpp:5:15: note: 'std::map<int, int> norm' 5 | map<int, int> norm; | ^~~~ Non zero exit status: 1

Ceva nu functioneaza?