Segmentation fault in code

Hey please hcek my code for floyyd warshall


I tried to take input in the manner given here:
https://practice.geeksforgeeks.org/problems/implementing-floyd-warshall/0

hello @Aparna
u r accessing index ( i , j ) and for that ur vector should be of dimension n X n
so replace
image
with
vector<vector < long long> > adj(n, vector < long long >(n) );

I corrected this statement but Im getting wrong answer: Please see: https://ide.codingblocks.com/s/256387

image

why INT_MAX ? use should compare it with INF right?

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.