http://acm.hdu.edu.cn/showproblem.php?pid=1428dijstra+dp; 1 #include 2 #include 3 #include 4 #include 5 #define maxn 100 6 #define ll __int64 7 us...
分类:
其他好文 时间:
2014-07-23 12:06:06
阅读次数:
269
gg。。。
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define ll int
#define N 220
#define M 12345
#define inf (1<<29)
//注意 点标必须是 [0 - 汇点]
//双向边,注...
分类:
其他好文 时间:
2014-07-23 00:09:19
阅读次数:
329
一个机智题,可惜比赛的时候没有机智出来#include#include#include#include#define ll long long#define mod 1000000009#define maxn 100009using namespace std;ll c[maxn];void gc...
分类:
其他好文 时间:
2014-07-22 23:37:17
阅读次数:
366
1 #include 2 #include 3 using namespace std; 4 #define LL long long 5 LL a,b,m,n,d; 6 void ex_gcd(LL a,LL b,LL &x,LL &y,LL &d) 7 { 8 if(b==0){ 9...
分类:
其他好文 时间:
2014-07-22 23:34:07
阅读次数:
358
遍历线段树 线段树的插入和查询 1 //城市地平线(线段树) 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 typedef __int64 LL; 9 struct building{....
分类:
其他好文 时间:
2014-07-22 23:08:12
阅读次数:
175
You want to use just the methods you like, without inheriting all the other methods that you’ll never need. This is possible with the borrowing method...
分类:
编程语言 时间:
2014-07-22 22:41:33
阅读次数:
291
一、题目POJ 1061 青蛙的约会【关于“欧几里得求最大公约数”和“扩展欧几里得算法”的题目】二、题目源程序#include using namespace std;#define LL long longLL gcd(LL a, LL b){ return b ? gcd(b, a%b)...
分类:
其他好文 时间:
2014-07-22 22:34:36
阅读次数:
253
SPOJ VLATTICE题意:x,y,z 2 #include 3 #include 4 #include 5 #define maxn 1001000 6 #define LL long long 7 using namespace std; 8 9 int K[maxn];10 in...
分类:
其他好文 时间:
2014-07-22 00:15:33
阅读次数:
454
立方算法:
#include
#include
#include
#include
#define M 505
using namespace std;
typedef long long LL;
LL a[M],b[M];
int dp[M][M];
int main()
{
//freopen("in.txt","r",stdin);
int T;
cin>>T;
...
分类:
其他好文 时间:
2014-07-20 23:01:50
阅读次数:
284
题解:同BZOJ 3211 花神游历各国,需要注意的是需要开long long,还有左右节点需要注意一下。#include #include #include #include using namespace std;typedef long long LL;LL a[100005],c[10000...
分类:
其他好文 时间:
2014-07-20 21:37:34
阅读次数:
199