Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <cmath>
- using namespace std;
- int main()
- {
- int n; // broj na redici
- int m; // broj na koloni
- cin >> n >> m;
- int mat[n][m];
- for(int i = 0; i < n; i++) { // izmini gi site redici
- for(int j = 0; j < m; j++) { // izmini gi site koloni
- cin >> mat[i][j];
- }
- }
- for(int j = 0; j < m; j++) {
- int najmal = 2e9;
- for(int i = 0; i < n; i++) {
- if(mat[i][j] < najmal) {
- najmal = mat[i][j];
- }
- }
- cout << najmal << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement