C# Class Round3_2013.Problem4.WheelLargeSlow

显示文件 Open project: eric7237cire/CodeJam Class Usage Examples

Public Methods

Method Description
E ( int i, int j ) : System.Double
E ( int i, int j, int k ) : System.Double

The expected money we get while filling out the interval [i, j) so that the last filled gondola is at position (i+k). This means that the value for filling j is not counted

P ( int i, int j ) : System.Double

the probability that gondola j will stay empty as interval [i, j) fills up assuming only positions between [i, j] are chosen

P ( int i, int j, int k ) : System.Double

The probability that gondola j stays empty while we fill interval [i, j) and that gondola at position (i+k) is filled last is P(i, j, k) and can be computed as

WheelLargeSlow ( bool gond ) : CodeJamUtils
computeAnswer ( bool gondalas ) : System.Double

Private Methods

Method Description
GetHoleCount ( int i, int j, int &ijLength ) : int

Method Details

E() public method

public E ( int i, int j ) : System.Double
i int
j int
return System.Double

E() public method

The expected money we get while filling out the interval [i, j) so that the last filled gondola is at position (i+k). This means that the value for filling j is not counted
public E ( int i, int j, int k ) : System.Double
i int
j int
k int
return System.Double

P() public method

the probability that gondola j will stay empty as interval [i, j) fills up assuming only positions between [i, j] are chosen
public P ( int i, int j ) : System.Double
i int
j int
return System.Double

P() public method

The probability that gondola j stays empty while we fill interval [i, j) and that gondola at position (i+k) is filled last is P(i, j, k) and can be computed as
public P ( int i, int j, int k ) : System.Double
i int
j int
k int
return System.Double

WheelLargeSlow() public method

public WheelLargeSlow ( bool gond ) : CodeJamUtils
gond bool
return CodeJamUtils

computeAnswer() public static method

public static computeAnswer ( bool gondalas ) : System.Double
gondalas bool
return System.Double