There is a table with $n > 2$ cells in the first row, $n-1$ cells in the second row is a cell, $n-2$ in the third row, $\ldots$, $1$ cell in the $n$-th row. The cells are arranged as shown below. In each cell of the top row Petryk writes a number from $1$ to $n$, so that each number is written exactly once. For each other cell, if the cells directly above it contains numbers $a, b$, it contains number $|a-b|$. What is the largest number that can be written in a single cell of the bottom row? Proposed by Bogdan Rublov
Problem
Source: Ukrainian Mathematical Olympiad 2024. Day 1, Problem 8.2
Tags: combinatorics, construction, absolute value