#include <iostream>
#include <fstream>
using namespace std;
int main() {
const int n = 5;
int a[n][n];
ifstream fin("text.txt"); // открыли файл для чтения
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
{
fin >> a[i][j];
cout << a[i][j] << " ";
}
cout << endl;
}
cin.get();
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8ZnN0cmVhbT4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJY29uc3QgaW50IG4gPSA1OwoKCWludCBhW25dW25dOwoKCWlmc3RyZWFtIGZpbigidGV4dC50eHQiKTsgLy8g0L7RgtC60YDRi9C70Lgg0YTQsNC50Lsg0LTQu9GPINGH0YLQtdC90LjRjwoJZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspIHsKCQlmb3IgKGludCBqID0gMDsgaiA8IG47IGorKykKCQl7CgkJCWZpbiA+PiBhW2ldW2pdOwoJCQljb3V0IDw8IGFbaV1bal0gPDwgIiAiOwoKCQl9CgkJY291dCA8PCBlbmRsOwoJfQoJY2luLmdldCgpOwp9