Borderou de evaluare (job #2947577)
Utilizator | Data | 26 noiembrie 2022 13:13:30 | |
---|---|---|---|
Problema | Catun | 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:26:22: error: 'INT_MAX' was not declared in this scope
26 | c_f.resize(N+1, {INT_MAX, 0});
| ^~~~~~~
main.cpp:5:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
4 | #include <queue>
+++ |+#include <climits>
5 | using namespace std;
main.cpp:26:33: error: no matching function for call to 'std::vector<std::pair<int, int> >::resize(int, <brace-enclosed initializer list>)'
26 | c_f.resize(N+1, {INT_MAX, 0});
| ^
In file included from /usr/include/c++/10/vector:67,
from main.cpp:3:
/usr/include/c++/10/bits/stl_vector.h:937:7: note: candidate: 'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
937 | resize(size_type __new_size)
| ^~~~~~
/usr/include/c++/10/bits/stl_vector.h:937:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/10/bits/stl_vector.h:957:7: note: candidate: 'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
957 | resize(size_type __new_size, const value_type& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_vector.h:957:54: note: no known conversion for argument 2 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<int, int>&'}
957 | resize(size_type __new_size, const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !