ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1774. Barber of the Army of Mages

TLE17/21
Posted by ASK 13 Mar 2014 17:20
During BFS I marked (so to not visit them again) only vertexes which were in the path instead of all visited vertexes. The program passed all the tests before 17 although its running time was exponential.

11 1
1 11
2 11
3 11
4 11
5 11
6 11
7 11
8 11
9 11
10 11
11 11

Ans: No