Advertisement
anon20016

4

Dec 12th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <vector>
  3. #include <iostream>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. int n, m;
  11. cin >> n >> m;
  12. int a[100][100];
  13. for (int i = 0; i < n; i++) {
  14. for (int j = 0; j < m; j++) {
  15. cin >> a[i][j];
  16. }
  17. }
  18. int mn = a[0][0];
  19. int mn_i = 0;
  20. int mn_j = 0;
  21. for (int i = 0; i < n; i++) {
  22. for (int j = 0; j < m; j++) {
  23. if (a[i][j] < mn) {
  24. a[i][j] = mn;
  25. mn_i = i;
  26. mn_j = j;
  27. }
  28. }
  29. }
  30. cout << mn_i + 1<< ' ' << mn_j + 1;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement