а)
#include
#include
using namespace std;
bool is_any_nulls(vector vec){
for(int i: vec)
if(i == 0)
return true;
return false;
}
signed main() {
int n,m;
cin >> n >> m;
vector> a(n);
for(int i = 0; i < n; i++){
vector temp(m);
for(int &j: temp)
cin >> j;
a[i] = temp;
}
int cnt = 0;
for(vector i: a)
if(!is_any_nulls(i))
cnt++;
cout << cnt;</p>
}
б)
#include
#include
#include
using namespace std;
signed main() {
int n, m;
cin >> n >> m;
map mp;
vector> a(n);
for (int i = 0; i < n; i++) {
vector temp(m);
for (int &j: temp){
cin >> j;
mp[j]++;
}
a[i] = temp;
}
int mx = -INT_MAX;
for(auto i: mp)
if(i.first > mx && i.second > 1)
mx = i.first;
cout << mx; </strong>
}