#include <iostream>
int main( )
{
int ** x; //You should probably invest in a better name :P
int lines;
int numbers;
std:: cout << "How many lines of numbers? " ;
std:: cin >> lines;
x = new int * [ lines] ;
for ( int i = 0 ; i < lines; ++ i )
{
std:: cout << "How many numbers is this line? " ;
std:: cin >> numbers;
x[ i] = new int [ numbers] ;
std:: cout << "Please enter the numbers separated by spaces: " ;
for ( int j = 0 ; j < numbers; ++ j )
{
std:: cin >> x[ i] [ j] ;
}
}
std:: cout << std:: endl << x[ 1 ] [ 0 ] << std:: endl ;
//
for ( int i = 0 ; i < lines; ++ i )
delete [ ] x[ i] ;
delete [ ] x;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oKQp7CglpbnQgKip4OyAvL1lvdSBzaG91bGQgcHJvYmFibHkgaW52ZXN0IGluIGEgYmV0dGVyIG5hbWUgOlAKCWludCBsaW5lczsKCWludCBudW1iZXJzOwoKCXN0ZDo6Y291dCA8PCAiSG93IG1hbnkgbGluZXMgb2YgbnVtYmVycz8gIjsKCXN0ZDo6Y2luID4+IGxpbmVzOwoKCXggPSBuZXcgaW50ICpbbGluZXNdOwoKCWZvciggaW50IGkgPSAwOyBpIDwgbGluZXM7ICsraSApCgl7CiAgICAJc3RkOjpjb3V0IDw8ICJIb3cgbWFueSBudW1iZXJzIGlzIHRoaXMgbGluZT8gIjsKICAgIAlzdGQ6OmNpbiA+PiBudW1iZXJzOwogICAgCXhbaV0gPSBuZXcgaW50W251bWJlcnNdOwogICAgCXN0ZDo6Y291dCA8PCAiUGxlYXNlIGVudGVyIHRoZSBudW1iZXJzIHNlcGFyYXRlZCBieSBzcGFjZXM6ICI7CiAgICAJZm9yKCBpbnQgaiA9IDA7IGogPCBudW1iZXJzOyArK2ogKQogICAgCXsKICAgICAgCXN0ZDo6Y2luID4+IHhbaV1bal07CiAgICAJfQoJfQoJCglzdGQ6OmNvdXQgPDwgc3RkOjplbmRsIDw8ICB4WzFdWzBdIDw8IHN0ZDo6ZW5kbDsKCS8vCglmb3IoIGludCBpID0gMDsgaSA8IGxpbmVzOyArK2kgKQogICAgCWRlbGV0ZVtdIHhbaV07CgoJZGVsZXRlW10geDsKfQ==