Problem

Source: 2018 Iran national olympiad third round combinatorics exam

Tags: combinatorics



Find the smallest positive integer $n$ such that we can write numbers $1,2,\dots ,n$ in a 18*18 board such that: i)each number appears at least once ii)In each row or column,there are no two numbers having difference 0 or 1