
Can someone give me more testdata? thx

Moderator: Board moderators
Code: Select all
2
10 5 5
5 0
0 1
1 2
2 0
5 9
10 5 5
5 0
0 6
6 7
7 0
5 9
according to the problem setter, this is a correct solution. Even after reading the complete thread i still fail to see why it is. Considering the drive for vertex 6, wouldn't "0 3 4 5 3 4 5 3 0 6" be a drive that is lexicographicly smaller? I must be missing something? And if that is a drive, why isYeomin wrote:and, my output.1
10 11 0
0 1
1 2
0 3
3 4
4 5
5 3
0 6
6 7
7 8
8 6
0 9
is this correct?Case #1:
0
0 1
0 1 2
0 3
0 3 4
0 3 4 5
0 3 4 5 3 0 6
0 3 4 5 3 0 6 7
0 3 4 5 3 0 6 7 8
No drive.
Yeomin wrote:Because "0 3 4 5 3 0 6 7 8 6" can loop.
0 3 4 5 3 0 6 7 8 6 0 3 4 5 3 0 9 is smaller than 0 4 3 5 3 0 6 7 8 6 9.
And 0 3 4 5 3 0 6 7 8 6 0 3 4 5 3 0 6 7 8 6 0 3 4 5 3 0 9 is smaller.
And ....... Can't define Smallest drive.
Abednego, I know more lexicographically small drive to vertex 4: 0 3 1 2 3 0 3 1 2 3 0 4 or 0 3 1 2 3 0 3 1 2 3 0 3 1 2 3 0 4. Why is your output correct?Case #3:
0
0 3 1
0 3 1 2
0 3
0 3 1 2 3 0 4
No drive.
No drive.
No drive.
No drive.
No drive.
No drive.
No drive.
No drive.
No drive.