Borderou de evaluare (job #3230831)

Utilizator luca._.solosluca solos luca._.solos Data 22 mai 2024 21:54:04
Problema Conexidad Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:51:16: error: 'INT_MAX' was not declared in this scope 51 | int mn=INT_MAX, cj=-1; | ^~~~~~~ main.cpp:4:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'? 3 | #include <vector> +++ |+#include <climits> 4 | main.cpp:59:21: error: 'cj' was not declared in this scope; did you mean 'j'? 59 | cj=j; | ^~ | j main.cpp:63:12: error: 'cj' was not declared in this scope 63 | if(cj!=-1) | ^~ main.cpp:68:26: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)' 68 | ans.push_back({i, cj}); | ~~~~~~~~~~~~~^~~~~~~~~ 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 = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; value_type = std::pair<int, 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<std::pair<int, int> >::value_type&' {aka 'const std::pair<int, 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 = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; value_type = std::pair<int, 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<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'} 1293 | push_back(value_type&& __x) | ~~~~~~~~~~~~~^~~ main.cpp:77:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare] 77 | for(int i=0; i<ans.size(); i++) | ~^~~~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?