electicode
АсосӣКурсҳоМанбаъҳоМасъалаҳоОлимпиадаи миллӣМусобиқаҳоҶадвали роҳбарон
...

Bee

Маҳдудияти вақт: 1000msМаҳдудияти ҳофиза: 256MB
Ҳамаи ҳалҳо

Тавсифи масъала

Imagine a honeycomb — a field of hexagonal cells with side length NNN. In the upper-left cell AAA there is a bee. In one move it can crawl to the cell down, to the cell down-right, or to the cell up-right (the bee does not crawl up or left). It is required to write a program that finds the number of ways in which the bee can crawl from cell AAA to the opposite cell BBB.

bee.png

Input Format

The first line contains a single number NNN — the size of the hexagonal field (2≤N≤12)(2 \le N \le 12)(2≤N≤12).

Output Format

Output a single integer — the number of ways.

Мисолҳо

Мисол 1
Вуруд
2
Баромад
11
Мисол 2
Вуруд
3
Баромад
291

© 2026 Electicode. All rights reserved.