Counting on a directed graph Submissions | CodeChef