Savior-of-Cross's blog

By Savior-of-Cross, history, 10 months ago, In English

Contest Link

How to solve A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, and Q?

(I'm only curious about N and O, but I might as well ask them all in case others are curious about other problems)

  • Vote: I like it
  • +9
  • Vote: I do not like it

»
10 months ago, # |
  Vote: I like it +8 Vote: I do not like it

In O: let's assume M_i,i = 1, and a_i = M_i, i+1. then the terms on the kth diagonal are (a_i ... a_i+k) / k!

Knowing this, if we look at a specific prime power p, the condition for M_xy is equivalent to a condition on the total number of times p divides a_x..a_y. We can solve it using negative-weight shortest-path finding in a graph.