自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 基础DP总结

1.数塔(1)自顶向下#include <bits/stdc++.h>using namespace std;int dp[105][105] = {0};int main(){ std::ios::sync_with_stdio(0); int i, j, n, ans; cin >> n; for(i = 1; i &l...

2018-08-04 10:48:26 167

原创 POJ1321 - 棋盘问题(简单搜索)

棋盘问题 POJ - 1321在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 ,...

2018-05-28 14:43:22 127

原创 HDU1233 - 还是畅通工程(最小生成树)

还是畅通工程 HDU - 1233某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应...

2018-05-28 14:38:41 151

原创 POJ3268 - Silver Cow Party(最短路)

Silver Cow Party POJ - 3268One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000)...

2018-05-28 14:28:28 162

原创 POJ1797 - Heavy Transportation(最短路)

Heavy Transportation POJ - 1797 题意:给了N个点和M条边,求每条路径中最大边的最小值。#include <iostream>#include <algorithm>#include <cmath>#include <cstdio>#include <cstring>#define inf -1u...

2018-05-28 14:10:45 159

原创 POJ2253 - Frogger(预处理 + 最短路)

Frogger   POJ2253Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full...

2018-05-28 14:03:48 233

原创 POJ2387 - Til the Cows Come Home(Dijkstra 单源最短路)

Til the Cows Come Home (POJ2387)    Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her...

2018-05-26 12:26:39 129

空空如也

空空如也

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

TA关注的人

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