自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

leijp

=。= --> /*leijp1430.tk*/

  • 博客(98)
  • 收藏
  • 关注

原创 差分约束的简单总结

差分约束  在数学上  更多被称为线性规划作为线性规划的一种特殊情况“差分”即意味两个变量作差“约束”则意味这个差  满足一些条件比如  等于某个值   或   大于某个值   或   小于某个值例 a - b >= x1    b - c <= x2    a - c == x3而这类问题在计算机中  也一般只会要求你输出  第i个变量与第j个变量       的差    最大是多少...

2018-03-19 22:16:02 226

原创 心情复杂

算是又回来了?有点小激动本来都不想再碰了看到周围的人都很热情 自己也被感染了?好吧  继续搞acm了这次acm只是副业了。。(还是高数好玩

2017-10-12 22:46:19 262

原创 afo

两年的赌博  终究还是输了现在看来好像我一切选择都是错误的当时毕竟too young昨年本来可以有个比较好的结果  没要d类  其实不用d类  (只需要noip高一点就好了今年要了d类  冰暖也许一切都是命运吧反正我大约的确是乙烷了虽然我知道以后的路还是要我自己来走 车到山前必有路  但是对于过去的两年还是于心不忍天时地利人和  

2016-07-26 18:32:40 542 1

原创 noi day1 前的晚上

玛德好方感觉一瞬间什么都不会了好像再在机房学习一个春秋看远志楼后绿树青山这可能是我人生中最快乐的时光了   也只有在这即将逝去的时候才最令我不舍了吧noi的到来我的高中也就余额不足了好想拿到好成绩  和先哲去谈笑风生然而越临近越觉得自己微不足道明明考前那么淡定  此时也就抑制不住的激动了起来我的noi大约的确是药丸了(吧?

2016-07-23 23:54:24 432

原创 poj3155【分数规划】

我是萨比#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>using namespace std;int n,m;int ans[110];int hehe;int U[1010],V[1010],d[1010];bool vis[...

2016-04-26 10:53:18 497

原创 bzoj2756

mdzz#include #include #include #define LL long longusing namespace std;const LL inf = (LL)1e15;LL n,m,T,mx;LL x;LL a[2];LL c[2];LL ar[45][45];LL gap[1610],h[1610];struct edge { LL

2016-04-11 17:56:32 427

原创 scoi 010 000 001 110

本来是不想写这个东西的没进就没进但是看见大家都在感慨  自己不写一个就过意不去了标题取成这样  就是不想被搜索出来如果你知道我的博客  那我也就瞒不住了今年不需要什么具体的回忆自己弱  足以解释一切在此希望我校学弟早早看清实力差距外校毕竟太厉害多做做比赛就知道了 tc bc cf(这个算了。。太晚了受不了要感觉到压力  不

2016-04-11 14:31:56 441

原创 bzoj2150【二分图匹配】

水水水。。裸最小路径覆盖。。我为何这么水。#include <cstdio>#include <cstring>using namespace std;int dx[5],dy[5];int n,m,r,c,sz;bool a[55][55];struct edge { int v,next;}e[10010];int cnt,head[5010];...

2016-03-30 08:03:08 339

原创 poj2396【上下限最大流】

poj 药丸。。居然读入优化都不给过去掉读入优化就a了害我wa一天。。。药丸#include <cstdio>#include <cstring>#include <iostream>using namespace std;int T,n,m,c,u,v,w,st,en;int U[5010],V[5010],UF[5010],LF[5010],...

2016-03-30 07:16:24 412

原创 poj1815

暴力的枚举割点都可以。。#include <cstdio>#include <iostream>#include <cstring>using namespace std;int n,st,en;struct edge { int v,f,next;}e[90000];int head[410],cnt;int b[210][210],a...

2016-03-26 09:42:25 482

原创 sgu438

经典题然而我因为i打成j    j打成i   搞了1H我¥%#¥%为何如此心不在焉。。我明明很专注(吧?)。。。。。此处不忍吐槽教育妈的晚一点起床早一点睡觉不好?非要23睡 6起  弄的人都是虚的  干啥都没精神   还好意思说国民体质不好感觉自己一天不如一天了。。。浑身难受妈呀扯到那里去了。。#include <cstdio>#include <cstring>#in...

2016-03-25 17:08:32 366

原创 poj2391

二分 最大流#include #include #include #include #define LL long longusing namespace std;int n,m,u,v,sum;int a[210],b[210];LL dis[210][210];struct mes { int u,v; LL w; bool operator

2016-03-25 11:00:58 395

原创 poj1637

欧拉回路判断方法膜板题#include #include #include #include using namespace std;int n,m,u,v;int in[210],out[210];int dis[210],gap[210];int sum_src,sum_sik;struct edge { int v,f

2016-03-25 07:26:29 322

原创 poj1149【sap最大流】

poj1149 模板题#include <cstdio>#include <cstring>#include <iostream>using namespace std;int n,m;int p[1010];int last[1010];bool con[110][110];int CON[110];struct edge { int ...

2016-03-23 16:49:32 299

原创 bzoj1132【叉积】

poi~~~叉积  极角排序(雾 %%%a x b + a x c = a x (b + c)注意符号  那么这道题就easy 了n2预处理所有向量枚举每一个点作为顶点的情况极角排序然后用个前缀和n^2logn卡精度sxbk。。#include <cmath>#include <cstdio>#include <algorithm>#define LL l...

2016-03-21 10:56:36 390

原创 bzoj1412

bzoj1001 狼抓兔子bzoj1412 狼抓羊。。。什么时候来个狼抓青蛙狼爪喜羊羊。。。都是最小割。。。一个经典的最小割模型#include <queue>#include <cstdio>#include <cstring>using namespace std;int n,m;int a[110][110];struct edge { ...

2016-03-16 12:29:37 403

原创 bzoj2333

2333333333333题号厉害  此题必做。。。据说是什么什么可并堆(没听说过orz于是自己yy了一个用splay + 线段树的作法线段树用来维护全局最大值splay维护单点最大  连通块最大作法。略。。#include <cstdio>#include <iostream>using namespace std;char s[2];int n,q,u,v...

2016-03-14 16:40:15 408

原创 距scoi仅一月的时候

往事历历在目昨年的今天大概我们正在外出学习的路上第一次出远门  当时我还是十分的好奇又欣喜昨年是scoi2015   并不是我这届的主场我只是半酱油半随缘的去了没想到省选还考的可以(主要是运气了 好吧。最后却因为noip考得太吃屎还是滚回来学常规。。。转眼scoi就又要来了在中间的时间里  除了寒暑假  我几乎就没来过机房。。常规硬伤。。疯狂的补

2016-03-11 17:40:20 648 5

原创 bzoj1800

简直暴力。。#include int sum[30],n;int read_int () { char c = getchar(); int re = 0; for(;c > '9' || c < '0';c = getchar()); for(;c >= '0' && c <= '9';c = getchar()) re = re * 10 + c - '0';

2016-03-11 10:50:44 328

原创 bzoj1191【二分图】

一眼看出二分图。。#include &lt;cstdio&gt;#include &lt;cstring&gt;int n,m,u,v;struct edge { int v,next;}e[2010];int cnt,head[2010];int cc,vis[2010],Link[2010];int read_int () { char c = getchar();...

2016-03-11 10:26:04 274

原创 bzoj1562【二分图】

读懂题就会做系列(我也不一定会吧 (滑稽有样例解释相信就懂了#include &lt;cstdio&gt;#include &lt;cstring&gt;#include &lt;iostream&gt;using namespace std;int n;int Link[20010],vis[20010];struct edge { int v,next;}e[40010]...

2016-03-11 10:10:02 289

原创 bzoj2330

简直做了3个小时 我还是太辣鸡了。不过我居然没考虑到差分约束(明明是你记不到了233黑算法乱搞tarjan   拓扑排序黑过去了#include &lt;queue&gt;#include &lt;cstdio&gt;#include &lt;cstring&gt;#include &lt;algorithm&gt;#define LL long longusing namespace ...

2016-03-10 18:29:34 402

原创 bzoj1854【二分图】

第一次做的时候居然没看出来二分图。。一直想数据结构。。。中毒太深。。#include &lt;cstdio&gt;#include &lt;cstring&gt;#include &lt;iostream&gt;using namespace std;int n; struct edge { int v,next;}e[4000010];int cnt,head[10100...

2016-03-10 09:52:52 246

原创 bzoj1858

线段树模板题#include &lt;cstdio&gt;#include &lt;iostream&gt;using namespace std;int n,m,f,u,v;int l0[400010],r0[400010],m0[400010],l1[400010],r1[400010],m1[400010];int l[400010],r[400010],lz[400010],s...

2016-03-09 17:41:18 480

原创 bzoj2753

我就是个萨比。。强行增加难度。。有点最小树形图的 什么什么 (雾五环的猪牛算法(逃其实并不复杂。#include &lt;queue&gt;#include &lt;cstdio&gt;#include &lt;cstring&gt;#include &lt;algorithm&gt;#define LL long longusing namespace std;int n,m,h[...

2016-03-09 16:03:11 346

原创 bzoj2748

辣鸡题。。#include int n,ST,ma;bool dp[60][1010];int a[60];int read_int () { char c = getchar(); int re = 0; for(;c > '9' || c < '0';c = getchar()); for(;c >= '0' && c <= '9';c = getchar(

2016-03-09 08:02:00 323

原创 bzoj1088

辣鸡题。。省选考模拟 简直良心。。#include int n,a[10010],b[10010];int read_int () { char c = getchar(); int re = 0; for(;c > '9' || c < '0';c = getchar()); for(;c >= '0' && c <= '9';c = getchar()) re

2016-03-09 07:43:22 342

原创 bzoj1015

辣鸡题。。倒着加点  加一个点就加一个联通块连一条边就减一个联通块#include #include using namespace std;int n,m,k;bool nuse[400010];int ans[400010];struct edge { int u,v,next;}e[400010];int head[400010];int

2016-03-08 16:11:45 290

原创 bzoj1180

尼玛。。 这不是和2843一样的吗。。http://blog.csdn.net/leijp1430/article/details/50763166

2016-03-08 15:30:55 295

原创 bzoj1083

辣鸡题  裸最小生成树#include #include using namespace std;int n,m,head[310];struct edge { int u,v,w; bool operator < (const edge &b)const { return w < b.w; }}e[90010];int read_int () { char

2016-03-08 15:27:28 347

原创 bzoj1050

强行lct    貌似bzoj数据不对?  有自环 (逃#include &lt;cstdio&gt;#include &lt;algorithm&gt;using namespace std;int ch[5510][2],fa[5510],rv[5510],x[5510],nu[5510],mi[5510],mn[5510];int st[5510],tp;int n,m,ST...

2016-03-08 15:02:43 279

原创 bzoj3669

一维排序 另一维lct维护最小生成树#include #include #include using namespace std;int ch[150010][2],rv[150010],fa[150010],st[150010],tp;int ma[150010],x[150010],nu[150010],mn[150010];int n,m;int head[50

2016-03-08 09:36:33 216

原创 bzoj3514【lct】【可持久化线段树】

lct + 主席树(这个ntr数组  吼啊  有道(zhe)理  污拉拉。。姑且就叫ntr算法咯。。#include &lt;cstdio&gt;#include &lt;iostream&gt;#include &lt;algorithm&gt;using namespace std;int n,m,k,ty;int ch[400010][2],fa[400010],rv[400...

2016-03-07 17:16:27 474

原创 bzoj2594

lct维护最小生成树裸题(神tm加强版  按照原版写的一直t   原来数组开小了=.=#include #include using namespace std;int ch[1500005][2],fa[1500005],rv[1500005],x[1500005],ans[1500005],ans_o[1500005];int cnt,ccnt;int st[15

2016-03-02 10:42:48 293

原创 bzoj3091

裸体   只是第四个操作有点恼火神tm期望。。。http://www.tesoon.com/ask/htm/03/12356.htm(居然真是小学生都会。。(简直不如07年水平=.=安利一个博客http://blog.csdn.net/popoqqq/article/details/40823659popoqqq大爷讲的好#include &lt;cstdio&gt;#define LL lon...

2016-03-01 08:56:02 734

原创 bzoj2843

lct 水水水#include int ch[30010][2],fa[30010],lz[30010],x[30010],sum[30010];int n,m;int st[30010],tp;int read_int () { char c = getchar(); int re = 0; for(;c > '9' || c < '0'; c = getcha

2016-02-29 09:16:46 436

原创 bzoj2049

lct 模版题辣鸡玩意  回我一天青春#include #include using namespace std;int st[10010],tp;int m,n;int fa[10010],ch[10010][2],lazy[10010];int read_int () { char c = getchar(); int re = 0; for(

2016-02-26 16:59:09 302

原创 hdu3709【数位dp】

数位dp枚举平衡节点就好#include &lt;cmath&gt;#include &lt;cstdio&gt;#include &lt;cstring&gt;#define LL long longusing namespace std;LL l,r,ans;LL a[30],b[30],la,lb;LL dp[30][2000];LL vis[30][2000];L...

2016-01-27 19:30:46 515

原创 hdu4507【数位dp】

程序猿的悲哀。。数位dp#include &lt;cmath&gt;#include &lt;cstdio&gt;#include &lt;cstring&gt;#define LL long long#define MOD 1000000007LLusing namespace std;LL dp1[20][10][7][7][2];LL dp2[20][10][7][7][2]...

2016-01-27 08:38:09 332

原创 Gym100299C【dp】【gcd】

  分解因子就是logn了嘛#include &lt;cstdio&gt;#define LL long longLL a[100010];int n,T;LL dp[100010][41],ans;int r[100010][41],cnt[100010];LL read_int () { char c = getchar(); LL re = 0; for(;c &gt...

2016-01-24 21:18:50 351

空空如也

空空如也

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

TA关注的人

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