The task is to use Bellman-Ford algorithm to check whether a given graph
contains a cycle of negative weight.

Given: A positive integer $k \le 20$ and $k$simple directed graphs with integer edge weights from $-10^{3}$ to $10^3$ and $n \le 10^3$ vertices in the edge list format.

Return: For each graph, output "1" if it contains a negative weight cycle and "-1" otherwise.