This should work:
x = torch.tensor([[1, 2], [4, 1], [3, 1], [0, 1]])
res = (x[:, 0] > x[:, 1]).long()

x = torch.tensor([[22, 11], [90,80], [15, 19], [6, 8]])
res = (x[:, 0] > x[:, 1]).long()

The second output should probably be [1, 1, 0, 0]?