自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

No Program No Life

落寞是岁月的痕迹。

  • 博客(10)
  • 收藏
  • 关注

原创 【POJ1988】Cube Stacking(并查集)

这里附带几道关系并查集题目。 poj1182(食物链):http://poj.org/problem?id=1182 poj1703(Find them, Catch them):http://poj.org/problem?id=1703 poj2492(A Bug’s Life):http://poj.org/problem?id=2492 poj1988(Cub

2016-10-27 22:48:58 403

原创 【POJ3252】Round Numbers(数位DP)

题目链接:http://poj.org/problem?id=3252 题目大意: 如果一个数的二进制表示中0的个数大于等于1的个数,那么这个数是符合条件的。 给你左端点和右端点,问在这区间内符合条件的数有多少。dp[pos][num0][num1] := 第一维表示从高位往低位枚举到pos的位置,第二维表示二进制中0的个数,第三维表示二进制中1的个数,结果为满足条件的

2016-10-26 21:39:36 235

原创 【POJ3279】Fliptile(开关问题)

挑战程序设计书上的代码。#pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cstdlib> #inclu

2016-10-23 17:27:20 295

原创 【POJ2251】Dungeon Master(bfs)

简单的bfs求最短路径。 二维的相信都会。 这题是三维的,只是多加了两个操作。其他都一样。#pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <al

2016-10-22 13:16:25 274

原创 【POJ1321】棋盘问题(简单dfs)

之前搜索的题目接触的少。。现在多练练。。 这题的搜索很经典。#pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <algorithm> #inclu

2016-10-22 11:25:22 307

原创 【POJ1426】Find The Multiple(搜索+打表)

BFS加打表水过。。#pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cstdlib> #include

2016-10-21 21:18:19 320

原创 【POJ1753】Flip Game(位压缩+bfs)

PS:对于位压缩接触不是很多,继续学习~#pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cstdlib

2016-10-21 20:15:56 333

原创 【POJ3414】Pots(BFS)

就是把操作用string保存。#pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cstdlib> #in

2016-10-21 20:06:37 221

原创 未完成~【POJ搜索】

poj3414 http://poj.org/problem?id=3414 题目大意: 有两个容量为A,B的罐,有三种操作(实际上有六种),问能否使得其中的一个罐装满C容量。

2016-10-21 20:02:39 270

原创 Codeforces Round #374 (Div. 2)

A,B水题。 C. Journey 题目大意: 给你N个点M条边的DAG,有T的时间限制.接下来M行(u,v,t)代表从u到v的时间为t。你站在1点 ,问到n点,不超过T时间最多走过几个点,并输出路径。跟拓扑排序很像,加上dp。 dp[i][j] := 站在i点,走过j个点的最短时间。 显然dp[i][j] = min(dp[i][j] + t[i],dp[to[i

2016-10-01 12:23:22 308

空空如也

空空如也

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

TA关注的人

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