Can You give me the hint to solve this problem?
https://codeforces.com/problemset/problem/165/A
I was thinking of using it with Maps but not finding a proper way?
Can You give me the hint to solve this problem?
hello @cbcao263
yeah u can solve this problem using map/set.
just declare ur map as
map< pair< int ,int> , bool > mp;
to makr any corrdinate (x,y) as true.
use mp[ make_pair(x,y) ]=true;
and to check whether (x, y ) corrdinate is present or not.
use mp.count( make_pair(x,y) )
using above two methods u can easily solve this problem
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.