Borderou de evaluare (job #1688887)

Utilizator stefzahZaharia Stefan Tudor stefzah Data 13 aprilie 2016 19:44:03
Problema Progresii Colorate Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:43:4: error: reference to ‘ref’ is ambiguous ref=0; ^ user.cpp:6:60: note: candidates are: int ref int p,n,k,c,ok,v[200005],mx,ct,r,st[1000005],mt[1000005],q,ref,rest,d[200005],mx1; ^ In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0, from /usr/include/c++/4.8/algorithm:62, from user.cpp:2: /usr/include/c++/4.8/functional:493:5: note: template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>) ref(reference_wrapper<_Tp> __t) noexcept ^ /usr/include/c++/4.8/functional:485:10: note: template<class _Tp> void std::ref(const _Tp&&) void ref(const _Tp&&) = delete; ^ /usr/include/c++/4.8/functional:475:5: note: template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&) ref(_Tp& __t) noexcept ^ user.cpp:45:20: error: reference to ‘ref’ is ambiguous {if(V[i].val>ref){ct++;ref=V[i].val;V[i].val=ct;} ^ user.cpp:6:60: note: candidates are: int ref int p,n,k,c,ok,v[200005],mx,ct,r,st[1000005],mt[1000005],q,ref,rest,d[200005],mx1; ^ In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0, from /usr/include/c++/4.8/algorithm:62, from user.cpp:2: /usr/include/c++/4.8/functional:493:5: note: template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>) ref(reference_wrapper<_Tp> __t) noexcept ^ /usr/include/c++/4.8/functional:485:10: note: template<class _Tp> void std::ref(const _Tp&&) void ref(const _Tp&&) = delete; ^ /usr/include/c++/4.8/functional:475:5: note: template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&) ref(_Tp& __t) noexcept ^ user.cpp:45:30: error: reference to ‘ref’ is ambiguous {if(V[i].val>ref){ct++;ref=V[i].val;V[i].val=ct;} ^ user.cpp:6:60: note: candidates are: int ref int p,n,k,c,ok,v[200005],mx,ct,r,st[1000005],mt[1000005],q,ref,rest,d[200005],mx1; ^ In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0, from /usr/include/c++/4.8/algorithm:62, from user.cpp:2: /usr/include/c++/4.8/functional:493:5: note: template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>) ref(reference_wrapper<_Tp> __t) noexcept ^ /usr/include/c++/4.8/functional:485:10: note: template<class _Tp> void std::ref(const _Tp&&)

Ceva nu functioneaza?