码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
HDU 2222
第一题AC自动机,高仿代码!#include #include #include #include using namespace std;const int maxn = 500010;char str[1000010];struct ACAutomaton{ int ch[maxn][26...
分类:其他好文   时间:2014-08-05 00:33:18    阅读次数:160
C#获取文件格式图标关联应用程序图标
class SystemIcon { [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SHFILEINFO { public...
分类:其他好文   时间:2014-08-05 00:28:08    阅读次数:273
比你想象中还要强大的枚举类型
开发中枚举类型往往被用在可以一一列举的实例中,比如 enum Color{red,green,blue;}。但是可能你不会注意到它的更强大之处,比如如下问题看看你能作答吗 1、枚举类型可以有构造函数吗? 2、枚举类型可以实现接口、继承类吗? 3、枚举类型可以有static成员变量和方法吗?...
分类:其他好文   时间:2014-08-05 00:14:58    阅读次数:209
几年前做家教写的C教程(之五专讲结构体与文件操作)
C语言学习宝典(5)结构体:将不同类型的数据组合成为一个有机的整体,这个整体就是一个结构体。例如:Struct student{ Int name; Char sex; Float score;};使用方法:类型名 成员名;一般形式:Struct{ 成员列表;}变量名表列;结构体变量的引用:结构体变...
分类:其他好文   时间:2014-08-05 00:13:18    阅读次数:280
POJ 2079
呃,不知道我用的算不算卡壳,总有点枚举的意思。先求凸包,然后,枚举其中一点,再枚举另一点作为结尾,这个向量旋转一周后,求出最大值面积。这里面用的是旋转卡壳判断的那个式子。#include #include #include #include using namespace std;struct po...
分类:其他好文   时间:2014-08-05 00:04:48    阅读次数:261
poj 3400 Dropping the stones
//next_permutation全排列 # include # include # include using namespace std; struct node { int w; int v; }; struct node a[10010]; int max1(int x,int y) { return x>y?x:y; } int main() { int i,n,d,fl...
分类:其他好文   时间:2014-08-04 21:33:18    阅读次数:279
Onvif 获取指定通道的流媒体地址
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
POJ 3342 树形DP入门题
题目意思和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
Codeforces 56D Changing a String 编辑距离 dp
题目链接:点击打开链接 编辑距离,,== 一边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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!