Hackerrank -- C++ - Variable Sized Array Solution
#include < cmath > #include < cstdio > #include < vector > #include < iostream > #include < algorithm > using namespace std ; int main () { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n , q ; cin >> n >> q ; int ** arr = new int *[ n ]; for ( int i = 0 , k ; i < n ; ++ i ) { cin >> k ; ...