Please note: the language of this site will now be ENGLISH. Please do not use another language since visitors from different countries will participate in training.

The tasks for week 5 are as follows:

Week problem: 00168 Theseus and the Minotaur
Weekend problem: 11094 Continents
Suggested bonus: 10305 Ordering Tasks

Read up on graph traversal, flood fills and topological sorts.

You must submit your solutions on

You can browse to these problems from the online judge website by clicking on Browse Problems, Contest Volumes, and then selecting the contest volume as indicated above.

in Tasks by

Please post below which of the questions you have been able to finish.

For each task, please let us know how much time you have spent on understanding / coding / debugging.

For each task let us know what the hardest part was. (This can be anything, ranging from not having read the problem to forgetting about a border case, to a semicolon in the wrong spot that screwed up an if-statement...)

1 Answer

0 votes

The understanding and coding part of the problem 'Continents' went fairly fast, but I'm still in the process of debugging: where does the file end? The description says that there will be multiple test cases, but there is no way to find out which one is the last.


Just use std::cin.eof().

Either what Koen says or check if N and M are not equal to 0