public void TestCase_29() { int[][] times = { new[] { 15, 8, 1 }, new[] { 7, 10, 41 }, new[] { 7, 9, 34 }, new[] { 9, 4, 31 }, new[] { 12, 13, 50 }, new[] { 14, 3, 52 }, new[] { 4, 11, 99 }, new[] { 4, 7, 86 }, new[] { 10, 13, 57 }, new[] { 9, 6, 10 }, new[] { 1, 7, 51 }, new[] { 7, 15, 38 }, new[] { 1, 9, 11 }, new[] { 12, 7, 94 }, new[] { 9, 13, 34 }, new[] { 11, 7, 79 }, new[] { 7, 6, 28 }, new[] { 5, 3, 34 }, new[] { 2, 6, 97 }, new[] { 14, 1, 97 }, new[] { 6, 10, 90 }, new[] { 12, 10, 37 }, new[] { 13, 3, 73 }, new[] { 11, 14, 7 }, new[] { 15, 1, 39 }, new[] { 6, 5, 90 }, new[] { 13, 6, 43 }, new[] { 6, 9, 32 }, new[] { 4, 6, 45 }, new[] { 11, 10, 2 }, new[] { 2, 13, 4 }, new[] { 14, 15, 29 }, new[] { 1, 14, 88 }, new[] { 14, 6, 19 }, new[] { 6, 2, 29 }, new[] { 3, 14, 72 }, new[] { 1, 15, 4 }, new[] { 11, 5, 2 }, new[] { 6, 7, 56 }, new[] { 8, 7, 88 }, new[] { 13, 14, 70 }, new[] { 14, 12, 58 }, new[] { 14, 2, 86 }, new[] { 11, 3, 57 }, new[] { 5, 2, 56 }, new[] { 3, 10, 26 }, new[] { 2, 11, 21 }, new[] { 14, 5, 54 }, new[] { 5, 12, 40 }, new[] { 14, 4, 81 }, new[] { 15, 2, 99 }, new[] { 5, 7, 57 }, new[] { 13, 12, 5 }, new[] { 4, 9, 60 }, new[] { 12, 15, 48 }, new[] { 6, 14, 1 }, new[] { 9, 7, 44 }, new[] { 13, 7, 69 }, new[] { 5, 13, 42 }, new[] { 4, 1, 7 }, new[] { 11, 9, 76 }, new[] { 8, 1, 76 }, new[] { 5, 14, 29 }, new[] { 2, 3, 69 }, new[] { 7, 3, 23 }, new[] { 12, 14, 28 }, new[] { 11, 4, 85 }, new[] { 10, 1, 10 }, new[] { 15, 12, 36 }, new[] { 1, 11, 69 }, new[] { 15, 10, 96 }, new[] { 11, 13, 69 }, new[] { 7, 12, 49 }, new[] { 1, 2, 95 }, new[] { 6, 4, 46 }, new[] { 8, 12, 94 }, new[] { 12, 4, 93 }, new[] { 13, 5, 31 }, new[] { 12, 2, 60 }, new[] { 6, 1, 87 }, new[] { 4, 14, 20 }, new[] { 5, 11, 89 }, new[] { 4, 15, 88 }, new[] { 4, 10, 21 }, new[] { 1, 6, 5 }, new[] { 10, 8, 26 }, new[] { 8, 2, 51 }, new[] { 3, 15, 23 }, new[] { 7, 2, 12 }, new[] { 11, 1, 47 }, new[] { 2, 1, 75 }, new[] { 3, 8, 63 }, new[] { 8, 10, 19 }, new[] { 6, 8, 18 }, new[] { 4, 2, 55 }, new[] { 14, 11, 80 }, new[] { 10, 3, 73 }, new[] { 3, 5, 22 }, new[] { 12, 3, 61 }, new[] { 1, 13, 33 }, new[] { 9, 3, 98 }, new[] { 9, 12, 69 }, new[] { 15, 9, 6 }, new[] { 7, 13, 76 }, new[] { 11, 12, 22 }, new[] { 11, 15, 51 }, new[] { 13, 15, 46 }, new[] { 5, 10, 58 }, new[] { 1, 10, 26 }, new[] { 13, 4, 85 }, new[] { 7, 14, 58 }, new[] { 5, 8, 46 }, new[] { 11, 6, 32 }, new[] { 10, 9, 41 }, new[] { 9, 14, 35 }, new[] { 14, 13, 60 }, new[] { 3, 9, 97 }, new[] { 2, 5, 39 }, new[] { 7, 11, 19 }, new[] { 1, 12, 27 }, new[] { 7, 5, 13 }, new[] { 8, 4, 34 }, new[] { 9, 15, 25 }, new[] { 5, 1, 93 }, new[] { 15, 13, 97 }, new[] { 14, 9, 35 }, new[] { 8, 6, 67 }, new[] { 9, 5, 39 }, new[] { 13, 11, 35 }, new[] { 7, 4, 21 }, new[] { 12, 9, 64 }, new[] { 14, 8, 8 }, new[] { 10, 12, 94 }, new[] { 8, 9, 76 }, new[] { 8, 5, 71 }, new[] { 2, 9, 64 }, new[] { 10, 14, 59 }, new[] { 1, 4, 74 }, new[] { 7, 1, 69 }, new[] { 15, 5, 55 }, new[] { 6, 15, 80 }, new[] { 13, 8, 84 }, new[] { 8, 13, 63 }, new[] { 8, 3, 91 }, new[] { 10, 4, 87 }, new[] { 1, 5, 39 }, new[] { 8, 11, 0 }, new[] { 1, 3, 79 }, new[] { 4, 5, 82 }, new[] { 4, 12, 87 }, new[] { 3, 11, 29 }, new[] { 7, 8, 92 }, new[] { 10, 7, 77 }, new[] { 6, 12, 42 }, new[] { 13, 2, 40 }, new[] { 9, 10, 13 }, new[] { 4, 13, 65 }, new[] { 2, 4, 34 }, new[] { 3, 13, 44 }, new[] { 2, 14, 69 }, new[] { 3, 4, 42 }, new[] { 5, 15, 98 }, new[] { 14, 7, 6 }, new[] { 15, 3, 94 }, new[] { 10, 2, 37 }, new[] { 15, 11, 7 }, new[] { 9, 2, 15 }, new[] { 13, 9, 66 }, new[] { 4, 8, 83 }, new[] { 8, 15, 23 }, new[] { 13, 1, 50 }, new[] { 6, 13, 57 }, new[] { 2, 10, 37 }, new[] { 10, 6, 38 }, new[] { 2, 7, 45 }, new[] { 9, 8, 8 }, new[] { 3, 12, 28 }, new[] { 3, 2, 83 }, new[] { 2, 12, 75 }, new[] { 1, 8, 91 }, new[] { 4, 3, 70 }, new[] { 12, 6, 48 }, new[] { 3, 1, 13 }, new[] { 5, 6, 42 }, new[] { 6, 11, 96 }, new[] { 3, 6, 22 }, new[] { 15, 6, 34 }, new[] { 11, 8, 43 }, new[] { 15, 7, 40 }, new[] { 9, 11, 57 }, new[] { 11, 2, 11 }, new[] { 2, 8, 22 }, new[] { 9, 1, 73 }, new[] { 2, 15, 40 }, new[] { 12, 11, 10 }, new[] { 15, 4, 78 }, new[] { 12, 8, 75 }, new[] { 10, 15, 37 }, new[] { 13, 10, 44 }, new[] { 8, 14, 33 }, new[] { 3, 7, 82 }, new[] { 5, 4, 46 }, new[] { 12, 5, 79 }, new[] { 15, 14, 43 }, new[] { 10, 5, 65 }, new[] { 5, 9, 34 }, new[] { 12, 1, 54 }, new[] { 6, 3, 16 }, new[] { 14, 10, 83 }, new[] { 10, 11, 67 } }; var broadcaster = new NetworkBroadcastTime(); Assert.Equal(34, broadcaster.NetworkDelayTime(times, 15, 8)); }
public void TestCase_0() { int[][] times = { new[] { 2, 1, 1 }, new[] { 2, 3, 1 }, new[] { 3, 4, 1 } }; var broadcaster = new NetworkBroadcastTime(); Assert.Equal(2, broadcaster.NetworkDelayTime(times, 4, 2)); }
public void Fully_connected_graph() { int[][] times = { new[] { 1, 2, 2 }, new[] { 1, 3, 6 }, new[] { 2, 3, 5 }, new[] { 2, 1, 3 }, new[] { 3, 1, 7 }, new[] { 3, 2, 9 }, }; var broadcaster = new NetworkBroadcastTime(); Assert.Equal(6, broadcaster.NetworkDelayTime(times, 3, 1)); }