码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
QT—QTextEdit控件显示日志
功能:利用QTextEdit开发一个日志显示窗口。没有太多操作,需要实现的是日志自动向上滚动,总体的日志量可以控制在x行(比如300行)以内;其他的应用功能我后面继续添加 1 #include 2 3 #include 4 5 #include 6 7 #include 8 9 10...
分类:其他好文   时间:2015-07-24 12:11:18    阅读次数:148
链表,配合critical section
#include typedef struct _Node { struct _Node *next; int data; } Node; typedef struct _List { Node *head; CRITICAL_SECTION critical_sec; } List; List *CreateList() { List *pList =...
分类:其他好文   时间:2015-07-24 10:54:14    阅读次数:117
用结构体变量和指向结构体变量的指针构成链表
测试描述:建立一个简单的静态链表,它由3个学生数据的结点组成。输出各结点中的数据。 代码如下: #include using namespace std; struct Student { int num; float score; Student *next; }; int main() { Student a,b,c,*head,*p;//都是Studen...
分类:其他好文   时间:2015-07-24 10:52:57    阅读次数:125
spfa 最短路径
#include using namespace std; int n,m; int spfa_bfs(){ int d[100] = {0}; int c[100] = {0}; int vis[100] = {0}; for(int i = 0;i < n;i++){ d[i] = INF; } d[s] = 0; queue que; que.push(s); c...
分类:其他好文   时间:2015-07-24 10:46:10    阅读次数:169
uva 10596 Morning Walk(欧拉回路)
这道题是神坑啊,花了我将近3个小时,本来敲的挺顺的,交上去就是wa,坑点真坑,原来是有的路口交叉点可以没有 路通向它,无语,没有路通向也可以叫交叉点。。。。以后一定得考虑多种情况,用了bfs(vector做的)和dfs判断 的是否连通,判断连通之后只需要再判断是否都有偶数个度就ok了,坑,真坑。 bfs代码: #include #include #include #include #inc...
分类:其他好文   时间:2015-07-24 10:45:58    阅读次数:110
用new和delete运算符进行动态分配和撤销存储空间
测试描述:临时开辟一个存储空间以存放一个结构体数据 #include #include using namespace std; struct Student { string name; int age; char sex; }; int main() { Student *p; //定义指向结构体类型Student的数据的指针变量p p=ne...
分类:其他好文   时间:2015-07-24 09:19:13    阅读次数:141
一笔画问题(floyd+oular+dfs)
一笔画问题时间限制:3000 ms | 内存限制:65535 KB 难度:4描述zyc从小就比较喜欢玩一些小游戏,其中就包括画一笔画,他想请你帮他写一个程序,判断一个图是否能够用一笔画下来。规定,所有的边都只能画一次,不能重复画。输入第一行只有一个正整数N(N 2 #include 3 int P;...
分类:其他好文   时间:2015-07-24 09:13:18    阅读次数:103
UVa-12657 - Boxes in a Line
用数组写感觉萌萌哒啊,本题可以写个link函数,更加方便 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=100010; 6 int r[maxx],l[maxx]; 7 int n,m; 8 long...
分类:其他好文   时间:2015-07-24 06:52:44    阅读次数:139
Round #313 (Div. 2) D. Equivalent Strings
运气不错,这次cf大涨,居然是房间第二(要不是D题TLE了,就第一了)用string会TLE,用char加下标,还看到更牛的算法, 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=200010; 6 c...
分类:其他好文   时间:2015-07-24 06:47:22    阅读次数:113
UVa-11988 - Broken Keyboard (a.k.a. Beiju Text)
原来数组可以代替指针,涨姿势 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=100010; 6 char a[maxx]; 7 int next[maxx],cur,last; 8 int main(...
分类:其他好文   时间:2015-07-24 06:46:03    阅读次数:120
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!