码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
UVa 11722 (概率 数形结合) Joining with Friend
高中也做个这种类似的题目,概率空间是[t1, t2] × [s1, s2]的矩形,设x、y分别代表两辆列车到达的时间,则两人相遇的条件就是|x - y| 2 #include 3 #include 4 using namespace std; 5 6 struct Point 7 { 8 ...
分类:其他好文   时间:2015-03-10 22:48:57    阅读次数:186
hdu 2844 coins (多重背包)
#include#include#include#include#includeusing namespace std;int a[120],c[120];int dp[100000+100];int main(){ int n,m; int i,j,k; while(scanf("%d%d"...
分类:其他好文   时间:2015-03-10 22:47:50    阅读次数:166
交集、并集、差集
1 #include 2 #include 3 using namespace std; 4 const int N=1000+5; 5 6 int n,m; 7 int a[N], b[N]; 8 9 int main()10 {11 int i, j;12 while(sc...
分类:其他好文   时间:2015-03-10 22:46:36    阅读次数:146
HDU2425:Hiking Trip(简单bfs,优先队列实现)
题目: 传送门题意很简单就不解释了,水题一道。#include #include #include #include typedef __int64 ll;#define inf 0x3f3f3f3f#include #include using namespace std;struct node....
分类:其他好文   时间:2015-03-10 22:44:20    阅读次数:152
优先队列 重写优先级
#include#includeusing namespace std;struct cmp //重写优先关系 从大到小{ bool operator () (const int a, const int b) const { return a%10 > b%1...
分类:其他好文   时间:2015-03-10 22:43:46    阅读次数:153
大话数据结构之栈的链式存储结构
#include//#include//#include using namespace std;#define OK 1#define TRUE 1#define FALSE 0#define ERROR 0typedef int status;//返回的状态值typedef int elemty...
分类:其他好文   时间:2015-03-10 22:43:35    阅读次数:138
AJAX学习
using System;using System.Collections.Generic;using System.Linq;using System.Web;namespace Ajax{ /// /// AJAX 的...
分类:Web程序   时间:2015-03-10 22:42:59    阅读次数:131
HDU 3746 Cyclic Nacklace(KMP)
KMP求最短循环节的应用 //2100 KB 218 ms #include #include #include #include using namespace std; #define M 100000+1000 char str[M]; int next2[M]; int len; void getnext() { len=strlen(str); int i=0,j;...
分类:其他好文   时间:2015-03-10 21:33:53    阅读次数:116
POJ 3984 迷宫问题 _BFS
1 #include 2 #include 3 #include 4 #include 5 #define CL(x, y) memset(x, y, sizeof(x)) 6 using namespace std; 7 const int MAX = 5; 8 int N, i, j,...
分类:其他好文   时间:2015-03-10 21:26:09    阅读次数:150
【秦九韶算法】【字符串哈希】bzoj3751 [NOIP2014]解方程
在模意义下枚举m进行验证,多设置几个模数,而且小一些,利用f(x+p)%p=f(x)%p降低计算次数。UOJ AC,bzoj OLE。#include#include#include#includeusing namespace std;#define MAXV 4951vectorv;typede...
分类:编程语言   时间:2015-03-10 21:19:33    阅读次数:168
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!