原创 百度之星B題

#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<string> #include<vector> #include<cm

原创 鄰接表模板

template<int MaxV,int MaxE> class Graph{ public: void Clear(){ pos = 0; CLR(H,-1); } void add(int u,int v,int c){

原创 NYOJ 61 傳紙條(費用流 或 DP)

題目連接:http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=61 這道題目兩種解法,費用流 或

原创 百度之星C題

最大費用最大流 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<string> #include<vector> #in

原创 2013騰訊編程馬拉松初賽第一場(3月21日)小Q系列故事——電梯裏的愛情

題目鏈接:http://acm.hdu.edu.cn/showproblem.php?pid=4505 水題~~ #include<iostream> using namespace std; bool flag[105]; int m