自定义博客皮肤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)
  • 收藏
  • 关注

原创 DFS(联通块)-P1162 填涂颜色

DFS(联通块)-P1162 填涂颜色题目:题目描述由数字00组成的方阵中,有一任意形状闭合圈,闭合圈由数字1构成,围圈时只走上下左右4个方向。现要求把闭合圈内的所有空间都填写2.例如:6×6的方阵(n=6),涂色前和涂色后的方阵如下:0 0 0 0 0 00 0 1 1 1 10 1 1 0 0 11 1 0 0 0 11 0 0 0 0 11 1 1 1 1 1输入格式每...

2019-12-17 00:46:36 194

原创 BFS(三维图)-Dungeon Master POJ - 2251

BFS(三维图)-Dungeon Master POJ - 2251三维图的迷宫问题,其实是个纸老虎,和二维一样,定义三维矩阵再把搜索方向拓展为六个方向即可。题目:You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which ...

2019-12-13 10:57:03 155

原创 BFS-Find a way HDU - 2612

BFS-Find a way HDU - 2612题目:Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki....

2019-12-12 01:45:57 277

原创 BFS-非常可乐 HDU - 1495

BFS-非常可乐 HDU - 1495题目:大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 ...

2019-12-11 00:24:27 146

原创 DFS-Oil Deposits HDU - 1241

DFS-Oil Deposits HDU - 1241一道DFS模板题题目:Oil Deposits HDU - 1241The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectang...

2019-12-10 00:10:19 125

原创 BFS+输出路径-迷宫问题 POJ - 3984

BFS+输出路径-迷宫问题 POJ - 3984一道基本的模板题目:①难点在于路径记录。②整个写好后编号细节问题还是卡了我很久。③输出’,'后面要加空格还PE了好几发,好傻的输出。题目:定义一个二维数组:int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0, 1, 1, 1, 0,0, 0, 0,...

2019-12-09 01:36:45 170

原创 BFS+DFS-Fire Game FZU - 2150

BFS+DFS-Fire Game FZU - 2150人生首次一发写完BFS啊啊啊啊!值得纪念的一次题解!题目:Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this bo...

2019-12-08 02:09:34 636

原创 BFS+模拟-Pots POJ - 3414

BFS+模拟-Pots POJ - 3414题目:You are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap;...

2019-12-07 00:40:22 132

原创 模拟-Shuffle'm Up POJ - 3087

模拟-Shuffle’m Up POJ - 3087题目:A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, ea...

2019-12-06 12:56:02 258

原创 BFS-Prime Path POJ - 3126

BFS-Prime Path POJ - 3126The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their office...

2019-12-05 01:26:05 284

原创 小技巧:用文件读写数据

方法一:文件重定向#include <iostream>#include<stdio.h>#include<cstring>#include<cstdio>#define LOCAL//重定向读写数据,提交代码时需要注释掉这条定义using namespace std;int main(){ #ifdef LOCAL ...

2019-12-04 01:42:42 139

原创 BFS-Catch That Cow POJ - 3278(线性BFS模板题)

Catch That Cow POJ - 3278(线性BFS模板题)蓝桥杯校赛打得太菜了555555555菜得实在不忍心去睡来切一道水题一道模板题还是RE到头大,真的是菜比啊题目如下:Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He...

2019-12-02 00:59:08 262

空空如也

空空如也

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

TA关注的人

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