#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();
class Program
{
static void Main()
{
for(var x=-2;x<=2;x++){
for(var y=-2;y<=2;y++){
IsPointOnAxis(x, y);
}
}
Console.ReadKey();
}
static void IsPointOnAxis(int x, int y){
Console.WriteLine("Point = {0}; {1}", x, y);
if (x*y != 0){
Console.WriteLine("Point not on axis");
return;
}
if (x == 0){
Console.WriteLine("Point is on axis Ox");
}else if (y == 0){
Console.WriteLine("Point is on axis Oy");
}
}
}
#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();
}