get tcp problem from file and make array from graph costs