「BZOJ1002」[FJOI2007] 轮状病毒

2014年1月6日8,8312

 给定n(N<=100),编程计算有多少个不同的n轮状病毒。

Input

第一行有1个正整数n。

Output

将编程计算出的不同的n轮状病毒数输出

Sample Input

3

Sample Output

16

代码

基尔霍夫矩阵(我也不知道是什么)推出f[i]=(f[i-1]*3-f[i-2]+2)

 

avatar
1 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Platypus Recent comment authors
  Subscribe  
提醒
Platypus
Platypus

是f :=(f[i-1]*3-f[i-2]+1)吧

Platypus
Platypus

+2…