随笔分类 -  算法与数据结构

摘要:// 0.1背包求解.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> #define N 5 #define ST 10 using namespace std; int main() { //给定n个重量,价值为不同的 阅读全文
posted @ 2016-02-26 13:42 白衣秀才 阅读(2567) 评论(0) 推荐(0) 编辑
摘要:sloves: package BackPack; public class Solves { public int[] DecimaltoBinary(int n,int m) { int r;//求余数 int consult=1;//求商 int j = 0; int []arr=new in 阅读全文
posted @ 2016-02-26 13:42 白衣秀才 阅读(1672) 评论(0) 推荐(0) 编辑
摘要:// KMP.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> using namespace std; int BF(char S[], char T[]) { int i=0, j=0; int index = 0; w 阅读全文
posted @ 2016-02-26 13:40 白衣秀才 阅读(156) 评论(0) 推荐(0) 编辑
摘要:#include"stdafx.h" #include<iostream> #include<cmath> #define TRUE 1 #define FALSE 0 using namespace std; typedef struct Node//坐标点 { double x; double 阅读全文
posted @ 2016-02-26 13:38 白衣秀才 阅读(1595) 评论(0) 推荐(0) 编辑
摘要:// 最大子段和.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> using namespace std; int MaxSum_test(int v[], int l, int r) { int k,sum = 0; i 阅读全文
posted @ 2016-02-26 13:37 白衣秀才 阅读(1141) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示