Input
int [ ] arr = { 12 , 11 , 16 , 2 , 32 } ; List < List < int > > Q = new List < List < int > > ( ) ; Q . Add ( new List < int > ( new int [ ] { 1 , 0 , 2 } ) ) ; Q . Add ( new List < int > ( new int [ ] { 2 , 4 , 24 } ) ) ; Q . Add ( new List < int > ( new int [ ] { 1 , 1 , 4 } ) ) ; int N = arr . Length ;