会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Dillydally
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
4
5
6
7
8
9
10
11
12
···
18
下一页
2018年7月27日
pygame项目二黑客帝国
摘要: import pygameimport sys#初始化pygamepygame.init()size = width,height =600,400screen = pygame.display.set_mode(size)pygame.display.set_cap...
阅读全文
posted @ 2018-07-27 01:28 MCQ
阅读(316)
评论(0)
推荐(0)
2018年7月25日
pygame项目一 物体移动
摘要: import pygameimport sysfrom pygame.locals import * #导入所有的pygame变量,即不必再通过pygame.来调用# 初始化pygamepygame.init()clock = pygame.time.Clock() ...
阅读全文
posted @ 2018-07-25 14:40 MCQ
阅读(1485)
评论(0)
推荐(0)
2018年7月21日
二叉树四种遍历
摘要: void PreorderTraversal(BinTree BT){ if(BT==NULL) return; printf(" %c",BT->Data); PreorderTraversal(BT->Left); PreorderTraversal...
阅读全文
posted @ 2018-07-21 10:47 MCQ
阅读(193)
评论(0)
推荐(0)
HDU1166 (树状数组或线段树)
摘要: 模板题。树状数组法:#includeusing namespace std;#define inf 0x3f3f3f3f#define ll long longconst int maxn=50005;const double eps=1e-8;int tree[ma...
阅读全文
posted @ 2018-07-21 09:48 MCQ
阅读(121)
评论(0)
推荐(0)
单链表逆转
摘要: List Reverse( List L ){ List p,q; p=L; L=NULL; while(p){ q=p; p=p->Next; q->Next=L; L=q; } return L;}
阅读全文
posted @ 2018-07-21 09:37 MCQ
阅读(90)
评论(0)
推荐(0)
2018年7月20日
树状数组学习笔记
摘要: 任务:对于数组A[1……n],在O(logn)的时间内完成以下任务:(1)给A【i】加上一个数(2)求A【1】+……A【i】的和说明:树状数组的第i个元素Tree[i]表示A[lowbit(i)+1……i]的和,其中lowbit(i)表示i的最低二进制位,即把高位的1...
阅读全文
posted @ 2018-07-20 16:03 MCQ
阅读(89)
评论(0)
推荐(0)
树状数组模板
摘要: 讲解:传送门const int maxn=50005;const double eps=1e-8;int tree[maxn];inline int lowbit(int x){ return x&-x;}void add(int x,int value) //...
阅读全文
posted @ 2018-07-20 16:02 MCQ
阅读(88)
评论(0)
推荐(0)
二叉堆
摘要: 堆是完全二叉树,左孩子是2i,右孩子是2i+1。用途:堆排序,实现优先队列插入删除查找时间复杂度:O(logn)堆排序复杂度:O(nlogn)/**** **** **** **** **** ***** Function Name : 二叉堆* Descriptio...
阅读全文
posted @ 2018-07-20 12:31 MCQ
阅读(144)
评论(0)
推荐(0)
2018年7月19日
二叉树重构(知后序中序求前序)
摘要: #includeusing namespace std;#define inf 0x3f3f3f3f#define ll long long#define fo freopen("in.txt","r",stdin)#define fc fclose(stdin)#d...
阅读全文
posted @ 2018-07-19 17:28 MCQ
阅读(271)
评论(0)
推荐(0)
2018年7月18日
莫比乌斯反演学习(hdu 1695
摘要: 公式:1 2 (d|n表示n是d的倍数)莫比乌斯函数:例题:HDU1695题目大意是这样的,给你 a , b , c , d , k 五个值 (题目说明了 你可以认为 a=c=1) x 属于 [1,b] ,y属于[1,d] 让你求有多少对这...
阅读全文
posted @ 2018-07-18 01:41 MCQ
阅读(120)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
12
···
18
下一页
公告