Code passes in custom test , same test fails on submit


#1

Code gives seg fault on submit for a test case, but if same test case run as custom test, gives correct output.


#2

Check if you have any global variables that are not being cleared . If you are using adjacency list for storing graph and it is declared globally , make sure to clear the adjacency list in main function . Hope that helps .


#3

There is some bug with their compiler when you use global variables it throws segmentation fault but it does run on custom test.