自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

XD

为了将来,拼了!~

  • 博客(5)
  • 资源 (1)
  • 问答 (1)
  • 收藏
  • 关注

原创 Uva572——Oil Deposits

数油田的个数,简单的DFS。 代码: #include #include using namespace std; const int maxn = 100 + 5; int num[maxn][maxn]; char str[maxn][maxn]; int m, n; void dfs(int x, int y) { if(num[x][y] != 0 || str[x][y]

2016-02-29 22:04:00 346

原创 Uva297——Quadtrees

#include #include #include using namespace std; const int len = 32; const int maxn = 1024 + 6; int buff[len][len], count; char s[maxn]; void fun(char *str, int& pos, int r, int c, int w) { cha

2016-02-28 17:23:19 285

原创 Uva699——The falling leaves

输入的二叉树是先序遍历的形式,只是加上了各个叶子节点的左右孩子,都为-1. 在递归的过程中算出水平位置的权值。(水平位置的权值,可以通过+1(右边节点)或者-1(左边节点) 来对应) 代码: #include #include using namespace std; const int maxn = 10000 + 10; int sum[maxn]; void build

2016-02-28 16:29:49 323

原创 Uva839——Not so Mobile

判断天平是否平衡,W1 或 W2 为0,表示为子天平。递归过程中来输入并判断。 代码: #include using namespace std; bool fun(int& n) { int a1, b1, a2, b2; bool a = true, b = true; //a表示左是否平衡,b表示右是否平衡 cin >> a1 >> b1 >> a2 >> b2;

2016-02-28 15:04:30 255

原创 Uva548——Tree

这题主要是根据中序遍历和后序变量构造二叉树。 一开始用 的是二叉树的数组表示形式来求解,但是本题的数据量挺大的,数组不能完全表示出来。关键点是这题的所有数都小于10000.所以用两个数组 lch 和rch 来表示权值点的左右孩子的情况。 然后在通过dfs来查找叶子结点到根节点的最小权值的叶子。 代码: #include #include #include #include usin

2016-02-28 14:20:53 493

SkinH_VC。rar

VC换肤库,可以让你的界面焕然一新。支持各种环境,各种开发工具

2015-04-26

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

TA关注的人

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