Tinginiai

Taškai: 0

Compile: FAIL

tinginiai.cpp: In function ‘int main()’: tinginiai.cpp:29:14: error: ‘job’ was not declared in this scope; did you mean ‘jobs’? 29 | jobs[job].second = time; | ^~~ | jobs tinginiai.cpp:39:34: error: request for member ‘second’ in ‘jobsVector.std::vector<std::pair<int, int> >::operator[](((std::vector<std::pair<int, int> >::size_type)i)).std::pair<int, int>::second’, which is of non-class type ‘int’ 39 | if (jobsVector[i].second.second > used) | ^~~~~~ tinginiai.cpp:42:46: error: request for member ‘first’ in ‘jobsVector.std::vector<std::pair<int, int> >::operator[](((std::vector<std::pair<int, int> >::size_type)i)).std::pair<int, int>::second’, which is of non-class type ‘int’ 42 | timeUsed += jobsVector[i].second.first; | ^~~~~ In file included from /usr/include/c++/11/vector:66, from tinginiai.cpp:2: /usr/include/c++/11/bits/stl_uninitialized.h: In instantiation of ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::_Rb_tree_iterator<std::pair<const int, std::pair<int, int> > >; _ForwardIterator = std::pair<int, int>*]’: /usr/include/c++/11/bits/stl_uninitialized.h:333:37: required from ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = std::_Rb_tree_iterator<std::pair<const int, std::pair<int, int> > >; _ForwardIterator = std::pair<int, int>*; _Tp = std::pair<int, int>]’ /usr/include/c++/11/bits/stl_vector.h:1585:33: required from ‘void std::vector<_Tp, _Alloc>::_M_range_initialize(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = std::_Rb_tree_iterator<std::pair<const int, std::pair<int, int> > >; _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >]’ /usr/include/c++/11/bits/stl_vector.h:657:23: required from ‘std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = std::_Rb_tree_iterator<std::pair<const int, std::pair<int, int> > >; <template-parameter-2-2> = void; _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::pair<int, int> >]’ tinginiai.cpp:32:63: required from here /usr/include/c++/11/bits/stl_uninitialized.h:138:72: error: static assertion failed: result type must be constructible from value type of input range 138 | static_assert(is_constructible<_ValueType2, decltype(*__first)>::value, | ^~~~~ /usr/include/c++/11/bits/stl_uninitialized.h:138:72: note: ‘std::integral_constant<bool, false>::value’ evaluates to false

nr.resulttimemessage