Borderou de evaluare (job #1479260)

Utilizator tudorgalatanRoman Tudor tudorgalatan Data 30 august 2015 21:06:19
Problema Problema rucsacului Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:23:5: error: ‘in’ was not declared in this scope in >> N >> Wgt; ^ user.cpp:31:21: warning: capture of variable ‘j’ with non-automatic storage duration [enabled by default] if (Ov+[j+w[i]] < Ov[j]+p[i]) ^ user.cpp:20:21: note: ‘int j’ declared here int N, Wgt, i, sol, j; ^ user.cpp:31:22: error: expected ‘,’ before ‘+’ token if (Ov+[j+w[i]] < Ov[j]+p[i]) ^ user.cpp:31:22: error: expected identifier before ‘+’ token user.cpp: In lambda function: user.cpp:31:29: error: expected ‘{’ before ‘<’ token if (Ov+[j+w[i]] < Ov[j]+p[i]) ^ user.cpp: In function ‘int main()’: user.cpp:31:19: error: no match for ‘operator+’ (operand types are ‘int [10001]’ and ‘main()::__lambda0’) if (Ov+[j+w[i]] < Ov[j]+p[i]) ^ user.cpp:31:19: note: candidates are: In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/algorithm:61, from user.cpp:4: /usr/include/c++/4.8/bits/stl_iterator.h:333:5: note: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&) operator+(typename reverse_iterator<_Iterator>::difference_type __n, ^ /usr/include/c++/4.8/bits/stl_iterator.h:333:5: note: template argument deduction/substitution failed: user.cpp:31:29: note: ‘main()::__lambda0’ is not derived from ‘const std::reverse_iterator<_Iterator>’ if (Ov+[j+w[i]] < Ov[j]+p[i]) ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/algorithm:61, from user.cpp:4: /usr/include/c++/4.8/bits/stl_iterator.h:1118:5: note: template<class _Iterator> std::move_iterator<_Iterator> std::operator+(typename std::move_iterator<_Iterator>::difference_type, const std::move_iterator<_Iterator>&) operator+(typename move_iterator<_Iterator>::difference_type __n, ^ /usr/include/c++/4.8/bits/stl_iterator.h:1118:5: note: template argument deduction/substitution failed: user.cpp:31:29: note: ‘main()::__lambda0’ is not derived from ‘const std::move_iterator<_Iterator>’ if (Ov+[j+w[i]] < Ov[j]+p[i]) ^ 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:4: /usr/include/c++/4.8/bits/basic_string.h:2365:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&) operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,

Ceva nu functioneaza?