A table consists of \(n \times n\) little squares. Ilmārs and Kims play the following
game. They make alternating moves: in every move a player enters either
\(1\) or \(-1\) in some little square that was empty so far.
Ilmārs makes the first move. If a row or a column is completely filled in
after some player's move, we calculate the product of the numbers in the row or column.
If the product equals \(-1\) then the player who completed that row/column gets \(1\) point.
(If a player completed a row and a column at the same time,
and both products were \(-1\), then he scores two points).
The game ends when all squares in the table are filled in.
The player who gets more points wins. Which player has a winning strategy, if
(A) \(n = 2021\); (B) \(n = 2022\)?
Dota rūtiņu tabula \(n \times n\). Ilmārs un Kims spēlē šādu spēli.
Viņi pēc kārtas kādā vēl tukšā rūtiņā ieraksta skaitli \(1\)
vai \(-1\). Spēli sāk Ilmārs. Ja pēc kāda spēlētāja gājiena tiek
aizpildīta kāda rinda vai kolonna, tad tiek aprēķināts
tajā esošo skaitļu reizinājums. Ja tas ir vienāds ar \(-1\), tad spēlētājs,
kurš veica pēdējo gājienu, iegūst \(1\) punktu
(ja spēlētājs ar savu gājienu vienlaicīgi pabeidz gan rindu, gan kolonnu
un katrā skaitļu reizinājums ir \(-1\), tad
viņš iegūst divus punktus). Spēle beidzas, kad tabula ir pilnībā aizpildīta. Uzvar spēlētājs, kurš iegūst visvairāk
punktu. Kuram spēlētājam ir uzvaroša stratēģija, ja (A) \(n = 2021\); (B) \(n = 2022\)?