#include
#include
#include
#include
#include
using namespace std;
#define maxn 1000000 + 10
int n, m;
int h[maxn], q[maxn];
map mark;
void solve()
{
sort(h, h+n);
int t;
while(m--...
分类:
其他好文 时间:
2015-04-06 14:16:36
阅读次数:
116
#include
using namespace std;
class base
{
private:
int m;
public:
base() {};
base(int m){this->m=m;}
int get(){return m;}
void set(int m){this->m=m;}
};//base_end
int main()
{
...
分类:
其他好文 时间:
2015-04-06 14:16:04
阅读次数:
107
#include
using namespace std;
class Time
{
public:
Time(int,int,int);
void output_time( );
int hour;
int minute;
int sec;
};
Time::Time(int h,int m,int s)
{
hour=h;
minut...
分类:
其他好文 时间:
2015-04-06 14:16:00
阅读次数:
109
线段树的 建立build(初始化+左右相等+两个递归+别忘了sum)+更新update(递归出口+更新delta+三向递归+修正当前节点的value)+查找query(如果左右相等+更新delta+三种递归)#includeusing namespace std;#define L(root) ((...
分类:
其他好文 时间:
2015-04-06 14:08:41
阅读次数:
104
#include
using namespace std;
const int N = 100000;
int num[N];
int sa[N], rank[N],height[N];
int wa[N], wb[N], wv[N], wd[N]; int cmp(int *r, int a, int b, int l)
{
return r[a] == r[b] &...
分类:
编程语言 时间:
2015-04-06 12:56:23
阅读次数:
212
Acm练习(七)1.素数求和#includeusing namespace std;int sushu(int x){ int i=2; if(x==1) return 0; for(;i>kk; for(int g=0;g>kk1; for(int l=0;l>kk2; ...
分类:
其他好文 时间:
2015-04-06 12:52:19
阅读次数:
104
源代码:#include #include using namespace std;typedef struct _Table{ int data[100]; int length;}Table;int BinarySearch(Table a, int k){ int left ...
分类:
其他好文 时间:
2015-04-06 12:50:50
阅读次数:
121
ac自动机加状压dp加广搜优化#include#include#include#include#include#includeusing namespace std;const int maxa = 500;const int cha = 4;int n, m, k;int num_[4];map ...
分类:
其他好文 时间:
2015-04-06 12:47:18
阅读次数:
181
先上代码: 1 //作者:王炳午、董龙洋。日期:2015.3.24. 2 #include 3 #include 4 #include 5 using namespace std; 6 int maxMax(int amax[]) //求最大 7 { 8 int i...
分类:
编程语言 时间:
2015-04-06 12:45:14
阅读次数:
185
c 统计有几个cool单词,cool的定义就是至少两个字母,每个字母出现的次数都不同。 1 #include 2 #include 3 #include 4 #define mt(a,b) memset(a,b,sizeof(a)) 5 using namespace std; 6 set s; 7...
分类:
其他好文 时间:
2015-04-06 10:03:00
阅读次数:
112