Hackearth's Data Structures solutions( SnackDown Contest, Mark The Answer, Most Frequent ) :
Problem 16: SnackDown Contest               Solution: (in c++) ( please guys before moving to the solution try it yourself at least 3-4 times , if you really wanna become a good coder)  #include< bits/stdc++.h > using  namespace  std ; int  main () {      long  long  t ;     cin >> t ;      while ( t --)      {          long  long  n , p , q , i ;         cin >> n ;         cin >> p ;         vector < long  long > v1 ( p , 0 );          for ( i = 0 ; i < p ; i ++)          {             cin >> v1 [ i ];          }   ...