225. Little Knights
time limit per test: 1
memory limit per test: 65536
Oh no, here it comes again
Can't remember when we came so close to love before
Hold on, good things never last
Nothing's in the past, it always seems to come again
Again and again and again
Bloodied angels fast descending
Moving on a never-bending light
Phantom figures free forever
Out of shadows, shining ever-bright
Black Sabbath, "Neon Knights"
The knight is the piece in the game of chess. The knight moves the following way: first he moves 2 squares in horizontal or vertical direction and then 1 square in the perpendicular direction. Figures on the way of knight do not interfere with its movement. Two knights are in the attacking position if they can move to each other's cells.
The input file contains two integers n (1 ≤ n ≤ 10) and k (0 ≤ k ≤ n2).
Print a line containing the total number of ways one can put k knights on a chessboard of size n × n so that no two of them are in the attacking positions.
|Resource:||Little Chess Pieces Series, SPb IFMO 2003-2004 Authumn Training Sessions
|Server time: 2017-09-22 15:48:29||Online Contester Team © 2002 - 2016. All rights reserved.|