1426 - 電機系 (資電館R406, R407) DS 上機考 Scoreboard

Time

2018/04/02 18:30:00 2018/04/02 20:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
11863 電機系 (資電館R406, R407) 上機考

11863 - 電機系 (資電館R406, R407) 上機考   

Description

Determine whether a matrix contains at least one sequence that each preceding number is NOT a factor of its immediately successive number from the top-left corner to the bottom-right corner.  Print Yes or No.
  • Examples that a preceding number is a factor of its immediately successive number
  • Examples that a preceding number is NOT a factor of its immediately successive number
  • An exampling matrix that contains at least a valid sequence:

Hints:

  • No need to print out the sequence.
  • Each number can be reached by up to four directions.
  • Matrices are consisted of 1~9.
  • Matrix width and height < 100.
  • The answers are the same no matter cycles are allowed or not in the sequences.
  • Avoid your program from running into an endless cycle.

Input

Output

  • Repeat all inputs.
  • Additionally print Yes or No after each matrix.

Sample Input  Download

Sample Output  Download

Tags




Discuss