Олимпиадный тренинг

Задача 24724. Definition of up vertices


Задача

Темы:

Count the up's for all vertices, assuming DFS starts at vertex 1 and time_in is numbered from 1. 
You need to complete the code so that the program displays the answer to this problem.