摘要:
#include #include #include #include #include #include #include //using namespace std;struct type { float javabean,food; float leve;}num[1010];int cmp(const void *x, const void *y){ return (*(type *)x)... 阅读全文
posted @ 2015-01-29 11:49
sober_reflection
阅读(106)
评论(0)
推荐(0)
摘要:
/****************************************************二分图匹配(匈牙利算法的DFS实现)INIT:g[][]两边定点划分的情况CALL:res=hungary();输出最大匹配数优点:适于稠密图,DFS找增广路快,实现简洁易于理解时间复杂度:O(VE);适用范围:二分图的 最小顶点覆盖 ==== 最大匹配DAG图的 最小路径覆盖数 == 节点数... 阅读全文
posted @ 2015-01-29 11:49
sober_reflection
阅读(207)
评论(0)
推荐(0)
摘要:
#include #include using namespace std;#define MAX 10000int num[MAX], n;/***********************************************************************************************经典的O(n^2)的动态规划算法,设num[i]表示序列中的第i个... 阅读全文
posted @ 2015-01-29 11:47
sober_reflection
阅读(143)
评论(0)
推荐(0)
摘要:
#include using namespace std;//拉格朗日插值求解方程double * xs; //all input xdouble * ys; //all input yint n; //size//1.1275 1.1503 1.1735 1.1972//0.1191 0.13954 0.15932 0.17903//1.130void init(){ c... 阅读全文
posted @ 2015-01-29 11:47
sober_reflection
阅读(364)
评论(0)
推荐(0)
摘要:
#include using namespace std;//牛顿插值求解多项式double * xs; //all input xdouble * ys; //all input yint n; //size//1 2 3 4//0 -5 -6 3//1.5//-2.625void init(){ cout > n; xs = new double[n]; y... 阅读全文
posted @ 2015-01-29 11:46
sober_reflection
阅读(413)
评论(0)
推荐(0)
摘要:
#include #include using namespace std;void print_value(int a[][110],int N){ for(int row=1; row>a[row][line];}int main(){ int N; cin>>N; int value[110][110]={0}; print_value(value,N); for(int i=N; i>=1... 阅读全文
posted @ 2015-01-29 11:45
sober_reflection
阅读(86)
评论(0)
推荐(0)
摘要:
#include #include #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define OVERFLOW -2#define LIST_INIT_SI... 阅读全文
posted @ 2015-01-29 11:43
sober_reflection
阅读(151)
评论(0)
推荐(0)
摘要:
#include #include //use recurrence way to find most biggest total using namespace std;int sum=0;void print_value(int a[][110],int N) //printf the number { for(int row=1; row>a[row][line];}void s... 阅读全文
posted @ 2015-01-29 11:43
sober_reflection
阅读(159)
评论(0)
推荐(0)
摘要:
#include int father[50050];void initializtion(int n){ for(int i=0; iN || c>N) {mistake++; continue;} if(a==1) { if(find(b, c) ) mistake ++; } if(a==2) { if(b==c) mistake++; else... 阅读全文
posted @ 2015-01-29 11:41
sober_reflection
阅读(122)
评论(0)
推荐(0)
摘要:
#include #include #include #include #include using namespace std;int cmp(const string p,const string q){ return p.length()> str[i]; sort(str, str+n, cmp); int length = str[0].length(); int... 阅读全文
posted @ 2015-01-29 11:40
sober_reflection
阅读(121)
评论(0)
推荐(0)