variable sized arrays hackerrank code example
Example: variable sized arrays hackerrank
int n,q;
cin >> n >> q;
vector< vector > a(n);
// input each array
for (int i=0;i> k;
for (int j=0;j> data;
a[i].push_back(data);
}
}
// do the queries
for (int i=0;i> x >> y;
cout << a[x][y] << endl;
}