Problem Statement
Your task is complicated by the fact that there are several agents located in various rooms. These agents wish to capture you, but each one has a particular destination, as they each have different intelligence suggesting that you will head towards their destination. Like yourself, these agents will also reach their target room in the least possible amount of time. The agents begin moving at the same time as you do. If there are multiple shortest paths that an agent may use, you may assume each such path is equally likely as his choice. Once an agent reaches his goal, he will stay there indefinitely. Note that while you are aware of each agent's start and target rooms, you will be unaware of the agent's movements as you move through the facility.
As you wish to dodge capture as well as reach the exit as quickly as possible, you will use the following strategy. Each second you choose the way which allows you to reach the exit as quickly as possible (see example 6 for clarification). If there are multiple ways to do so, you choose the corridor that minimizes the probability of being captured from that point on. As soon as you reach the exit room, you leave the facility and cannot be captured. However, you may be captured the moment that you reach the exit room (see example 7).
There are two ways that you can be captured by an agent.
1) You travel through a corridor at the same time an agent does (you can be traversing the corridor in either the same direction or the opposite direction).
2) You're in a room at the same time as an agent.
The facility is described by a
Given this information, return the probability that you will be captured by an agent if you follow the described strategy.
Definition
- Class:
- EscapeArtist
- Method:
- bestRoute
- Parameters:
- String[], int[], int[], int, int
- Returns:
- double
- Method signature:
- double bestRoute(String[] corridors, int[] agentStart, int[] agentTarget, int start, int finish)
- (be sure your method is public)
Notes
- The returned value must be accurate to within a relative or absolute value of 1E-9.
Constraints
- corridors will contain between 2 and 25 elements, inclusive.
- Each element of corridors will contain exactly N characters, where N is the number of elements in corridors.
- Each character in corridors will be either a '0' (zero) or '1' (one).
- The jth character of the ith element of corridors will be the same as the ith character of the jth element of corridors.
- The ith character of the ith element of corridors will be '0'.
- start and finish will each be between 0 and N-1, inclusive, where N is the number of elements in corridors.
- start will be different from finish.
- agentStart and agentTarget will each contain between 1 and 10 elements, inclusive.
- agentStart and agentTarget will contain the same number of elements.
- Each agent's starting room will be different from his target room.
- No agent will start in the same room as you.
- Each element of agentStart and agentTarget will be between 0 and N-1, inclusive, where N is the number of elements in corridors.
- There will be at least one path between each pair of rooms in the facility.
Examples
{ "0100", "1011", "0100", "0100" }
{3}
{1}
0
2
Returns: 1.0
3 | | 0---1---2 The agent will always arrive at room 1 at the same time as you do, so there is no way to avoid capture.
{ "01000", "10110", "01000", "01001", "00010" }
{4}
{1}
0
2
Returns: 0.0
2 | | 0---1---3---4 You will reach room 1 before the agent does, so you will avoid capture.
{ "010000", "101011", "010111", "001000", "011000", "011000" }
{4}
{5}
0
3
Returns: 0.5
4 / \ 0--1---2--3 \ / 5 Your path must be 0-1-2-3. The agent is equally likely to take the paths 4-1-5 or 4-2-5. If he takes the first path, you will be captured in room 1. However, if he takes the second path, you will escape.
{ "010", "101", "010" }
{2}
{0}
0
2
Returns: 1.0
{ "0010000000", "0010000100", "1101000000", "0010100000", "0001011000", "0000100001", "0000100000", "0100000010", "0000000101", "0000010010" }
{1}
{5}
0
6
Returns: 0.5
{ "0010000000", "0010000100", "1101000000", "0010100000", "0001011000", "0000100001", "0000100000", "0100000010", "0000000101", "0000010010" }
{2}
{6}
1
7
Returns: 0.0
lovro 0
{ "010000", "101000", "010111", "001000", "001000", "001000" }
{4}
{5}
0
3
Returns: 0.0
lovro 1
{ "010000", "101011", "010100", "001000", "010000", "010000" }
{4}
{5}
0
3
Returns: 1.0
lovro 2
{ "010000", "101000", "010111", "001011", "001100", "001100" }
{4}
{5}
0
3
Returns: 0.0
lovro 3
{ "010000", "101011", "010111", "001011", "011100", "011100" }
{4}
{5}
0
3
Returns: 0.33333333333333326
lovro 4
{ "010000", "101011", "010111", "001011", "011100", "011100" }
{4,4}
{5,5}
0
3
Returns: 0.5555555555555555
lovro 5
{ "0100", "1010", "0101", "0010" }
{3}
{2}
0
2
Returns: 1.0
lovro 6
{ "010000", "101001", "010110", "001000", "001000", "010000" }
{4}
{5}
0
3
Returns: 1.0
5 4 | | | | 0---1---2---3 You will be travelling through the corridor between rooms 1 and 2 at the same time the agent travels through the same corridor in the opposite direction.
{ "000111", "001001", "010010", "100001", "101001", "110110" }
{2}
{3}
0
2
Returns: 0.6666666666666666
{ "01100000000000000000", "10011000000000000000", "10011000000000000000", "01100110000000000000", "01100110000000000000", "00011001100000000000", "00011001100000000000", "00000110011000000000", "00000110011000000000", "00000001100110000000", "00000001100110000000", "00000000011001100000", "00000000011001100000", "00000000000110011000", "00000000000110011000", "00000000000001100110", "00000000000001100110", "00000000000000011001", "00000000000000011001", "00000000000000000110" }
{1,1,1,1,1,1,1,1,1,1}
{18,18,18,18,18,18,18,18,18,18}
0
19
Returns: 0.0
{ "0110", "1011", "1100", "0100" }
{0}
{2}
2
3
Returns: 0.0
{ "00110000000000000000", "00110000000000000000", "11001100000000000000", "11001100000000000000", "00110011000000000000", "00110011000000000000", "00001100110000000000", "00001100110000000000", "00000011001100000000", "00000011001100000000", "00000000110011000000", "00000000110011000000", "00000000001100110000", "00000000001100110000", "00000000000011001100", "00000000000011001100", "00000000000000110011", "00000000000000110011", "00000000000000001100", "00000000000000001100" }
{1}
{18}
0
19
Returns: 0.99609375
{ "00110000000000000000", "00110000000000000000", "11001100000000000000", "11001100000000000000", "00110011000000000000", "00110011000000000000", "00001100110000000000", "00001100110000000000", "00000011001100000000", "00000011001100000000", "00000000110011000000", "00000000110011000000", "00000000001100110000", "00000000001100110000", "00000000000011001100", "00000000000011001100", "00000000000000110011", "00000000000000110011", "00000000000000001100", "00000000000000001100" }
{1,1}
{18,18}
0
19
Returns: 0.9999847412109375
{ "00110000000000000000", "00110000000000000000", "11001100000000000000", "11001100000000000000", "00110011000000000000", "00110011000000000000", "00001100110000000000", "00001100110000000000", "00000011001100000000", "00000011001100000000", "00000000110011000000", "00000000110011000000", "00000000001100110000", "00000000001100110000", "00000000000011001100", "00000000000011001100", "00000000000000110011", "00000000000000110011", "00000000000000001100", "00000000000000001100" }
{1,1,1}
{18,18,18}
0
19
Returns: 0.9999999403953552
{"01110000000000000000", "10001110000000000000", "10001110000000000000", "10001110000000000000", "01110001110000000000", "01110001110000000000", "01110001110000000000", "00001110001110000000", "00001110001110000000", "00001110001110000000", "00000001110001110000", "00000001110001110000", "00000001110001110000", "00000000001110001110", "00000000001110001110", "00000000001110001110", "00000000000001110001", "00000000000001110001", "00000000000001110001", "00000000000000001110" }
{1,1,1,1,1,1,1,1,1,1}
{18,18,18,18,18,18,18,18,18,18}
0
19
Returns: 0.0
{ "00011100000000000010", "00011110000000000010", "00011111000000000010", "11101111100000000000", "11110111110000000000", "11111011111000000000", "01111101111100000000", "00111110111110000000", "00011111011111000000", "00001111101111100000", "00000111110111110000", "00000011111011111000", "00000001111101111100", "00000000111110111110", "00000000011111011111", "00000000001111101111", "00000000000111110111", "00000000000011111001", "11100000000001111000", "00000000000000111100" }
{0,0,0,0,0,0,0,0,0,0}
{17,17,17,17,17,17,17,17,17,17}
18
19
Returns: 0.0
{"01","10"}
{0}
{1}
1
0
Returns: 1.0
{"010","101","010"}
{0,0}
{1,2}
1
2
Returns: 0.0
{ "01100", "10011", "10010", "01100", "01000" }
{4,3}
{1,0}
0
3
Returns: 0.5
0 / \ 4---1 2 \ / 3 Here you can choose between two paths. If you take path 0-1-3, you will always be captured by the first agent at room 1. However, if you take path 0-2-3, there is a 50% chance that you will be captured in room 2, depending on which path the second agent takes.
{"01110000000000000000", "10001110000000000000", "10001110000000000000", "10001110000000000000", "01110001110000000000", "01110001110000000000", "01110001110000000000", "00001110001110000000", "00001110001110000000", "00001110001110000000", "00000001110001110000", "00000001110001110000", "00000001110001110000", "00000000001110001110", "00000000001110001110", "00000000001110001110", "00000000000001110001", "00000000000001110001", "00000000000001110001", "00000000000000001110" }
{19,19,19,19,19,19,19,19,19,19}
{0,0,0,0,0,0,0,0,0,0}
0
19
Returns: 0.6920538523425614
{ "000111000000000000000001", "000111000000000000000001", "000111000000000000000001", "111000111000000000000000", "111000111000000000000000", "111000111000000000000000", "000111000111000000000000", "000111000111000000000000", "000111000111000000000000", "000000111000111000000000", "000000111000111000000000", "000000111000111000000000", "000000000111000111000000", "000000000111000111000000", "000000000111000111000000", "000000000000111000110000", "000000000000111000110000", "000000000000111000110000", "000000000000000111001100", "000000000000000111001100", "000000000000000000110010", "000000000000000000110010", "000000000000000000001100", "111000000000000000000000" }
{22,22,22,22,22,22,22,22,22,22}
{23,23,23,23,23,23,23,23,23,23}
23
22
Returns: 0.6920538523425614
{ "0001110000000000000000001", "0001110000000000000000001", "0001110000000000000000001", "1110001110000000000000000", "1110001110000000000000000", "1110001110000000000000000", "0001110001110000000000000", "0001110001110000000000000", "0001110001110000000000000", "0000001110001110000000000", "0000001110001110000000000", "0000001110001110000000000", "0000000001110001110000000", "0000000001110001110000000", "0000000001110001110000000", "0000000000001110001110000", "0000000000001110001110000", "0000000000001110001110000", "0000000000000001110001100", "0000000000000001110001100", "0000000000000001110001100", "0000000000000000001110010", "0000000000000000001110010", "0000000000000000000001100", "1110000000000000000000000" }
{24,22,22,22,21,21,21,22,22,22}
{23,0,1,2,0,1,2,3,4,5}
23
24
Returns: 1.0
{ "0001110000000000000000001", "0001110000000000000000001", "0001110000000000000000001", "1110001110000000000000000", "1110001110000000000000000", "1110001110000000000000000", "0001110001110000000000000", "0001110001110000000000000", "0001110001110000000000000", "0000001110001110000000000", "0000001110001110000000000", "0000001110001110000000000", "0000000001110001110000000", "0000000001110001110000000", "0000000001110001110000000", "0000000000001110001110000", "0000000000001110001110000", "0000000000001110001110000", "0000000000000001110001100", "0000000000000001110001100", "0000000000000001110001100", "0000000000000000001110010", "0000000000000000001110010", "0000000000000000000001100", "1110000000000000000000000" }
{23,23,23,23,22,21,22,22,22,21}
{24,0,1,2,24,24,0,1,2,0}
24
23
Returns: 0.945192201747492
{ "0001110000000000000000001", "0001110000000000000000001", "0001110000000000000000001", "1110001110000000000000000", "1110001110000000000000000", "1110001110000000000000000", "0001110001110000000000000", "0001110001110000000000000", "0001110001110000000000000", "0000001110001110000000000", "0000001110001110000000000", "0000001110001110000000000", "0000000001110001110000000", "0000000001110001110000000", "0000000001110001110000000", "0000000000001110001110000", "0000000000001110001110000", "0000000000001110001110000", "0000000000000001110001100", "0000000000000001110001100", "0000000000000001110001100", "0000000000000000001110010", "0000000000000000001110010", "0000000000000000000001100", "1110000000000000000000000" }
{24,0,1,2,24,24,0,1,2,0}
{23,23,23,23,22,21,22,22,22,21}
23
24
Returns: 0.958894151310619
{ "0001110000000000000000001", "0001110000000000000000001", "0001110000000000000000001", "1110001110000000000000000", "1110001110000000000000000", "1110001110000000000000000", "0001110001110000000000000", "0001110001110000000000000", "0001110001110000000000000", "0000001110001110000000000", "0000001110001110000000000", "0000001110001110000000000", "0000000001110001110000000", "0000000001110001110000000", "0000000001110001110000000", "0000000000001110001110000", "0000000000001110001110000", "0000000000001110001110000", "0000000000000001110001100", "0000000000000001110001100", "0000000000000001110001100", "0000000000000000001110010", "0000000000000000001110010", "0000000000000000000001100", "1110000000000000000000000" }
{23,23,23,23,23,23,23,23,23,23}
{24,24,24,24,24,24,24,24,24,24}
24
23
Returns: 0.6920538523425614
{ "0001110000000000000000001", "0001110000000000000000001", "0001110000000000000000001", "1110001110000000000000000", "1110001110000000000000000", "1110001110000000000000000", "0001110001110000000000000", "0001110001110000000000000", "0001110001110000000000000", "0000001110001110000000000", "0000001110001110000000000", "0000001110001110000000000", "0000000001110001110000000", "0000000001110001110000000", "0000000001110001110000000", "0000000000001110001110000", "0000000000001110001110000", "0000000000001110001110000", "0000000000000001110001100", "0000000000000001110001100", "0000000000000001110001100", "0000000000000000001110010", "0000000000000000001110010", "0000000000000000000001100", "1110000000000000000000000" }
{24,24,24,24,24,24,24,24,24,24}
{23,23,23,23,23,23,23,23,23,23}
23
24
Returns: 0.6920538523425614
{"010010", "101000", "010100", "001001", "100001", "000110"}
{1, 4}
{2, 5}
3
0
Returns: 1.0
{"010000", "101000", "010100", "001010", "000101", "000010"}
{1}
{5}
0
4
Returns: 0.0
{"010000", "101000", "010100", "001010", "000101", "000010"}
{1}
{5}
0
5
Returns: 1.0
{"0100001", "1010000", "0101011", "0010100", "0001010", "0010100", "1010000"}
{3}
{0}
0
4
Returns: 0.5
{"0100001000", "1010000000", "0101011000", "0010100000", "0001010101", "0010100000", "1010000000", "0000100010", "0000000101", "0000100010"}
{2, 3, 8, 8, 8, 8}
{0, 5, 2, 2, 2, 2}
0
8
Returns: 0.96875
{ "0101101000000010", "1010000000000000", "0100010000100000", "1000000000000000", "1000000000000000", "0010000000000000", "1000000110001000", "0000001000000000", "0000001001010000", "0000000010000001", "0010000000000100", "0000000010000000", "0000001000000000", "0000000000100000", "1000000000000000", "0000000001000000" }
{12,8}
{5,1}
10
0
Returns: 1.0
{ "010100", "101010", "010000", "100001", "010000", "000100" }
{4,2,2,5}
{5,5,3,4}
0
1
Returns: 1.0
{ "011000", "100111", "100000", "010000", "010000", "010000" }
{3,1,3,1}
{1,4,4,3}
5
3
Returns: 1.0
{ "011000000000000000", "100000000000010000", "100101000000000000", "001010110000001000", "000100001000000001", "001000000000000000", "000100000000000000", "000100000100000000", "000010000000000000", "000000010010000000", "000000000101100000", "000000000010000000", "000000000010000000", "010000000000000010", "000100000000000100", "000000000000001000", "000000000000010000", "000010000000000000" }
{4,5}
{5,7}
3
4
Returns: 1.0
{ "011000011000", "100100000000", "100011000000", "010000100000", "001000000001", "001000000010", "000100000000", "100000000100", "100000000000", "000000010000", "000001000000", "000010000000" }
{9,11,8,8,8,11,8,11}
{5,3,7,5,7,8,6,9}
1
11
Returns: 1.0
{ "01010011000100", "10100000001000", "01001000000000", "10000000000000", "00100100100010", "00001000000000", "10000000000000", "10000000010000", "00001000000000", "00000001000000", "01000000000000", "10000000000000", "00001000000001", "00000000000010" }
{0,2,2,7,1}
{13,10,8,9,3}
13
12
Returns: 0.0
{ "01000000000000000", "10111011000000000", "01000000010000000", "01000100001000000", "01000000000000000", "00010000000000000", "01000000100000000", "01000000000000000", "00000010000001000", "00100000000100000", "00010000000010001", "00000000010000000", "00000000001000000", "00000000100000110", "00000000000001000", "00000000000001000", "00000000001000000" }
{1,13,15,7,4,15}
{16,4,6,11,2,6}
6
14
Returns: 1.0
{ "0100001000000000", "1011110000000000", "0100000000100000", "0100000100000000", "0100000000000000", "0100000001001000", "1000000010000000", "0001000000000001", "0000001000010000", "0000010000000000", "0010000000000000", "0000000010000000", "0000010000000110", "0000000000001000", "0000000000001000", "0000000100000000" }
{9,2,9,12,14,1,11}
{1,4,15,7,3,3,6}
0
7
Returns: 1.0
{ "01111000000011110", "10100001001010110", "11011100100110010", "10101110101001100", "10110111100101001", "00111010000101000", "00011100101100011", "01001000100110101", "00111011011001110", "00000000101010100", "01010010110001101", "00101111000011111", "11100001010101010", "10011100101110001", "11010001111100011", "11100010100110101", "00001011001101110" }
{10,10,10,11,3,2,1,13}
{3,7,0,0,13,16,12,4}
12
9
Returns: 0.0
{ "01101110111100010", "10111111000010010", "11001010000001000", "01000010110011110", "11100000001100011", "11000010100101010", "11110100001010111", "01000000001001110", "10010100010000001", "10010000101110110", "10001011010101000", "10001100011001010", "01010010010000100", "00110101001100010", "00010011010010000", "11011111010101001", "00001010100000010" }
{14,15,2,12}
{0,13,4,7}
4
0
Returns: 0.0
{ "01000010", "10110000", "01001000", "01000000", "00100101", "00001000", "10000000", "00001000" }
{3,1,2}
{4,3,7}
4
3
Returns: 1.0
{ "0110010001010011", "1000100000000100", "1001110110010000", "0010000100001000", "0110001010000001", "1010000010000000", "0000100000100000", "0011000000000000", "0010110000100010", "1000000000100000", "0000001011000000", "1010000000000000", "0001000000000000", "0100000000000000", "1000000010000000", "1000100000000000" }
{2,13,11,0,7,10,3,3}
{13,9,2,7,15,14,10,4}
5
11
Returns: 0.5
{ "0111010", "1010111", "1100000", "1000010", "0100011", "1101100", "0100100" }
{4,4}
{3,6}
0
4
Returns: 0.0
{ "011111011100111", "101111101101000", "110100101111001", "111011000101000", "110101100101010", "110110010011101", "011010010110100", "100001101101011", "111000010101011", "111110111011000", "001001100100001", "011111011100110", "100001100001011", "100010011001101", "101001011010110" }
{11,5,6,3,6,10}
{14,11,7,8,10,2}
7
9
Returns: 0.19999999999999996
{ "01010111110010", "10101010000001", "01001100000000", "10000101010000", "01100000110100", "10110001000011", "11000000101110", "10010100000010", "10001010000000", "10011000000000", "00000010000000", "00001010000000", "10000111000001", "01000100000010" }
{0,6,4,8,1,9,12,6,12}
{8,8,7,7,4,0,1,12,7}
5
8
Returns: 1.0
{ "01011010101110", "10101010110101", "01011101001111", "10101001010001", "11110101000001", "00101000101011", "11000001000011", "00111010111011", "11000101000101", "01010001000111", "10100101000110", "11100000111010", "10100111011100", "01111111110000" }
{12,13,0,7,6,10,12,11}
{11,5,12,12,8,7,7,0}
9
2
Returns: 0.0
{ "0110", "1011", "1100", "0100" }
{1,3,3,1,1,3,1,3,2,2}
{2,0,2,3,2,1,3,2,0,0}
0
3
Returns: 1.0
{ "0100", "1010", "0101", "0010" }
{3}
{2}
0
3
Returns: 1.0
0--1--2--3 The agent reaches room 2 before you, but stays there indefinitely. You will then be captured as soon as you enter room 2.
{ "010100", "101010", "010010", "100001", "011000", "000100" }
{5}
{4}
4
1
Returns: 0.0
{ "011010", "100011", "100100", "001001", "110001", "010110" }
{1}
{2}
3
5
Returns: 0.0
{ "011110", "100111", "100011", "110011", "111100", "011100" }
{3}
{0}
2
3
Returns: 0.0
{ "011001", "100001", "100110", "001000", "001000", "110000" }
{2}
{5}
5
1
Returns: 0.0
{ "010101", "101011", "010000", "100010", "010100", "110000" }
{4,3}
{0,2}
5
3
Returns: 0.75
{ "010001", "101010", "010110", "001000", "011001", "100010" }
{3}
{1}
1
2
Returns: 1.0
{ "010000", "101000", "010110", "001000", "001001", "000010" }
{0}
{1}
2
3
Returns: 0.0
{ "011000", "100100", "100001", "010010", "000100", "001000" }
{1}
{2}
0
5
Returns: 0.0
{ "011111", "100100", "100001", "110001", "100000", "101100" }
{1,0,0}
{2,4,5}
3
2
Returns: 1.0
{ "011110", "100001", "100000", "100000", "100000", "010000" }
{5,5,4}
{2,3,1}
0
5
Returns: 1.0
{ "011101", "100000", "100110", "101000", "001000", "100000" }
{2,1,0}
{3,2,4}
3
5
Returns: 1.0
{ "011011", "100000", "100110", "001001", "101000", "100100" }
{0,1,3,3,2}
{3,5,1,1,5}
5
2
Returns: 0.9375
{ "010000", "101100", "010010", "010001", "001000", "000100" }
{5,4}
{1,3}
2
3
Returns: 1.0
{ "010100", "101010", "010011", "100000", "011000", "001000" }
{4,0,5}
{1,1,2}
2
4
Returns: 0.0
{ "011111", "100010", "100011", "100011", "111101", "101110" }
{0,3,3,3,2}
{5,2,2,2,1}
1
3
Returns: 0.8518518518518519
{ "011000", "100100", "100101", "011010", "000100", "001000" }
{2,0}
{5,2}
4
2
Returns: 1.0
{ "01100", "10011", "10000", "01000", "01000" }
{3,4}
{1,1}
2
1
Returns: 1.0
{ "01011", "10110", "01000", "11000", "10000" }
{4,1}
{2,3}
3
4
Returns: 1.0
{ "01000", "10100", "01011", "00100", "00100" }
{1,4}
{4,2}
0
1
Returns: 0.0
{ "01100", "10100", "11011", "00101", "00110" }
{4,1}
{3,3}
0
4
Returns: 1.0
{ "01010", "10110", "01001", "11001", "00110" }
{2,2}
{3,4}
1
2
Returns: 0.5
{ "01110", "10100", "11001", "10001", "00110" }
{4,4}
{0,2}
2
3
Returns: 0.5
{ "011", "101", "110" }
{0}
{1}
2
1
Returns: 1.0
{ "011", "101", "110" }
{0}
{1}
2
1
Returns: 1.0
{ "011", "101", "110" }
{1}
{0}
0
2
Returns: 0.0
{ "011", "101", "110" }
{1}
{0}
2
1
Returns: 0.0
{ "011", "100", "100" }
{1}
{2}
2
1
Returns: 1.0
{ "010000010000000", "101000000000000", "010100000000000", "001010000000000", "000101000000000", "000010100010000", "000001010000000", "100000101000000", "000000010001000", "000000000001100", "000001000000010", "000000001100101", "000000000101011", "000000000010100", "000000000001100" }
{0,9,9}
{4,14,14}
8
10
Returns: 0.5
{ "01101", "10010", "10010", "01100", "10000" }
{2,4}
{4,0}
1
4
Returns: 1.0
{ "01000", "10110", "01010", "01101", "00010" }
{4,1}
{3,4}
0
4
Returns: 1.0
{ "01010", "10101", "01000", "10000", "01000" }
{0,0}
{4,3}
1
3
Returns: 1.0
{ "01000", "10100", "01011", "00100", "00100" }
{4,2}
{2,0}
3
0
Returns: 1.0
{ "01000", "10110", "01011", "01101", "00110" }
{4,1}
{2,4}
2
3
Returns: 0.5
{ "01011", "10100", "01000", "10000", "10000" }
{0,2}
{2,3}
3
1
Returns: 1.0
{ "01111", "10000", "10001", "10001", "10110" }
{4,2}
{3,3}
3
2
Returns: 0.5
{ "01110", "10001", "10010", "10100", "01000" }
{2,0}
{4,4}
3
2
Returns: 0.0
{ "01101", "10010", "10000", "01000", "10000" }
{1,1}
{2,0}
3
1
Returns: 0.0
{ "01100", "10000", "10011", "00100", "00100" }
{1,3}
{2,0}
0
4
Returns: 1.0
{ "01100", "10011", "10000", "01000", "01000" }
{0,3}
{2,1}
4
3
Returns: 1.0
{ "01001", "10100", "01011", "00100", "10100" }
{3,4}
{1,2}
2
3
Returns: 1.0
{ "01001", "10110", "01000", "01000", "10000" }
{0,2}
{1,3}
4
0
Returns: 0.0
{ "01000", "10110", "01010", "01101", "00010" }
{1,3}
{2,2}
2
1
Returns: 1.0
{ "01001", "10110", "01000", "01000", "10000" }
{0,1}
{4,0}
2
1
Returns: 0.0
{ "01010", "10100", "01011", "10100", "00100" }
{0,0,0,0,0,0}
{1,4,1,4,4,4}
3
0
Returns: 0.9375
{ "01111", "10100", "11010", "10100", "10000" }
{3,4,1,3,3,3,3,3,3,3}
{1,3,0,1,1,1,1,1,1,1}
2
3
Returns: 0.99609375
{ "01101", "10010", "10010", "01100", "10000" }
{0,4}
{1,3}
3
4
Returns: 0.5
{ "01110", "10001", "10000", "10000", "01000" }
{1,4}
{0,3}
0
3
Returns: 0.0
{ "0110100000000011100000100", "1000100000000000000100000", "1001000000000100100000000", "0010010000011001000010000", "1100000000000000000000101", "0001001011000001000000000", "0000010101000000000000000", "0000001000100000000010000", "0000010001100000000000000", "0000011010000000000000000", "0000000110000000010000000", "0001000000000000100000000", "0001000000000010000000100", "0010000000000000000101100", "1000000000001000001110010", "1001010000000000000001000", "1010000000010000001010000", "0000000000100000000000000", "0000000000000010100010000", "0100000000000110000000000", "0001000100000010101000000", "0000000000000101000000000", "1000100000001100000000001", "0000000000000010000000000", "0000100000000000000000100" }
{21,6,20,13,20,6,2,6,11,11}
{12,5,13,18,15,19,4,11,0,19}
16
15
Returns: 1.0
{ "0100000100010010110100000", "1010000011000101000111000", "0101110000011000100001000", "0010011110101000000110010", "0010001001010000000100000", "0011000001001101000001001", "0001100000101010010010010", "1001000000011010001000010", "0101000001000000000000000", "0100110010000010000000001", "0001001000000001010110000", "1010100100000001110000000", "0011011100000000100000001", "0100010000000000010010000", "1000001101000000000011001", "0100010000110000000100001", "1010000000011000000001001", "1000001000110100000001010", "0000000100000000000100000", "1101100000100001001000100", "0101001000100110000000000", "0110010000000010110000010", "0000000000000000000100001", "0001001100000000010001000", "0000010001001011100000100" }
{1,1,8,14,16,23,11,14,17,8}
{17,2,15,4,22,24,24,1,4,0}
9
14
Returns: 0.625
{ "0110100000000101100000100", "1011010011000000000011000", "1100010000000010000000100", "0100001101001010110000010", "1000000000001000100000010", "0110000100001000110010010", "0001000001001010001011000", "0001010000100100000000110", "0100000000110011001100011", "0101001000011010001000000", "0000000110001000000000000", "0000000011000000100000000", "0001111001100100000000011", "1000000100001001001100100", "0011001011000001000001000", "1000000010000110000000000", "1001110000010000000000001", "0001010000000000000000010", "0000001011000100000011000", "0000000010000100000000100", "0100011000000000001000100", "0100001000000010001000000", "1010000100000100000110010", "0001110110001000010000100", "0000000010001000100000000" }
{18,15,0,19,4,18,14,2,1,6}
{12,10,14,1,23,14,21,7,19,17}
23
24
Returns: 0.0
{ "0101000111110110110011000", "1010111101100101010001100", "0100001110110011000011011", "1000100011011000011010100", "0101011101110011010010001", "0100101101100010010100111", "0110110101110111000111101", "1110111011110001011100111", "1011000101110010010110110", "1101111110111110000001011", "1110111111010110000111010", "1011101111100111001110001", "0001000001000001010010111", "1100001001110001010000010", "1010111011110000011011111", "0110101100011100101010110", "1000000000000001010000000", "1101110110001110101110000", "0001000100010011010011111", "0000011110110000010000110", "1011101010111011011000100", "1110001001100010001000110", "0101011110001011001111000", "0010010111101111001101000", "0010111101011010001000000" }
{23,18,16,15,24,17,13,22,10,9}
{15,11,21,10,2,23,18,19,23,13}
1
5
Returns: 0.125
{ "0100001000001001000001000", "1010000100000000010010000", "0101010100100010010000000", "0010100010010100000100000", "0001000100000000000000000", "0010000000000000010000000", "1000000000000000101000000", "0110100000000000001000000", "0001000001000000000000000", "0000000010000000000000000", "0010000000000000000001000", "0001000000000000000000000", "1000000000000000000000000", "0001000000000010000000101", "0010000000000100000000000", "1000000000000000000000110", "0000001000000000000000000", "0110010000000000000000000", "0000001100000000000000000", "0001000000000000000000000", "0100000000000000000000000", "1000000000100000000000000", "0000000000000101000000000", "0000000000000001000000000", "0000000000000100000000000" }
{11,3,13,16,5,15,3,23,4,6}
{0,24,8,4,1,11,8,9,7,4}
12
20
Returns: 1.0
{ "0111110011010111101100110", "1011100000101001110111001", "1101111110011111010110111", "1110110111011010101100111", "1111001101010101011111100", "1011000010101011111000111", "0010100010000010111111111", "0011100011111111110000111", "1011011100111010011100000", "1001100100111110011010100", "0100010111001011010111000", "1011100111001011011110110", "0111010111110000110010110", "1010100101000011101111101", "1011011111110101111001110", "1110110100110110000110010", "1101011100001110001010011", "0110111111111010001111100", "1001111011010110110011011", "1111101010110101010010101", "0110101001111101111101110", "0100101000100110011010000", "1011111101011110010110000", "1011011100011011101010001", "0111011100000100101100010" }
{5,1,14,22,24,1,23,5,10,22}
{18,23,7,23,15,13,8,1,7,13}
11
4
Returns: 0.11111111111111116
{ "0110011001010000100000111", "1000101000001100101011101", "1001100000010011111000000", "0010100010101101010000010", "0111001111000001011000011", "1000000100110101010100010", "1100100111011010101000000", "0000111001100000011001111", "0001101000010011011001111", "1000101100000000100001001", "0001010100001110000101011", "1010011010000101001010011", "0101001000100001100110100", "0101010000110011001000110", "0010001010100101000010011", "0011110010011110101110100", "1110001001001001010100001", "0011110110000000101011000", "0110101110010101010101000", "0000010000101001101010110", "0100000000011011010100010", "0100000111100000011000011", "1100000110001101000100011", "1001110110110110000111101", "1100100111110010100001110" }
{13,2,7,2,17,4,14,19,23,18}
{1,18,6,10,16,12,4,4,15,10}
3
4
Returns: 0.32499999999999996
{ "0110001000000000000010010", "1000000010000000000000000", "1001100001000000000000000", "0010000000100010000001000", "0010010000000000000000000", "0000100000000000000000100", "1000000100001000100000000", "0000001000010011000000000", "0100000001000000100000000", "0010000010100000000000010", "0001000001000000000000000", "0000000100000100100000000", "0000001000000000000000000", "0000000000010000000000000", "0001000100000000001000000", "0000000100000000000000000", "0000001010010000010100000", "0000000000000000100000000", "0000000000000010000000000", "0000000000000000100000000", "1000000000000000000000001", "0001000000000000000000000", "0000010000000000000000000", "1000000001000000000000000", "0000000000000000000010000" }
{22,9,13,7,15,19,0,11,3,1}
{12,10,1,11,2,18,3,19,14,16}
2
24
Returns: 1.0
{ "0111100000000101000000000", "1000000000110000000001000", "1000000100000001010001100", "1000100000000000001001100", "1001010000000000011100001", "0000101101101001001011000", "0000010010100000010000000", "0010010010100010001000000", "0000001100000000000001100", "0000010000000000000000000", "0100011100000011100100100", "0100000000001000000000000", "0000010000010100000011001", "1000000000001000110000010", "0000000100100000000000110", "1010010000100000000100010", "0000000000100100000010001", "0010101000000100000100000", "0001110100000000000000010", "0000100000100001010001000", "0000010000001000100000000", "0111010010001000000100000", "0011000010100010000000000", "0000000000000111001000000", "0000100000001000100000000" }
{12,18,0,9,5,21,19,3,12,1}
{7,16,2,18,16,20,0,18,4,10}
8
12
Returns: 0.0
{ "0100000010001000000000001", "1011100000000000000000000", "0100000101101000000000000", "0100010000000010000000000", "0100000000000000000000000", "0001001000001000000100000", "0000010001000000000000000", "0010000000010000000000100", "1000000000000001100000010", "0010001000000100000000000", "0010000000000000000000000", "0000000100000000010100000", "1010010000000100000001000", "0000000001001000000000000", "0001000000000000001000000", "0000000010000000000000010", "0000000010000000000000000", "0000000000010000000110010", "0000000000000010000000100", "0000010000010000010000000", "0000000000000000010000000", "0000000000001000000000000", "0000000100000000001000001", "0000000010000001010000000", "1000000000000000000000100" }
{4,3,13,22,22,14,22,9,1,22}
{22,10,18,20,15,4,9,7,20,6}
20
14
Returns: 0.33333333333333326
{ "0101100101000001000000110", "1010000010100000010000011", "0100011000000000000000000", "1000000000001000010001100", "1000000000000000000000001", "0010000000000000000100000", "0010000000000000000000101", "1000000000011000000000000", "0100000000000000000010001", "1000000000100010000010000", "0100000001000000000000000", "0000000100000100100000000", "0001000100000110010000010", "0000000000011010000000000", "0000000001001100000000000", "1000000000000000011000000", "0000000000010000000000000", "0101000000001001001100000", "0000000000000001010000000", "0000010000000000010000001", "0000000011000000000000000", "0001000000000000000000100", "1001001000000000000001000", "1100000000001000000000001", "0100101010000000000100010" }
{0,21,15,0,5,5,7,19,17,21}
{7,1,4,4,4,3,18,6,24,4}
10
5
Returns: 0.5
{ "0101010010010000110011000", "1010110111011011101110000", "0100111101110010110001000", "1000110101101000010101000", "0111000110110110111101100", "1111001000101100110000110", "0010010010001100001110011", "0111100011101001101011110", "1100101100100010011100010", "0111000100000110001011011", "0011110110001001111000011", "1110100000000100011100111", "0101011100100000001101000", "0000111001010000010110000", "0110100011000001110001010", "0100000100100010010010000", "1110110100100010000010001", "1011110010110111000101000", "0100101111111000000110000", "0101101010011100011011111", "1100001101000101101100100", "1011100101001010010100100", "0000110100010000000111001", "0000011111110010000100001", "0000001001110000100100110" }
{14,16,23,11,20,4,1,23,2,12}
{21,1,7,8,4,11,17,12,24,3}
5
17
Returns: 0.1428571428571428
{ "0101000100100111000000100", "1010011000000100101000010", "0100100100011000010001010", "1000101100010100111001011", "0011000000000101110100000", "0100001001000000101010001", "0101010010001111001001001", "1011000010101000100010111", "0000001101100101111011001", "0000010010100100000100101", "1000000111000000000100000", "0011000000000101111110100", "0010001100000001000001101", "1101101011010000010110000", "1000001000000001101000000", "1000101010011010010011100", "0101110110010010010100010", "0011100010010101100000010", "0101011010010010000100111", "0000100001110100101010111", "0000010110010101000100000", "0011001010001001000000000", "1000000101011001001100010", "0111000100000000111100100", "0001011111001000001100000" }
{10,17,0,7,9,8,4,1,20,14}
{7,2,12,12,6,0,23,8,2,16}
21
14
Returns: 0.25
{ "0110110011010111010111100", "1001101001001100010011001", "1001111011011110101011001", "0110011100011111110000111", "1110011110101110111011001", "1011100001001111100110111", "0111100101110001100111001", "0001101001110011111011110", "1010100000100110100110101", "1110011100010001010011010", "0000101110001010111101010", "1011001101000111101100101", "0111110000100010011011010", "1111110010010010001100110", "1011110110111101111100010", "1001011101010010101011011", "0011111110110011001100110", "1101100101101010001111111", "0010100100111111110101011", "1000011010110110111000101", "1110111111001001010001101", "1110101101101001011010011", "1001010110010100110110011", "0001010101101111111001101", "0111111010010001011111110" }
{10,0,7,15,19,10,8,17,11,16}
{4,8,2,23,9,12,23,21,16,4}
12
1
Returns: 0.0
{ "0110011100000001001010100", "1011101100100001000011001", "1100110011000000101101001", "0100000110001000010010010", "0110000000011010000110100", "1010000101000001010101100", "1100000110000001101010000", "1101011001110000011011001", "0011001001000011001101111", "0010010110000010100001000", "0100000100001001101000001", "0000100100001100110010110", "0001100000110100111110101", "0000000000011000010111000", "0000100011000000110011101", "1100011010100000001100010", "0010001001111010000001100", "0001010100011110001000010", "1010001110101001010010000", "0010110010001101000011001", "1101101100011110001101001", "0110010111000110100110000", "1000110010011010100000001", "0001000010010001010000000", "0110000110101010000110100" }
{22,20,1,0,10,10,3,7,20,8}
{10,15,24,2,5,15,7,8,14,4}
18
0
Returns: 0.19999999999999996
{ "0111110110010001001101110", "1010011000011100100010100", "1101101110111011001110100", "1010110110110000100101010", "1011001101000100000101001", "1101000010011110000110100", "0110100110001110001001101", "1011101011101001100010000", "1011011101111001000000001", "0000100110000010011001100", "0011000110000110000100001", "1111010010000001000100010", "0110011110000100100000010", "0100111000101000000001100", "0010011001100000101110100", "1010000110010000110000011", "0101000100001011000101001", "0000000001000001001100111", "1010001001000010010010010", "1011110000110010110001000", "0110010100000010001000001", "1001101001000100100100001", "1110011001000110010000000", "1001000000011001011000000", "0000101010100001110011000" }
{2,16,6,5,4,5,17,0,10,10}
{3,13,16,3,13,16,11,18,14,17}
1
5
Returns: 0.19999999999999996
{ "0110000010010100000100000", "1001010010001000100110001", "1000010100001001000001110", "0100100000000110100110100", "0001010110000000101001000", "0110101001100000000001000", "0000010101010010100000000", "0010101000010010000110010", "1100100000000010100001000", "0000011000000100110010010", "0000010000010110110000000", "1000001100100101110000110", "0110000000000100111000100", "1001000001111000010000010", "0001001110100000001100001", "0010000000010000000000000", "0101101011111000000010010", "0000000001111100000001001", "0000100000001010000000000", "1101000100000010000001000", "0101000101000000100000100", "0010110010000000010100010", "0011000000011000000010000", "0010000101010100100001000", "0100000000000010010000000" }
{15,22,18,10,20,5,8,21,17,21}
{9,2,0,1,10,9,4,1,21,14}
9
10
Returns: 1.0
{ "0110011111101001011110011", "1011100011101011100111100", "1101100101111011011010100", "0110111011010110100101111", "0111011001011010101111011", "1001101110101100101110011", "1001110011110111100111111", "1010010001111111000000111", "1101011001110001011111110", "1111101110110100101110011", "1110011111011011100010111", "0011101111100010101000110", "1110110100100110010101011", "0001011101001010101110100", "0111101100111101110010100", "1110001110100010101011100", "0101111001110111000011111", "1010000010001010001111010", "1010110011010101010111111", "1101111011001100011010101", "1110111011100111111100101", "0101101010001001111000111", "0111001110110111101111010", "1001111111111000111001100", "1001111101101000101111000" }
{10,17,19,11,2,21,21,0,21,10}
{8,0,7,5,15,7,19,8,6,2}
12
4
Returns: 0.20000000000000007
{ "0101100010000000000000000", "1010000000100100000000000", "0100011001000000100001010", "1000100000010000000000010", "1001000000001010000000000", "0010000100100000000000010", "0010000000000010001000100", "0000010000000101000000001", "1000000000000000010001000", "0010000000010000000000000", "0100010000000000001000000", "0001000001000000000010000", "0000100000000000001001101", "0100000100000000001000000", "0000101000000000000000000", "0000000100000000000100010", "0010000000000000000000100", "0000000010000000000000000", "0000001000101100000000001", "0000000000000001000000000", "0000000000010000000001010", "0010000010001000000010001", "0000001000001000100000000", "0011010000000001000010001", "0000000100001000001001010" }
{20,16,18,13,12,18,21,23,24,14}
{23,0,14,14,17,7,8,17,22,1}
0
3
Returns: 0.25
{ "0101101100001000001100001", "1010010110010010110100110", "0100011011000001100111110", "1000100111111010010111001", "1001011010110110110110011", "0110101101000100110101100", "1010110010101010101111101", "1101010001000010011000001", "0111101001001010011010001", "0011010110001101001001010", "0001101000001010101101110", "0101100000001101011111010", "1001001011110111110111010", "0000110001011011100011011", "0101101110101101010000001", "0010000001011110111000010", "0110111000101101011101101", "0101110110011011101100011", "1000001111110001110111101", "1111111000111000111000110", "0011101010011100001000000", "0011011001111100101000011", "0110011000100000101100001", "0110100001111101010101001", "1001101110000110111001110" }
{12,23,21,11,9,14,7,0,7,11}
{13,4,20,20,14,10,13,16,3,14}
2
13
Returns: 1.0
{ "0100001111010110011001000", "1010101100000010000100011", "0101010000100000100001000", "0010100010100110001000101", "0101000001101110000100100", "0010000010000010110100100", "1100000000000101101110011", "1100000000100001111010011", "1001010001111110000000110", "1000100010001001010001011", "0011100110000001100010000", "1000000010001010101100000", "0000100011010010101011101", "1001101010000001010000000", "1101110010011000011000110", "0000001101100100000001000", "0010011100111000001100011", "1000010101000110000010100", "1001001100011010100000111", "0100111000010000100000011", "0000001100101000010001000", "1010000001001001000010100", "0001110010001010011001000", "0100001111000010101100000", "0101001101001000101100000" }
{3,6,1,3,19,22,11,4,8,6}
{13,1,3,16,5,5,16,15,23,13}
23
12
Returns: 0.25
{ "0101100010110000101101100", "1010011011100011101101000", "0101010100100011010001010", "1010000100101000010011010", "1000010101111110001110100", "0110101010000100000101100", "0100010100100110101000010", "0011101001000000000010000", "1100010000110100000111011", "0100100100110001100111101", "1111101011000100000100110", "1000100011000000011000010", "0001100000000010010111001", "0000111010100011101100000", "0110101000001101101110110", "0110000001000110111010000", "1100001001000111000000100", "0011000000011001000010010", "1100101000010111000100001", "1100110011101110001000010", "0001100111001011010000100", "1111010011001000000000000", "1000110001100010100010000", "0011001010110010010100000", "0000000011001000001000000" }
{16,6,10,21,13,0,21,10,19,1}
{11,19,8,4,18,12,7,5,10,6}
4
19
Returns: 0.34375
{ "0111000100110111110000111", "1011110001100010111001000", "1101000010011100110110100", "1110111101101011111101110", "0101001110101111010011011", "0101000011110101001010000", "0001100110110101001100001", "1001101011101110110110111", "0010111101110011011100010", "0101010110110010011101001", "1101111111010111000101110", "1010011011100010011001111", "0011100100000011111001101", "1010111100100011010110001", "1101100111111101011011010", "1001111010101110101011101", "1111000100001001010111001", "1111100111011110100110111", "0101011011011011000111011", "0011001111100100111000101", "0010110100000111111000110", "0101100001111011101000100", "1011000100111001010111000", "1001100110110010011010001", "1000101101011101111100010" }
{16,2,8,19,16,3,24,2,23,13}
{17,15,18,24,17,6,2,23,11,14}
7
22
Returns: 0.125
{ "0111111111001100001111010", "1010111011110110111000010", "1101111111010101000111100", "1010111010001000111101000", "1111001101010111011101001", "1111000110100110100001010", "1111100111110011010001100", "1010111011110111111011111", "1111011100010010001010001", "1110101100110010111111101", "0100011101001001011111001", "0110101111001011101110001", "1001000000110010000111100", "1110110100000001101111101", "0100111111011000001101110", "0010101100110100111111000", "0101010101010101000011011", "0101101101100001000111001", "1101100111110111000111001", "1011100001111111011010100", "1010000111111101111100001", "1011111101101111111000110", "0010001101001110000101001", "1100010100000010100001000", "0000100111110100111010100" }
{0,8,12,3,15,22,2,15,11,24}
{15,0,7,5,3,23,19,12,8,8}
4
13
Returns: 0.11111111111111116
{ "0110000111101001110000101", "1011111111011000101101011", "1100001000110010100111011", "0100101101100110000110111", "0101011011001001001110101", "0100101101000110110111100", "0111110000011010110110110", "1101010010010101011011001", "1100100101110101110110010", "1101110010101110001111011", "1011000011011110101111100", "0110001110101000101000110", "1100101001110110110111111", "0001010111101011011100111", "0011011001101100011101001", "1000100110000100101111101", "1110011010111001011000001", "1000011110001110100000101", "0100100101110111100010010", "0111111011101111000011111", "0011111111101001001100011", "0110010101101011000100110", "1001111000111101010101000", "0111001011011100001111001", "1111100101001111110110010" }
{22,5,12,17,16,15,2,9,9,13}
{23,16,18,15,7,18,15,4,17,9}
3
10
Returns: 0.09999999999999998
{ "0100000000", "1010100100", "0101001010", "0010010101", "0100001000", "0001000010", "0010100100", "0101001010", "0010010100", "0001000000" }
{4,9}
{5,1}
0
9
Returns: 0.9375
{ "0001110000000000000000001", "0001110000000000000000001", "0001110000000000000000001", "1110001110000000000000000", "1110001110000000000000000", "1110001110000000000000000", "0001110001110000000000000", "0001110001110000000000000", "0001110001110000000000000", "0000001110001110000000000", "0000001110001110000000000", "0000001110001110000000000", "0000000001110001110000000", "0000000001110001110000000", "0000000001110001110000000", "0000000000001110001110000", "0000000000001110001110000", "0000000000001110001110000", "0000000000000001110001100", "0000000000000001110001100", "0000000000000001110001100", "0000000000000000001110010", "0000000000000000001110010", "0000000000000000000001100", "1110000000000000000000000" }
{24,24,24,24,24,24,24,24,24,24}
{23,23,23,23,23,23,23,23,23,23}
23
24
Returns: 0.6920538523425614
{"0110","1000","1001","0010"}
{3}
{2}
1
3
Returns: 1.0
{"0101", "1010", "0101", "1010"}
{1}
{0}
0
1
Returns: 1.0
0 -- 1 | | | | 3----2 The longer path (0 -> 3 -> 2 -> 1) is absolutely safe, but you must take the shortest one (0 --> 1).
{"011", "101", "110"}
{0}
{1}
2
1
Returns: 1.0
You are caught at the moment you enter room 1.
{"00111000000000", "00001000000000", "10000100000000", "10000100000000", "11000010000000", "00110001000000", "00001000111000", "00000100000100", "00000010000010", "00000010000010", "00000010000010", "00000001000001", "00000000111001", "00000000000110" }
{0, 0 }
{13, 13 }
1
12
Returns: 0.84
{"0011000000", "0010000000", "1100110000", "1000001000", "0010000100", "0010000010", "0001000010", "0000100001", "0000011001", "0000000110" }
{0 }
{9 }
1
8
Returns: 1.0
{"0110000000001", "1001000000110", "1001000000000", "0110110000000", "0001001001100", "0001001000000", "0000110110000", "0000001000000", "0000001001000", "0000100010000", "0100100000000", "0100000000001", "1000000000010" }
{1, 8 }
{4, 12 }
7
0
Returns: 0.9230769230769231
{"01000000", "10101000", "01010001", "00100000", "01000100", "00001010", "00000101", "00100010" }
{4 }
{7 }
0
3
Returns: 0.5