题解:用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
linux下文件的读写操作(openreadwrite)转http://www.2cto.com/os/201403/285837.htmlopen(打开文件)相关函数 read,write,fcntl,close,link,stat,umask,unlink,fopen表头文件 #include#...
分类:
系统相关 时间:
2014-07-22 00:35:33
阅读次数:
373
#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
用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
#include#include#include#includeusing namespace std;#define N 5505#define M 55000//注意边和点集的数组大小struct edge{ int to,value,next;}edges[M];int heads[N]...
分类:
其他好文 时间:
2014-07-22 00:20:35
阅读次数:
213
从sdk3.2.5升级到sdk 7.1中间废弃了很多的方法,还有一些逻辑关系更加严谨了。1,警告:“xoxoxoxo” is deprecated解决办法:查看xoxoxoxo的这个方法的文档,替换掉这个方法即可。2,警告:Declaration of "struct sockaddr" will ...
分类:
其他好文 时间:
2014-07-21 14:39:27
阅读次数:
194
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
# 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
# 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
矩阵的快速幂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