#Lutece1610. 黑红梅方
黑红梅方
Migrated from Lutece 1610 黑红梅方
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
我们知道,一副扑克有黑桃、红桃、梅花、方块四种花色。
现在你把张扑克排成一行,每个位置都可以选择放置四种花色中的一种,只要这一行中出现了一组连续四张扑克牌花色各不相同的情况,就称该种排法为“卿式扑克序列”。
请你计算,对于张扑克排成一行的种排法中,共有多少种“卿式扑克序列”呢?
Input
一个整数
Output
张扑克排成一行的“卿式扑克序列”总数对取模的结果。
Samples
4
24
5
168
Note
样例,以代表黑桃,代表红桃,代表梅花,代表方块,共有以下种“卿式扑克序列”:
Resources
2017 UESTC Training for Dynamic Programming