Binary Chess (binarychess)

9 teams scored 745 points on this task, for a maximum score of 100, an average score of 83 and a median score of 100.

Highlights

  1. G.B. Pininfarina, Moncalieri is the institute with the most points (100).
  2. Lombardia is the region with the most points (300).

Statement

There is a chess board of R rows and C columns. There are N cells that are occupied by chess pieces, and all other cells are empty. You don't know what exact pieces occupy them, but you know that each piece is either a rook or a bishop. You also know that no rook attacks a bishop, and no bishop attacks a rook. How many valid arrangements of pieces exist? Since this number might be too big, output it modulo 10^9 + 7. Two arrangements are considered different if there is at least one cell which is occupied by a different piece.