Problem eating
User shavonne22
Submission Time 2026-04-18 11:51:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

eating.cpp: In function ‘int main()’:
eating.cpp:14:16: error: could not convert ‘m.std::map<long long int, std::map<long long int, bool> >::operator[](b)’ from ‘std::map<long long int, std::map<long long int, bool> >::mapped_type’ {aka ‘std::map<long long int, bool>’} to ‘bool’
14 | if(m[b]) cout<<"NO\n";
| ^
| |
| std::map<long long int, std::map<long long int, bool> >::mapped_type {aka std::map<long long int, bool>}
eating.cpp:16:14: error: no match for ‘operator=’ (operand types are ‘std::map<long long int, std::map<long long int, bool> >::mapped_type’ {aka ‘std::map<long long int, bool>’} and ‘int’)
16 | m[b]=1;
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from eating.cpp:1: