自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 资源 (1)
  • 收藏
  • 关注

原创 0/1 背包 dp问题

//20160126//0/1背包 //W 能装下的重量//w 该物品的重量//v 该物品的价值 #include#include using namespace std;#define MAX_N 101int n;pair object[MAX_N];//first=w,second=vint W;int dp[MAX_N][MAX_N];int rec(in

2016-01-26 22:21:10 431

原创 MATLAB Floyd算法求最短路

在该算法中,我们用邻接矩阵的形式来存储该图。因为在本次建模过程中,我们已经把数据输入到excel中,而matlab是可以编程来读取excel和写入excel的。若你的图的邻接矩阵在txt中,也可以直接将txt拖入excel中读取。n表示维数w表示该图邻接矩阵clcclearn=32;[w,txt,raw]=xlsread('E:\w.xls');w(

2016-01-26 17:14:56 15347 2

原创 matlab 灰色系统预测 GM(1,1) 数学建模

本文代码主要是基于邓聚龙教授在20实际80年代提出的灰色系统理论。GM0.m%该函数为GM(1,1)模型返回还原值 function f=GM0(x0,t) %数据数列 [M,N]=size(x0); %算出数据数列的大小 x1(1)=x0(1); %累加生成数列 for i=2:N; x1(i)=x1(i-1

2016-01-26 17:01:23 10652

原创 POJ 3253 Fence Repair

DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer len

2016-01-12 00:34:13 353

原创 POJ 3069 Saruman's Army

Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6118 Accepted: 3120DescriptionSaruman the White must lead his army along a straight path from Isengard to Helm’s

2016-01-10 18:37:12 176

原创 POJ 3617 Best Cow Lin

DescriptionFJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the judges.T

2016-01-09 09:38:23 303

原创 简单贪心 区间调度问题

有n项工作,每项工作分别在si时间开始,在ti时间结束。对于每项工作,你都可以选择 参与与否 ,如果选择了参与,那么自始至终都必须全程参加。此外,参与工作的时间段 不能重叠(即使是开始的瞬间和结束的瞬间的重叠也是不允许的) 。 限制 00输入5 1 2 4 6 8 3 5 7 9 10输出 3按照结束时间排序即可#in

2016-01-09 09:35:39 469

原创 BFS 迷宫的最短路径

迷宫的最短路径给定一个大小为N*M的迷宫。迷宫由通道和墙壁组成,每一步可以 向邻接的上下左右四个方位的通道移动,请求出从起点到终点所需的最小不熟。此题假设一定能从起点到终点限制条件:N,M 样例:输入:10 10#S######.#......#..#.#.##.##.#.#........##.##.####....#.

2016-01-08 21:52:45 649

原创 POJ 2386 Lake Counting

DescriptionDue to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square contains

2016-01-07 23:29:57 213

原创 DFS 部分和问题

给定整数a1,a2,a3`````an,判断是否可以从中选出若干数,使他们的和恰好为K限制条件: 1-10^8-10^8样例1输入 n=4a={1,2,4,7}k=13输出Yes样例2输入n=4a={1,2,4,7}k=15输出No#includeusing namespace std

2016-01-06 23:40:06 334

原创 POJ 1852 Ants

Time Limit: 1000MS Memory Limit: 30000KTotal Submissions: 13089 Accepted: 5736DescriptionAn army of ants walk on a horizontal pole of length l cm, each with a constant spee

2016-01-06 22:46:58 256

原创 HDOJ 1010 Tempter of the Bone

Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He

2016-01-01 21:27:00 281

2009-2018 计算机考研408历年真题

考研历年真题,帮助考生考上理想的学校。

2018-12-09

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除