Assumptions : vector a is sorted , max - difference of two adjacent elements is 1
static Point sequence ( List < int > a ) { if ( a . Count == 0 ) return new Point ( 0 , 0 ) ; int s = 0 ; int e = a . Count - 1 ; while ( s < e ) { int m = ( s + e ) / 2 ;