I suppose answer for test AAA is 4. There is no path from 2 to 3 at your picture.
created
last reply
- 23
replies
- 2.7k
views
- 9
users
- 1
link
I suppose answer for test AAA is 4. There is no path from 2 to 3 at your picture.
Thanks, I've fixed it.
By the way, I've changed the problem description to allow a change of arcs at every city. Proving the (near-)equivalence of both forms of the problem is an academic exercise that has no business whatsoever in a programming contest. So I guess this change won't make the problem a lot easier .
Do all arc segments of the circles have to point in the same direction? I guess yes, otherwise I think the answer to the first case would be 2:
use arcs 1->2, 2->3, 3->1 and 2->1, 3->2, 1->3, every arc segment can be used as a channel.
But if the answer to my question is yes, I can't see how to get a result of 5 for the 2nd test case.
Let us call the direct route between adjacent cities a section (of A, B or C type). Given a pair of cities, you can travel between them either clockwise or anticlockwise, but only if the sections you go along are [BC]* in the former case, [BA]* in the latter.
The task is as follows: For every ordered pair of cities (X, Y), construct exactly one travel route (an arc) X->Y provided this is possible, no route if it is impossible. You need to determine the maximum number of routes going along a single section in the solution which minimises this sought value.
Sorry that I have to ask another stupid question:
if I understand it correct, for the first test case I have to create an arc between 1 and 2, 1 and 3, 2 and 3, 2 and 1, 3 and 1, 3 and 2, because for every pair there is a path in the original graph.
But why then is the 2 circle solution not possible, where I use exactly one segment for each arc (assignment is obvious)?
Edit: nevermind, I think I understand what you mean by "travel route". So I can only construct arcs which belong to the original graph, right?
Również nie mam pewności co do poprawności testów. Wiem, że pewnie się mylę, ale też dla wszystkich danych mam dobre wyniki, a spoj nie zalicza. Nawet sobie sprawdzałem odpowiedzi na stronie:
tiny.pl/3pzk2 - nr zadania 11309 i wszystkie odpowiedzi miałem takie same.
Tak więc proszę osoby, które to zrobiły o jakąś podpowiedź.
Przeszukałem te 1440 możliwości i znalazłem błąd - 1 test! No ale warto było.
A co do tego o uczeniu się na swoich błędach, to miałem na myśli, że gdy ktoś mi zwróci na coś uwagę - że coś źle robię, to staram się w przyszłości nie popełniać więcej tych błędów. - Ot cała filozofia. Nic skomplikowanego.