Function to return the chosen indices
static List < int > solve ( int X , List < int > A ) { int min = int . MaxValue ; int ind = - 1 ; for ( int i = 0 ; i < A . Count ; i ++ ) { if ( A [ i ] < min ) { min = A [ i ] ; ind = i ; } }