Borderou de evaluare (job #3368811)

Utilizator noemienoemie noemie Data 15 octombrie 2026 21:35:16
Problema Arbore partial de cost minim Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:34:23: error: no matching function for call to 'std::vector<int>::push_back(<brace-enclosed initializer list>)' 34 | much.push_back({cost,n1,n2}); | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/12.2.1/vector:64, from main.cpp:3: /usr/include/c++/12.2.1/bits/stl_vector.h:1276:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]' 1276 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:1276:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<int>::value_type&' {aka 'const int&'} 1276 | push_back(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_vector.h:1293:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]' 1293 | push_back(value_type&& __x) | ^~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:1293:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<int>::value_type&&' {aka 'int&&'} 1293 | push_back(value_type&& __x) | ~~~~~~~~~~~~~^~~ main.cpp:48:13: warning: unused variable 'z' [-Wunused-variable] 48 | int z=nod2[unde]; | ^ main.cpp:62:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 62 | for(int i=1; i<=apm.size(); i++) | ~^~~~~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?