• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






Baudelaire

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2021年4月3日

P5194 [USACO05DEC]Scales S(这个剪枝还没看懂
摘要: #include <iostream> #include <algorithm> //所以说题目中的第三个砝码以及之后的砝码必是前面两个砝码之和之大为前置条件 //没必要自己弄 using namespace std; const int M = 1e3 + 1; long long sum[M], 阅读全文
posted @ 2021-04-03 15:45 Baudelaire 阅读(97) 评论(0) 推荐(0)
 
UVA572 油田 Oil Deposits(BFS复习)
摘要: #include <iostream> #include <set> #include <vector> #include <cmath> #include <cstdio> #include <cstring> #include <algorithm> #include <queue> #defi 阅读全文
posted @ 2021-04-03 14:29 Baudelaire 阅读(75) 评论(0) 推荐(0)
 
P1294 高手去散步 (基础模板)
摘要: #include <iostream> #include <set> #include <vector> #include <cmath> #include <cstdio> #include <cstring> #include <algorithm> #include <queue> #incl 阅读全文
posted @ 2021-04-03 14:05 Baudelaire 阅读(86) 评论(0) 推荐(0)
 
八皇后问题(dfs)(回溯)
摘要: //思路:采用一维的方式//搜索每一行,从左到右,逐个查看其是否符合于当前的规范//对于一个二维的空间图,一个位置上,对角线上的坐标,x+y等于一个定值//或者x-y+n会是一个定值#include <iostream> #include <set> #include <vector> #inclu 阅读全文
posted @ 2021-04-03 13:23 Baudelaire 阅读(78) 评论(0) 推荐(0)
 
P1747 好奇怪的游戏(结构体化,bfs)
摘要: //这道题学到了如何结构体化,把变量强行转变成一个结构体并推入队列中//两个变量的化,可以采用make_pair的方式//一开始想用暴搜,但是暴搜情况下,回溯会影响最短路//一般情况下,求最短路的时候,都用bfs,而非dfs//这题还有个隐性条件就是不能越界,棋盘就那么大#include <iost 阅读全文
posted @ 2021-04-03 10:51 Baudelaire 阅读(110) 评论(0) 推荐(0)