Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Topological Graph Sort

Input

The input begins with a line containing two integers, 1 ≤ N ≤ 100 and K. N is the number of your tasks (numbered from 1 to N) and K is the number of direct precedence relations between tasks. After this, there will be K lines with two integers a and b, representing the fact that task 'a' must be executed before task 'b'.

Output

Only print one line with N integers representing the ordred tasks(how you've actually decided to execute them).

Source: Think-IT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages