Блог пользователя Hd7

Автор Hd7, история, 5 лет назад, По-английски

I have read editorial all day but i can't figure out how it works. Could you give me a understandable explanation for this problem. Thanks in advance.
The problem link: https://csacademy.com/contest/archive/task/binary-flips/statement/
The Editorial link: https://csacademy.com/contest/archive/task/binary-flips/solution/
For me, i read editorial and think:
D(N,K,P) is the number of ways flips K times to construct a matrix with P columns all 1.
and when we discover $$$i\ col (all 1) * N + j\ row (all 1) * M - 2ij$$$ equals to S, we add D(N,K,i)* D(M,K,j) but i am pretty confused that: What guarantee K operations that construct i col 1 also construct j row 1. What wrong with my understand?

Теги #dp
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится