// Source: https://usaco.guide/general/io
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n, k; cin >> n >> k;
vector<vector<ll>> r(n, vector<ll>(k, 0)), u(n, vector<ll>(k, 0));
for (ll i{}; i < n; i++){
for (ll j{}; j < k; j++){
cin >> r[i][j];
}
}
for (ll i{}; i < n; i++){
for (ll j{}; j < k; j++){
cin >> u[i][j];
}
}
ll ans = 0;
for (ll i{}; i < k; i++){
if (r[0][i] <= 0) ans++;
}
if (ans == k) cout << 1;
else cout << 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |