Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

How to solve this problem optimally?

Правка en1, от logrt, 2021-08-14 05:56:08

This was a problem from codeagon 2020. ~~~~~ Given a grid A of size N*M, 2 players are playing a game on it taking alternate turns.

In each turn, a player chooses a subset of elements from any row and replaces each one of them with their proper divisor.

A proper divisor of a number N is any divisor of N, not equal to N.

The player who is unable to move, loses. Determine the winner of the game.

Problem Constraints: 1<=N, M<=10^3 1<=A[i][j]<=10^6 ~~~~~

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский logrt 2021-08-14 06:01:33 86
en1 Английский logrt 2021-08-14 05:56:08 515 Initial revision (published)