Yet another guinea pig
Source: 2021 Taiwan TST Round 1 Mock Day 1 P1
July 22, 2021
combinatoricsTaiwan
Problem Statement
There are guinea pigs for each of the species, arranging as a array. Find the maximum integer such that, no matter how the guinea pigs align, we can always find a column or a row of guinea pigs containing at least different species.