![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
待写的...
文章平均质量分 71
pizzaaaaa
这个作者很懒,什么都没留下…
展开
-
POJ 3693 Maximum repetition substring
#include #include using namespace std; const int nMax = 111111; int num[nMax]; char s[nMax]; int a[nMax]; int sa[nMax], rank[nMax], height[nMax]; int wa[nMax], wb[nMax], wv[nMax], wd[nMax]; int cmp原创 2014-05-26 17:19:14 · 373 阅读 · 0 评论 -
POJ 2096 Collecting Bugs
#include "cstdio" #include "cstring" double d[1005][1005]; int n,s; double tn,ts; double solve(int p,int q) { if(d[p][q]!=-1) return d[p][q]; if(p==n&&q==s) return d[p][q]=0; if(p==n&&原创 2014-05-26 18:29:57 · 359 阅读 · 0 评论 -
POJ 3744 Scout YYF I
#include #include #include #include using namespace std; #define MAX 5 using namespace std; typedef double i64; i64 a[MAX][MAX], b[MAX][MAX], c[MAX][MAX], buff[MAX][MAX], vec[MAX]; void matCp原创 2014-05-26 18:28:35 · 353 阅读 · 0 评论 -
HDU 4372 Count the Buildings
#include "cstdio" #include "iostream" using namespace std; #define maxn 2002 #define MOD 1000000007 #define LL long long LL stirling[maxn][maxn]; LL calstirling(int n,int k){ if(stirling[n][k]原创 2014-05-26 17:37:52 · 370 阅读 · 0 评论 -
HDU 4752 Polygon
#include "cstdio" #include "cmath" #include "iostream" #include "algorithm" using namespace std; #define EPS 1e-8 double a,b,c; double l,r; double f(double x){ return sqrt((2.*a*x+b)*(2.*a*x+b)+1原创 2014-05-26 17:38:58 · 361 阅读 · 0 评论 -
HDU 4035 Maze
#include #include #include #include using namespace std; const int maxn = 10000 + 5; #define eps 1e-10 int n; double k[maxn],e[maxn]; double a[maxn],b[maxn],c[maxn]; vector v[maxn]; bool dfs(i原创 2014-05-26 18:33:17 · 362 阅读 · 0 评论 -
HDU 4335 What is N?
#include "iostream" #include "cstdio" #include "cmath" #include "algorithm" #include "map" #define LL unsigned __int64 using namespace std; //返回ab mod n LL mul_mod(LL a,LL b,LL c) { LL ret=0,tmp=原创 2014-05-26 17:36:24 · 384 阅读 · 0 评论 -
HDU 4217 Data Structure?
#include "cstdio" #include "iostream" #include "algorithm" using namespace std; const int maxn = 262155; int Tree[maxn+10]; inline int lowbit(int x){ return (x&-x); } void add(int x,int value){原创 2014-05-26 17:30:31 · 397 阅读 · 0 评论 -
HDU 3308 LCIS
#include "cstdio" #include "algorithm" using namespace std; #define maxn 111111 #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 int a[maxn]; int lmax[maxn<<2],rmax[maxn<<2],mmax[maxn<<2]; void push原创 2014-05-26 17:28:51 · 330 阅读 · 0 评论 -
HDU 4411 Arrest
#include "cstdio" #include "cstring" const int N = 333;//点 const int M = 33333;//边 const int inf = 10000000; int min(int a,int b){return a<b ? a:b;} struct Node{//边,点f到点t,流量为c,费用为w int f, t, c, w; }e原创 2014-05-26 17:26:30 · 346 阅读 · 0 评论 -
HDU 4780 Candy Factory
#include "cstdio" #include "cstring" const int N = 1111;//点 const int M = 111111;//边 const int inf = 1000000000; int min(int a,int b){return a<b ? a:b;} int max(int a,int b){return a>b ? a:b;} struct原创 2014-05-26 17:25:22 · 448 阅读 · 0 评论 -
POJ 2135 Farm Tour
#include "cstdio" #include "cstring" const int N = 1111;//点 const int M = 111111;//边 const int inf = 1000000000; int min(int a,int b){return a<b ? a:b;} struct Node{//边,点f到点t,流量为c,费用为w int f, t, c, w原创 2014-05-26 17:24:04 · 320 阅读 · 0 评论 -
POJ 1149 PIGS
#include "cstdio" #include "vector" #include "queue" #include "cstring" using namespace std; struct edge{int to,cap,rev;}; #define max_v 222 #define inf 11111111 vector g[max_v]; int level[max_v]; in原创 2014-05-26 17:22:30 · 330 阅读 · 0 评论 -
HDU 4322 Candy
#include "cstdio" #include "cstring" const int N = 111;//点 const int M = 1111;//边 const int inf = 1000000000; int min(int a,int b){return a<b ? a:b;} struct Node{//边,点f到点t,流量为c,费用为w int f, t, c, w; }原创 2014-05-26 17:21:18 · 446 阅读 · 0 评论 -
HDU 4405 Aeroplane chess
#include "cstdio" #include "cstring" double d[100011]; int n,m; int trans[100011]; /* double solve(int pos) { if(d[pos]<0) return d[pos]; if(pos>=n) return d[pos]=0; if(trans[pos]!=-1)原创 2014-05-26 18:32:18 · 367 阅读 · 0 评论