#include <iostream>
#include <vector>
int main()
{
std::cout << "Enter size of the array.\n> ";
std::size_t dim;
std::cin >> dim;
std::vector<std::vector<double>> matrix(dim, std::vector<double>(dim));
std::cout << "Enter the elements of the array.\n> ";
for (std::size_t row = 0; row < dim; ++row)
for (std::size_t col = 0; col < dim; ++col)
std::cin >> matrix[row][col];
std::cout << "The elements we're concerned with:\n";
for (std::size_t row = 0; row < dim; ++row) {
for (std::size_t col = 0; col < row; ++col)
std::cout << matrix[row][col] << ' ';
std::cout << '\n';
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgoKaW50IG1haW4oKQp7CiAgICBzdGQ6OmNvdXQgPDwgIkVudGVyIHNpemUgb2YgdGhlIGFycmF5LlxuPiAiOwoKICAgIHN0ZDo6c2l6ZV90IGRpbTsKICAgIHN0ZDo6Y2luID4+IGRpbTsKCiAgICBzdGQ6OnZlY3RvcjxzdGQ6OnZlY3Rvcjxkb3VibGU+PiBtYXRyaXgoZGltLCBzdGQ6OnZlY3Rvcjxkb3VibGU+KGRpbSkpOwoKICAgIHN0ZDo6Y291dCA8PCAiRW50ZXIgdGhlIGVsZW1lbnRzIG9mIHRoZSBhcnJheS5cbj4gIjsKICAgIGZvciAoc3RkOjpzaXplX3Qgcm93ID0gMDsgcm93IDwgZGltOyArK3JvdykKICAgICAgICBmb3IgKHN0ZDo6c2l6ZV90IGNvbCA9IDA7IGNvbCA8IGRpbTsgKytjb2wpCiAgICAgICAgICAgIHN0ZDo6Y2luID4+IG1hdHJpeFtyb3ddW2NvbF07CgogICAgc3RkOjpjb3V0IDw8ICJUaGUgZWxlbWVudHMgd2UncmUgY29uY2VybmVkIHdpdGg6XG4iOwoKICAgIGZvciAoc3RkOjpzaXplX3Qgcm93ID0gMDsgcm93IDwgZGltOyArK3JvdykgewogICAgICAgIGZvciAoc3RkOjpzaXplX3QgY29sID0gMDsgY29sIDwgcm93OyArK2NvbCkKICAgICAgICAgICAgc3RkOjpjb3V0IDw8IG1hdHJpeFtyb3ddW2NvbF0gPDwgJyAnOwogICAgICAgIHN0ZDo6Y291dCA8PCAnXG4nOwogICAgfQp9