Borderou de evaluare (job #1487724)

Utilizator BlaugranasEnal Gemaledin Blaugranas Data 17 septembrie 2015 13:03:59
Problema Drumuri minime 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:49:24: error: no matching function for call to ‘swap(int, int&)’ r=h[1],swap(1,k),k--,p[h[1]]=1,D(1); ^ user.cpp:49:24: note: candidates are: In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0, from /usr/include/c++/4.8/utility:70, from /usr/include/c++/4.8/algorithm:60, from user.cpp:3: /usr/include/c++/4.8/bits/move.h:166:5: note: void std::swap(_Tp&, _Tp&) [with _Tp = int] swap(_Tp& __a, _Tp& __b) ^ /usr/include/c++/4.8/bits/move.h:166:5: note: no known conversion for argument 1 from ‘int’ to ‘int&’ /usr/include/c++/4.8/bits/move.h:185:5: note: template<class _Tp, unsigned int _Nm> void std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm]) swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) ^ /usr/include/c++/4.8/bits/move.h:185:5: note: template argument deduction/substitution failed: user.cpp:49:24: note: mismatched types ‘_Tp [_Nm]’ and ‘int’ r=h[1],swap(1,k),k--,p[h[1]]=1,D(1); ^ In file included from /usr/include/c++/4.8/utility:70:0, from /usr/include/c++/4.8/algorithm:60, from user.cpp:3: /usr/include/c++/4.8/bits/stl_pair.h:254:5: note: template<class _T1, class _T2> void std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&) swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) ^ /usr/include/c++/4.8/bits/stl_pair.h:254:5: note: template argument deduction/substitution failed: user.cpp:49:24: note: mismatched types ‘std::pair<_T1, _T2>’ and ‘int’ r=h[1],swap(1,k),k--,p[h[1]]=1,D(1); ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/random:41, from /usr/include/c++/4.8/bits/stl_algo.h:65, from /usr/include/c++/4.8/algorithm:62, from user.cpp:3: /usr/include/c++/4.8/bits/basic_string.h:2717:5: note: template<class _CharT, class _Traits, class _Alloc> void std::swap(std::basic_string<_CharT, _Traits, _Alloc>&, std::basic_string<_CharT, _Traits, _Alloc>&) swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2717:5: note: template argument deduction/substitution failed: user.cpp:49:24: note: mismatched types ‘std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’ r=h[1],swap(1,k),k--,p[h[1]]=1,D(1); ^ In file included from /usr/include/c++/4.8/vector:64:0, from /usr/include/c++/4.8/bits/random.h:34, from /usr/include/c++/4.8/random:50, from /usr/include/c++/4.8/bits/stl_algo.h:65, from /usr/include/c++/4.8/algorithm:62, from user.cpp:3: /usr/include/c++/4.8/bits/stl_vector.h:1451:5: note: template<class _Tp, class _Alloc> void std::swap(std::vector<_Tp, _Alloc>&, std::vector<_Tp, _Alloc>&) swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)

Ceva nu functioneaza?