Question 4
Let $n\gt 1$ be an integer. An $n\times n$ board $ABCD$ consists of unit squares colored black, white or gray. A coloring is symmetric if the squares whose centers lie on diagonal $AC$ are gray, and each pair reflected across $AC$ is either both black or both white. Put 0 in each gray square, a positive integer in each white square and a negative integer in each black square. For a positive integer $k$, a filling is called k-balanced if:
i) Each reflected pair has the same integer, belonging to $[-k,k]$.
ii) If a row and column intersect in a black square, their sets of positive entries are disjoint; if they intersect in a white square, their sets of negative entries are disjoint.
a) For $n=5$, find the least $k$ permitting a k-balanced filling of the pictured coloring.
b) For $n=2017$, find the least $k$ that works for every symmetric coloring.
i) Each reflected pair has the same integer, belonging to $[-k,k]$.
ii) If a row and column intersect in a black square, their sets of positive entries are disjoint; if they intersect in a white square, their sets of negative entries are disjoint.
a) For $n=5$, find the least $k$ permitting a k-balanced filling of the pictured coloring.

b) For $n=2017$, find the least $k$ that works for every symmetric coloring.