Problem ntuc
User tanyikai
Submission Time 2025-06-19 10:28:41
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ntuc.cpp: In function ‘int main()’:
ntuc.cpp:20:18: error: expected ‘]’ before ‘[’ token
20 | map[price[k]]=stock[k];
| ^
| ]
ntuc.cpp:20:30: error: class template argument deduction failed:
20 | map[price[k]]=stock[k];
| ^
ntuc.cpp:20:30: error: no matching function for call to ‘map(long long int&)’
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from ntuc.cpp:1:
/usr/include/c++/9/bits/stl_map.h:1416:5: note: candidate: ‘template<class _InputIterator, class _Compare, class _Allocator, class, class, class> std::map(_InputIterator, _InputIterator, _Compare, _Allocator)-> std::map<typename std::remove_const<typename std::iterator_traits<_Iterator>::value_type::first_type>::type, typename std::iterator_traits<_Iterator>::value_ty