I've got TL#1.Is the Test#1 so difficult?
Послано
cpc 31 май 2005 20:27
Re: I've got TL#1.Is the Test#1 so difficult?
Послано
nana 19 июн 2005 20:17
I have the same problem and I don't know why.
If somebody know this test or some other like that, please show it.
Re: I've got TL#1.Is the Test#1 so difficult?
Послано
Sid 22 июн 2005 15:31
I supose that there is only one test... But all what you need is delete one road between 2 points and with help of Deikstra find out the shortest way between this points ... than add length of road and you find out the shortest way throw this row.... and so on! I solved this problem such way!
Re: I've got TL#1.Is the Test#1 so difficult?
It's O(N^4)! You can optimize this nice idea to reach O(N^3)!
Re: I've got TL#1.Is the Test#1 so difficult?
here is test 1:
4 6
1 2 40
1 3 50
1 40 60
2 3 10
2 4 30
3 4 20
one answer: 2 3 4
My program print the same answer, but I have WA#1. Please, anyone, tell me, where is the problem?
Edited by author 21.10.2005 16:50
Re: I've got TL#1.Is the Test#1 so difficult?
Послано
cpc 21 окт 2005 22:07
Thank you very much!
Re: I've got TL#1.Is the Test#1 so difficult?
Thanks for your test... :)
I have AC 0.046 sec...
Re: here is test 1
but this problem says:
"...In the town there are N crossing points numbered from 1 to N..."
Re: I've got TL#1.Is the Test#1 so difficult?
here is test 1:
4 6
1 2 40
1 3 50
1 40 60
2 3 10
2 4 30
3 4 20
one answer: 2 3 4
My program prints:
2 4 3
It's true, imho.
Re: I've got TL#1.Is the Test#1 so difficult?
Re: I've got TL#1.Is the Test#1 so difficult?
Послано
yzthz 17 мар 2009 13:03
Floyd Algrathm is also advisable. However, please take note of another test:
4 4
1 2 10
2 3 1
3 4 1
4 1 1
should output things like 1 4 3 2
but NOT 1 4 3 4
Re: I've got TL#1.Is the Test#1 so difficult?
my ans is 2 3 4,but get WA at Test#1
Re: I've got TL#1.Is the Test#1 so difficult?
I think It's :
1 2 40
1 3 50
1 4 60
2 3 10
2 4 30
3 4 20
Re: I've got TL#1.Is the Test#1 so difficult?
Impossible. I get 2 3 4 as answer at get wrong answer on #1