原创 bzoj1050

強行lct    貌似bzoj數據不對?  有自環 (逃#include <cstdio> #include <algorithm> using namespace std; int ch[5510][2],fa[5510],rv[5

原创 bzoj2049

lct 模版題 辣雞玩意  回我一天青春 #include <stack> #include <cstdio> using namespace std; int st[10010],tp; int m,n; int fa[100

原创 hdu4507【數位dp】

程序猿的悲哀。。數位dp#include <cmath> #include <cstdio> #include <cstring> #define LL long long #define MOD 1000000007LL using n

原创 bzoj3091

裸體   只是第四個操作有點惱火神tm期望。。。http://www.tesoon.com/ask/htm/03/12356.htm(居然真是小學生都會。。(簡直不如07年水平=.=安利一個博客http://blog.csdn.net/p

原创 bzoj2330

簡直做了3個小時 我還是太辣雞了。不過我居然沒考慮到差分約束(明明是你記不到了233黑算法亂搞tarjan   拓撲排序黑過去了#include <queue> #include <cstdio> #include <cstring> #

原创 bzoj3514【lct】【可持久化線段樹】

lct + 主席樹(這個ntr數組  吼啊  有道(zhe)理  污拉拉。。姑且就叫ntr算法咯。。#include <cstdio> #include <iostream> #include <algorithm> using nam

原创 hdu3709【數位dp】

數位dp枚舉平衡節點就好#include <cmath> #include <cstdio> #include <cstring> #define LL long long using namespace std; LL l,r,an

原创 bzoj2753

我就是個薩比。。強行增加難度。。有點最小樹形圖的 什麼什麼 (霧五環的豬牛算法(逃其實並不複雜。#include <queue> #include <cstdio> #include <cstring> #include <algorit

原创 bzoj2594

lct維護最小生成樹裸題 (神tm加強版  按照原版寫的一直t   原來數組開小了=.= #include <cstdio> #include <algorithm> using namespace std; int ch[3000

原创 bzoj3669

一維排序 另一維lct維護最小生成樹 #include <cstdio> #include <iostream> #include <algorithm> using namespace std; int ch[150010][2],

原创 bzoj1180

尼瑪。。 這不是和2843一樣的嗎。。 http://blog.csdn.net/leijp1430/article/details/50763166

原创 Gym100299C【dp】【gcd】

  分解因子就是logn了嘛#include <cstdio> #define LL long long LL a[100010]; int n,T; LL dp[100010][41],ans; int r[100010][41],

原创 bzoj1562【二分圖】

讀懂題就會做系列(我也不一定會吧 (滑稽有樣例解釋相信就懂了#include <cstdio> #include <cstring> #include <iostream> using namespace std; int n; in

原创 bzoj1858

線段樹模板題#include <cstdio> #include <iostream> using namespace std; int n,m,f,u,v; int l0[400010],r0[400010],m0[400010],l

原创 bzoj1854【二分圖】

第一次做的時候居然沒看出來二分圖。。一直想數據結構。。。中毒太深。。#include <cstdio> #include <cstring> #include <iostream> using namespace std; int n;