Diferente pentru problema/cntnk intre reviziile #2 si #1

Nu exista diferente intre titluri.

Diferente intre continut:

== include(page="template/taskheader" task_id="cntnk") ==
Bemfa has a new drawing board, which is split into $N$ rows, each row contains $N$ cells. He has $K$ different colors and now he is wondering in how many ways can he color the given board in such a way that each cell is colored with exactly one color and no two neighboring cells have the same color.
 
Two cells are considered to be neighbors if they share one side.
 
Help Bemfa count how many ways mod $10^9 + 7$ are there to color the board given the above mentioned constraints.
Poveste şi cerinţă...
h2. Date de intrare
The first line of the input file $cntnk.in$ contains two integers, $N$ and $K$.
Fişierul de intrare $cntnk.in$ ...
h2. Date de ieşire
The output file $cntnk.out$ will contain a single integer, representing the answer to the given test case.
În fişierul de ieşire $cntnk.out$ ...
h2. Restricţii
* $1 ≤ N ≤ 8$
* $2 ≤ K ≤ 5$
* $... ≤ ... ≤ ...$
h2. Exemplu
table(example). |_. cntnk.in |_. cntnk.out |
| 3 4
| 9612
| This is some
  text written on
  multiple lines.
| This is another
  text written on
  multiple lines.
|
h3. Explicaţie
 
...
 
== include(page="template/taskfooter" task_id="cntnk") ==

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.