原创 一個智障的求逆序對的問題
#include<iostream> #include<algorithm> #include<cstring> #include<string.h> #define ll long long using namespace std;
原创 poj3436 網絡流
#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int INF = 0x3f3f3
原创 hdu5289單調隊列
#include <cstdio> #include <cstring> #include <queue> #include <algorithm> using namespace std ; #define LL __int64 deq
原创 hdu1166 單點修改區間查詢
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<algorithm> #include<cstring> #include<string.h> #include<cs
原创 二分答案加雙指針掃描 gym101194D
#include<iostream> #include<algorithm> using namespace std; typedef long long ll; const int maxn = 300005; ll a[maxn],b
原创 hdu5361 最短路+並查集
#define _CRT_SECURE_NO_WARNINGS #pragma comment(linker, "/STACK:102400000,102400000") #include <queue> #include <stdio
原创 hdu5289ST表+二分
#include <iostream> #include <cstdio> #include <cstring> #include <queue> #include <map> #include <vector> #include <cm
原创 codeforces 448C 分治
#include<iostream> #include<algorithm> #define INF 0x3f3f3f using namespace std; const int maxn = 5005; int h[maxn];
原创 折半搜索 poj3977
// B subset #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<string.h> #include<map> u
原创 區間修改區間查詢 lazy標記
//區間修改,區間查詢 #define _CRT_SECURE_NO_WARNINGS #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #
原创 線段樹求某值之前或之後與其差值不小於k的最近位置
#include <cstdio> #include <algorithm> #include <cstring> #include <iostream> using namespace std; #define maxn 10000
原创 離散化+線段樹 poj2528
//離散化+線段樹 #include <cstdio> #include <cstring> #include <algorithm> #define CLR(A) memset(A,0,sizeof(A)) using namespa
原创 poj 3714 分治加剪枝
//A #define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <cmath> #include <algorithm> #include<algorithm> using
原创 hdu1878 判斷一個無向圖是否存在歐拉回路模板
#include <iostream> #include<algorithm> #include<bits/stdc++.h> using namespace std; const int N=1001; int n,m,fa[N];
原创 判斷一個圖是不是二分圖
判斷一個圖是否是二分圖 #include<iostream> #include<algorithm> #include<vector> #include<queue> using namespace std; const int N