Compile Error in the code


https://practice.geeksforgeeks.org/problems/path-of-greater-than-equal-to-k-length/0

Bhaiya How to resolve this compile error.
@phantom

Actually u r using wrong data type to store the required data
vector<pait<int,int>>v will work like
v.push_back(make_pair(a,b))
u r doing v[i].push_back(make_pair(a,b)) ->this is wrong

for required data
use a map
map<int,pair<int,int> >m
then u can do
m[i].push_back(make_pair(a,b))

vector<pair<int,int>> vectory[SIZE];
I am using this.

this will not work
u have to strore 3 integer and have only 2

Ok Bhaiya I will use map.

if any problem persist u can refer this

1 Like

Hanji Bhaiya.
I have also done it using map now.

Thank you…