做音乐网站首页要求,网店设计风格有哪些,上海做网站服务商,wordpress库存插件题目链接#xff1a;http://acm.hdu.edu.cn/statistic.php?pid2193from126langorder_type0 好吧。水题一道#xff0c;原本以为是一道写AVL树的想写来练练手。没有想到却是这样一道水题#xff0c;好吧#xff0c;猥琐的水过。 题目意思#xff1a; 题目大… 题目链接http://acm.hdu.edu.cn/statistic.php?pid2193from126langorder_type0 好吧。水题一道原本以为是一道写AVL树的想写来练练手。没有想到却是这样一道水题好吧猥琐的水过。 题目意思 题目大意n个点的AVL树最多有几层。 递推公式 a[i]a[i-1]a[i-2]1; #includeiostream
#includestring
#includecstdio
#includecstring
#includequeue
#includemap
#includecmath
#includestack
#includeset
#includevector
#includealgorithm
#define LL long long
#define inf 130
#define s(a) scanf(%d,a)
#define CL(a,b) memset(a,b,sizeof(a))
using namespace std;
const int N45;
int n,a[N],b;
int main()
{a[0]1;a[1]2;for(int i2;i44;i) a[i]a[i-1]a[i-2]1;while(~scanf(%d,n)n){int i0;while(a[i]n) i;printf(%d\n,--i);}return 0;
}