Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //6-6-13
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- #include <clocale>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "ru");
- int n, min=1e10,nmini,nminj;
- cin >> n ;
- int** arr1 = new int* [n];
- int* arr2 = new int[n];
- for (int i = 0; i < n; i++)
- arr1[i] = new int[n];
- for (int i = 0; i < n; i++)
- for (int j = 0; j < n; j++)
- {
- cin >> arr1[i][j];
- if (arr1[i][j] < min)
- {
- min = arr1[i][j];
- nmini = i;
- nminj = j;
- }
- }
- for (int i = 0; i < n; i++)
- for (int j = nminj; j < n - 1; j++)
- arr1[i][j] = arr1[i][j + 1];
- for (int i = nmini; i < n - 1; i++)
- arr1[i] = arr1[i + 1];
- n--;
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < n; j++)
- cout << arr1[i][j] << " ";
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement