Borderou de evaluare (job #3314496)

Utilizator postolacheepostolache postolachee Data 10 octombrie 2025 10:35:12
Problema Indep Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void Adunare(std::vector<int>&, std::vector<int>&)': main.cpp:17:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 17 | for (int i=0;i<a.size();++i){ | ~^~~~~~~~~ main.cpp: In function 'int main()': main.cpp:40:12: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>' 40 | Adunare(dp[v[0]], {1}); | ~~~~~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/12.2.1/vector:64, from /usr/include/c++/12.2.1/functional:62, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:71, from main.cpp:1: /usr/include/c++/12.2.1/bits/stl_vector.h:673:7: note: after user-defined conversion: 'constexpr std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]' 673 | vector(initializer_list<value_type> __l, | ^~~~~~ main.cpp:9:44: note: initializing argument 2 of 'void Adunare(std::vector<int>&, std::vector<int>&)' 9 | void Adunare(vector <int> &a,vector <int> &b){ | ~~~~~~~~~~~~~~^ main.cpp:47:16: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>' 47 | Adunare(dp[v[i]], {1}); | ~~~~~~~^~~~~~~~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:673:7: note: after user-defined conversion: 'constexpr std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]' 673 | vector(initializer_list<value_type> __l, | ^~~~~~ main.cpp:9:44: note: initializing argument 2 of 'void Adunare(std::vector<int>&, std::vector<int>&)' 9 | void Adunare(vector <int> &a,vector <int> &b){ | ~~~~~~~~~~~~~~^ Non zero exit status: 1

Ceva nu functioneaza?