[][src]Function contest_algorithms::range_query::static_arq::first_negative

pub fn first_negative(arq: &mut StaticArq<AssignMin>) -> Option<usize>

An example of binary search to find the first position whose element is negative. In this case, we use RMQ to locate the leftmost negative element. To ensure the existence of a valid root note (i == 1) from which to descend, the tree's size must be a power of two.