自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 美赛数模

Merge After TollMulti-lane divided limited-access toll highways use “ramp tolls” and “barrier tolls” to collect tolls from motorists. A ramp toll is a collection mechanism at an entrance or exit ram

2018-01-19 17:08:56 564

原创 raw转wav

音频转换raw文件添加wav头可得wav文件import wave import os import numpy as npfile_list =open(“hraw1.lst”) for line in file_list: line = line.strip(‘\n’) f = open(line,’rb’) str_data = f.read(

2018-01-19 17:06:16 1655

原创 高速收费站模拟

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键// simulate_car.cpp: 定义控制台应用程序的

2018-01-19 17:01:36 3072

原创 欢迎使用CSDN-markdown编辑器

#include <iostream>#include<stdio.h>#include<stdlib.h>#include<string.h>using namespace std;#define maxn 2222222 << 2#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1int Max[maxn];int h=0,w=0,n

2017-03-26 23:48:29 251

原创 UVA 10006(素数判断+快速幂)

/*过两天写这两个算法的详解*/#include <iostream>#include<stdio.h>#include<algorithm>#include<math.h>#include<string.h>using namespace std;#define ll long longll ans = 1;int n;const int maxn = 65005;int a

2016-08-27 22:25:06 471

原创 POJ 2406(kmp)

/*题意为:一个字符串最多可以分成几个相同的部分 读入字符后,生成一份next表,寻找最后一个最长上升子序列。1.判断其长度不为0;2.余他前面的长度为0; 输出其长度、前面长度。*/#include <iostream>#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;char s[1

2016-08-27 22:01:52 414

原创 并查集 POJ 1330

#include <iostream>#include<stdio.h>#include<string.h>using namespace std;const int maxn = 10010;int t,n;int x,y;int father[maxn],bj[maxn];void bl(int n){ while(n !=father[n]) {

2016-08-27 21:49:48 373

原创 快速幂

/*快速幂*/#include <iostream>#include<stdio.h>#include<string.h>#include<algorithm>#include<math.h>using namespace std;const int maxn = 10010;int p_cofficient[maxn],q_cofficient[maxn],x_self[maxn]

2016-08-27 21:47:30 409

原创 next表的套路写法

#include <iostream>#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;char p[10005],s[1000005];int pre[10005];int ans = 0;int pl,sl;void init(){ memset(pre,0,sizeof(p

2016-08-27 21:42:35 875

原创 POJ 3461

/*较裸的kmp题,新手熟悉一下*/#include <iostream>#include<stdio.h>#include<string.h>#include<algorithm>#include<math.h>using namespace std;char a[10005],s[1000005];int next1[10005];int alen,slen;void pre_

2016-08-27 21:40:54 369

原创 POJ 1961

/*一条水题,基本裸kmp,能加深理解next表的作用*/#include<iostream>#include<cstring>#include<cstdio>#include<string>#include<algorithm>using namespace std;const int maxn = 1000010;char s[maxn];int slen,next1[maxn

2016-08-27 21:37:48 404

原创 POJ 1961

/*一条水题,基本裸kmp,能加深理解next表的作用*/#include<iostream>#include<cstring>#include<cstdio>#include<string>#include<algorithm>using namespace std;const int maxn = 1000010;char s[maxn];int slen,next1[maxn

2016-08-27 21:29:36 417

原创 ACM-HDU 3336

/*所谓kmp算法,有很多衍生,但是基础就是next表,字符串有n位,next数组就有n+1位;如“aabc”,next[0]=-1,第一个不重合只能向后移一位;next[1]=0,前面只有一个字符;next[2]=1,'a'=='a';next[3]=0,'a'!='b','aa'!='ab';同理,next[4]=0;*/#include<iostream>#include<cstrin

2016-08-27 21:26:02 452

原创 浅谈博弈论

/*博弈论:是二人或多人在平等的对局中各自利用对方的策略变换自己的对抗策略,达到取胜目标的理论。博弈论是研究互动决策的理论。博弈可以分析自己与对手的利弊关系,从而确立自己在博弈中的优势,因此有不少博弈理论,可以帮助对弈者分析局势,从而采取相应策略,最终达到取胜的目的博弈论分类:一)巴什博奕(Bash Game):只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光

2016-08-18 08:17:14 446

原创 HDU 5092

/*题意就是给你一个n*m的表,每个点都可以往它正下方,左下方,右下方走, 找和最小的点,如果有一样的点,就输出最右边的一组,总的来说就是(记录路径+dp) */#include <iostream>#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;int pf[105],dp[105]

2016-08-17 22:09:02 300

原创 并查集小结

## 并查集小结(一) ##POJ 1703Description The police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the po

2016-07-24 19:14:46 254

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除