Pabirę akmenukai

Taškai: 0

Compile: FAIL

pabire_akmenukai.cpp: In function ‘int main()’: pabire_akmenukai.cpp:109:14: error: no match for ‘operator=’ (operand types are ‘std::unordered_map<int, std::vector<int> >::mapped_type {aka std::vector<int>}’ and ‘int’) val[sk[i]] = i + 1; ^ In file included from /usr/include/c++/5/vector:69:0, from /usr/include/c++/5/bits/random.h:34, from /usr/include/c++/5/random:49, from /usr/include/c++/5/bits/stl_algo.h:66, from /usr/include/c++/5/algorithm:62, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64, from pabire_akmenukai.cpp:25: /usr/include/c++/5/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>] vector<_Tp, _Alloc>:: ^ /usr/include/c++/5/bits/vector.tcc:167:5: note: no known conversion for argument 1 from ‘int’ to ‘const std::vector<int>&’ In file included from /usr/include/c++/5/vector:64:0, from /usr/include/c++/5/bits/random.h:34, from /usr/include/c++/5/random:49, from /usr/include/c++/5/bits/stl_algo.h:66, from /usr/include/c++/5/algorithm:62, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64, from pabire_akmenukai.cpp:25: /usr/include/c++/5/bits/stl_vector.h:448:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>] operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) ^ /usr/include/c++/5/bits/stl_vector.h:448:7: note: no known conversion for argument 1 from ‘int’ to ‘std::vector<int>&&’ /usr/include/c++/5/bits/stl_vector.h:470:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>] operator=(initializer_list<value_type> __l) ^ /usr/include/c++/5/bits/stl_vector.h:470:7: note: no known conversion for argument 1 from ‘int’ to ‘std::initializer_list<int>’ pabire_akmenukai.cpp:121:16: error: cannot convert ‘std::unordered_map<int, std::vector<int> >::mapped_type {aka std::vector<int>}’ to ‘int’ in initialization int v = val[a]; ^ pabire_akmenukai.cpp:89:44: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("pabire_akmenukai.in", "r", stdin); ^ pabire_akmenukai.cpp:90:46: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("pabire_akmenukai.out", "w", stdout); ^

nr.resulttimemessage