delete pics to save space
This commit is contained in:
14
history_source/信息学奥赛一本通/2.3.9.cpp
Normal file
14
history_source/信息学奥赛一本通/2.3.9.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
int f(int n,int k)
|
||||
{
|
||||
if(n>1) return (k-1)*f(n-1,2)+f(n-1,3);
|
||||
return k;
|
||||
}
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
scanf("%d",&n);
|
||||
printf("%d\n",f(n,3));
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user