GetStreamUri函数可以获取流媒体地址。代码如下:void UserGetUri(const char* xAddr){ int result=0 ; struct soap *soap = soap_new(); struct _trt__GetStreamUri trt__Ge...
分类:
其他好文 时间:
2014-08-04 20:54:27
阅读次数:
2148
题目意思和POJ2342一样,只是多加了一个条件,如果最大方案数唯一,输出Yes,不唯一输出No
dp的是时候多加一个变量记录答案是否唯一即可
#include "stdio.h"
#include "string.h"
#include "vector"
using namespace std;
struct node
{
int fa;
vectorchi...
分类:
其他好文 时间:
2014-08-04 18:02:17
阅读次数:
250
创建单线性链表,常见的有头插法、尾插法创建线性链表,常见的操作有:创建链表、查找、删除、增加元素、求逆链等操作。
这里首先才有头插法创建链表:
//头指针唯一确定一个单链表
#define MaxSize 15
typedef int elem_type ;
typedef struct linklist
{
elem_type data;
str...
分类:
其他好文 时间:
2014-08-04 17:51:41
阅读次数:
219
题目链接:点击打开链接
编辑距离,,== 一边dp一边记录前驱太累,,还是dp后找路径大法好
#include
#include
#include
#include
using namespace std;
#define ll int
#define N 1010
char s[N], t[N];
int dp[N][N], n, m;
// 0为插入 1为删除 2 3为替换
struct ...
分类:
其他好文 时间:
2014-08-04 17:49:47
阅读次数:
275
问题:判断二叉树是否为镜像二叉树分析:递归判断,根节点单独判断,然后递归左结点和右结点,之后每次一起递归左结点的左结点和右结点的右结点比较,左结点的右结点和右结点的左结点比较/** * Definition for binary tree * struct TreeNode { * int ...
分类:
其他好文 时间:
2014-08-04 17:27:27
阅读次数:
175
使用两个指针,和判断一个链表是否形成环类似
代码:
#include
#include
using namespace std;
typedef struct node {
int data;
struct node *next ;
}Node,*pNode;
void creatNode( pNode &pHead ){
bool isFirst=true;
pNode p...
分类:
其他好文 时间:
2014-08-04 06:14:16
阅读次数:
194
~~~~
二维的最长上升子序列。n^2算法居然可以水过。。
就不多说了,排个序,然后DP。
题目链接:http://poj.org/problem?id=1609
~~~~
#include
#include
#include
#include
#define N 11111
using namespace std;
struct node
{
int l,m;
}b[N];
...
分类:
其他好文 时间:
2014-08-04 02:07:06
阅读次数:
232
先排序后二分。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define MAXN 1005 8 9 typedef struct {10 int x, y;11 } node_s...
分类:
其他好文 时间:
2014-08-04 01:52:36
阅读次数:
323
/* DNS 头定义 */struct dnshdr{unsigned short id;unsigned short flags;unsigned short qdcount;unsigned short ancount;unsigned short nscount;unsigned short ...
分类:
其他好文 时间:
2014-08-04 01:40:46
阅读次数:
378
??
1.编写头文件
#define
_CRT_SECURE_NO_WARNINGS
//#pragmawarning(disable:4996)
#include
#include
#include
struct
CString
{
char *p;
//保存字符串首地址
i...
分类:
编程语言 时间:
2014-08-03 23:27:26
阅读次数:
557