#include <iostream>
#include <vector>
using namespace std;
void solve(){
int m,n;
cin >> m >> n;
vector<vector<int>> a(m,vector<int>(n));
vector<bool> b(m, true);
for(int i = 0; i < m; i++)
for(int j = 0; j < n; j++)
cin >> a[i][j];
for(int j = 1; j < n; j++)
if(a[i][j] <= a[i][j-1])
b[i] = false;
for(auto i : b) cout << i << " ";
}
signed main(){
solve();
import random
while True:
a = random.randint(1, 9)
b = random.randint(1, 9)
i = 0
try:
print("%dx%d=" % (a, b), end="")
i = int(input())
except ValueError:
print("Введите число!")
else:
break
rightAnswer = a * b
if i == rightAnswer:
print("Верно!\n")
print("Неверно! Верный ответ: %d\n" % rightAnswer)
#include <iostream>
#include <vector>
using namespace std;
void solve(){
int m,n;
cin >> m >> n;
vector<vector<int>> a(m,vector<int>(n));
vector<bool> b(m, true);
for(int i = 0; i < m; i++)
for(int j = 0; j < n; j++)
cin >> a[i][j];
for(int i = 0; i < m; i++)
for(int j = 1; j < n; j++)
if(a[i][j] <= a[i][j-1])
b[i] = false;
for(auto i : b) cout << i << " ";
}
signed main(){
solve();
}
import random
while True:
a = random.randint(1, 9)
b = random.randint(1, 9)
i = 0
while True:
try:
print("%dx%d=" % (a, b), end="")
i = int(input())
except ValueError:
print("Введите число!")
else:
break
rightAnswer = a * b
if i == rightAnswer:
print("Верно!\n")
else:
print("Неверно! Верный ответ: %d\n" % rightAnswer)