码迷,mamicode.com
首页 >  
搜索关键字:struct tm    ( 20030个结果
BZOJ 1089 严格n元树 (递推+高精度)
题解:用a[i]表#include #include using namespace std;struct data{int len,a[2002];}a[35],c,p,t;int n,d;data mul(data a,data b){ memset(c.a,0,sizeof c.a); ...
分类:其他好文   时间:2014-07-22 00:35:36    阅读次数:235
链式队列的实现
#include #include typedef int DataType; typedef struct qnode{//链式队列的结点 DataType data;//数据部分 struct qnode *next;//指向下一个结点 }LQNode; typedef struct{ LQNode *front;//队头指针 LQNode *rear;//对尾指针 }...
分类:其他好文   时间:2014-07-22 00:32:35    阅读次数:200
hdu 1305 Immediate Decodability
用G++过了,c++无限WA 就是一水,就是求输入的字符串中是否有一个是其他字符串的子串; 注意这种数据。。。 0000 010 01 9 字符串的长度从大到小; #include #include #include using namespace std; char qq[20005]; struct node{ int q[2]; int w; node...
分类:其他好文   时间:2014-07-22 00:30:36    阅读次数:192
Xcode 升级后,常常遇到的遇到的警告、错误,解决方法
从sdk3.2.5升级到sdk 7.1中间废弃了很多的方法,还有一些逻辑关系更加严谨了。1,警告:“xoxoxoxo” is deprecated解决办法:查看xoxoxoxo的这个方法的文档,替换掉这个方法即可。2,警告:Declaration of "struct sockaddr" will ...
分类:其他好文   时间:2014-07-21 14:39:27    阅读次数:194
DAG镶嵌模型+原始路径打印
DP矩形镶嵌,打印路径与最长公共子序列相似。 1 #include 2 #include 3 #define doumax(a,b) (a>b?a:b) 4 const int maxn=100; 5 int mat[maxn][maxn],dp[maxn],n; 6 struct node{ 7 ...
分类:其他好文   时间:2014-07-21 14:36:28    阅读次数:387
hdu 1896 Stones(优先队列)
# include # include # include using namespace std; struct node { int pos; int d; int num; friend bool operator n2.d;//仍的距离从小到大 return...
分类:其他好文   时间:2014-07-21 11:43:44    阅读次数:180
hdu 1873看病要排队(优先队列)
# include # include # include using namespace std; struct node { int y; int val; int num; friend bool operatorn2.num;//从小到大 return...
分类:其他好文   时间:2014-07-21 11:36:44    阅读次数:203
FZU 1683
矩阵的快速幂sn 1 1 0 0 sn-1fn+1 = 0 3 2 7* fnfn 0 1 0 0 fn-1fn-1 0 0 1 0 fn-2#include #include using namespace std;int n;struct M{ int t[4][4]...
分类:其他好文   时间:2014-07-21 08:07:13    阅读次数:221
UVA 11149 - Power of Matrix(矩阵倍增)
UVA 11149 - Power of Matrix 题目链接 题意:给定一个n*n的矩阵A和k,求∑kiAi 思路:利用倍增去搞,∑kiAi=(1+Ak/2)∑k/2iAi,不断二分即可 代码: #include #include const int N = 45; int n, k; struct mat { int v[N][N]; mat() ...
分类:其他好文   时间:2014-07-20 23:07:20    阅读次数:274
C和指针 (pointers on C)——第十章:结构体和联合(上)
第十章 结构和联合 这个部分先介绍了.运算符,可以供直接访问,还介绍了->运算符,它代替结构体指针的间接访问操作(*struct).xxx 这一章新手理解起来不算太难,没有学过操作系统的话理解位段、对齐等概念会有一些问题。 越发的说明了指针和内存绝对是C的核心。 总结: 结构声明列出了结构包含的成员列表,不同类型的值可以存储在一起。 不同的结构声明即使他们的成员列表相同也被认为...
分类:其他好文   时间:2014-07-20 22:26:03    阅读次数:300
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!