第一题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
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语言学习宝典(5)结构体:将不同类型的数据组合成为一个有机的整体,这个整体就是一个结构体。例如:Struct student{ Int name; Char sex; Float score;};使用方法:类型名 成员名;一般形式:Struct{ 成员列表;}变量名表列;结构体变量的引用:结构体变...
分类:
其他好文 时间:
2014-08-05 00:13:18
阅读次数:
280
呃,不知道我用的算不算卡壳,总有点枚举的意思。先求凸包,然后,枚举其中一点,再枚举另一点作为结尾,这个向量旋转一周后,求出最大值面积。这里面用的是旋转卡壳判断的那个式子。#include #include #include #include using namespace std;struct po...
分类:
其他好文 时间:
2014-08-05 00:04:48
阅读次数:
261
//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
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