上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 23 下一页
摘要: #include #include #include #include #include #include #include using namespace std; typedef struct BinTreeNode { char data; struct BinTreeNode *lchild; struct BinTreeNode *rchild; ... 阅读全文
posted @ 2018-11-11 20:03 bluefly-hrbust 阅读(413) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; typedef struct BIT_Node{// char data; struct BIT_Node *lchild; struct BIT_Node *rchild; }BIT_Node,*BITree; char ch; void CreateBiTree(BI... 阅读全文
posted @ 2018-11-11 11:22 bluefly-hrbust 阅读(213) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; typedef struct node { int data; struct node *next;//指向类型完全相同的指针 int len; } Lnode,*Linklist; //一个是结构体类型,一个是结构体指针类型 int n,t... 阅读全文
posted @ 2018-11-11 00:01 bluefly-hrbust 阅读(629) 评论(0) 推荐(0) 编辑
摘要: 总结- A-开始觉得是找规律,最开始模拟当时我觉得如果L达到1e9的范围的话,岂不是要加1e9次,模拟也就没有认真写,现在想来,后面由于加的不再是1,而是我前面的值,这样相当了一个斐波那契的类型,而斐波那契的增子速度是非常快的,因此时间复杂度并不是太高。 1 #include<iostream> 2 阅读全文
posted @ 2018-11-09 22:48 bluefly-hrbust 阅读(172) 评论(0) 推荐(0) 编辑
摘要: A题-二分枚举C看是否满足即可,注意真实有可能会出现除0以及出现速度为负值,应该加以判断,舍去。由于C可能很大,或者很小建议开到+-1e9范围。 1 #include<iostream> 2 #include<string.h> 3 #include<algorithm> 4 #include<st 阅读全文
posted @ 2018-11-09 14:31 bluefly-hrbust 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 青岛赛结束,成功拿铁,现在感觉仍然有些不真实,做了三个水题,磕磕绊绊,比赛时不知道怎么的,队友和自己都不在状态,签到卡了2个点,我现在想想仍然觉得不可思议,是自己实力太菜吗?不会做吗?我也不知道,也许只能安慰自己,实力铁吧。 阅读全文
posted @ 2018-11-05 19:39 bluefly-hrbust 阅读(130) 评论(0) 推荐(0) 编辑
摘要: struct M { LL a[3][3]; void init1()//化单位矩阵 { memset(a, 0, sizeof(a)); a[0][0]=1; a[1][1]=1; a[2][2]=1; } void init0()//清空矩阵 { memset(a, ... 阅读全文
posted @ 2018-10-26 00:27 bluefly-hrbust 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 求f[n]=f[n-1]+f[n-2]+f[n-3] 我们知道 f[n] f[n-1] f[n-2] f[n-1] f[n-2] f[n-3] 1 1 0 0 0 0 = 0 0 0 * 1 0 1 0 0 0 0 0 0 1 0 0 矩阵快速幂就是利用快速幂的思路,去加速转移矩阵的计算,从而给计算 阅读全文
posted @ 2018-10-26 00:22 bluefly-hrbust 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #define ll long long using namespace std; ll f[40]; ll g[40]; ll qpow(ll a,ll b){ ll ans=1; while(b){ if (b&1==1)ans=ans*a; a*=a; b/=2; } ... 阅读全文
posted @ 2018-10-24 12:44 bluefly-hrbust 阅读(194) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #define rep(i,j,k) for(int i=j;i0)return ans; ans=1; for(int j=1;ja[j].x) && (a[i].y>a[j].y)){ maps[i][j]=1; } } } in... 阅读全文
posted @ 2018-10-24 00:22 bluefly-hrbust 阅读(167) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 23 下一页