Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. //6-6-13
  2. #include <iostream>
  3. #include <cmath>
  4. #include <iomanip>
  5. #include <clocale>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11. setlocale(LC_ALL, "ru");
  12. int n, min=1e10,nmini,nminj;
  13. cin >> n ;
  14. int** arr1 = new int* [n];
  15. int* arr2 = new int[n];
  16. for (int i = 0; i < n; i++)
  17. arr1[i] = new int[n];
  18. for (int i = 0; i < n; i++)
  19. for (int j = 0; j < n; j++)
  20. {
  21. cin >> arr1[i][j];
  22. if (arr1[i][j] < min)
  23. {
  24. min = arr1[i][j];
  25. nmini = i;
  26. nminj = j;
  27.  
  28. }
  29. }
  30.  
  31. for (int i = 0; i < n; i++)
  32. for (int j = nminj; j < n - 1; j++)
  33. arr1[i][j] = arr1[i][j + 1];
  34.  
  35. for (int i = nmini; i < n - 1; i++)
  36. arr1[i] = arr1[i + 1];
  37. n--;
  38.  
  39. for (int i = 0; i < n; i++)
  40. {
  41. for (int j = 0; j < n; j++)
  42. cout << arr1[i][j] << " ";
  43. cout << endl;
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement