[shkola] basi!

Prochetoh takmo postovete za taia zadacha ... basi uzasa. Znaete li kak
se reshava, ... daskata se rotira na 45* i se priema sluceia za
topove. Ottuk natatak moiata ideia vliza che triabva da vzemesh samo
tezi ot edin cviat ... ostanalite poleta gi eliminirash i sega veche tuk
si pravish ... abe eto vi napravo posting-a , mozete da go namerite v
acm-a 
You extract from the rotated board all Fields of one colour. For n=4 you
have: 

Code:

  . 
 ... 
 ... 
  .


Let this figure be B. 
You add to this figure points to make a rectangle, the added points are
A. 
In this example you have a 4x3 rectangle. Imagine you have placed k-r
rooks on points in A and r rooks on points in B and they are in
nonattacking positions. Let A_k-rB_r be the number of possibilites to
place the rooks in this way. If you want to add another rook, you have
(n-k)*(m-k) possibilities. If you placed the rook in figure A, you have
(k-r+1) identical placements, if you placed it in figure B, there are
(r+1). So you have the equation: 
(n-k)*(m-k)*A_k-rB_r = (k-r+1)*A_k-r+1B_r+(r+1)*A_k-rB_r+1 
If you know all A_kB_0 and A_0B_1, you can calculate all A_0B_k. 
With this equation you can solve the problem, but it is a bit difficult,
I needed several hours.

Razbi ma!

Other related posts: