• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ACM s1124yy
守りたいものが 強くさせること
博客园    首页    新随笔    联系   管理     

随笔分类 -  搜索~DFS&BFS

HDU 2586 How far away(dfs+邻接表)

摘要:How far away 【题目链接】 " How far away " 【题目类型】 dfs+邻接表 &题意: 题目大意:一个村子里有n个房子,这n个房子用n 1条路连接起来,接下了有m次询问,每次询问两个房子a,b之间的距离是多少。 &题解: 我以为是LCA的题,但dfs居然也能过,感觉是数据有 阅读全文
posted @ 2017-06-02 14:55 s1124yy 阅读(209) 评论(0) 推荐(0)
Codeforces Round #381 (Div. 2)D. Alyona and a tree(树+二分+dfs)

摘要:D. Alyona and a tree Problem Description: Alyona has a tree with n vertices. The root of the tree is the vertex 1. In each vertex Alyona wrote an posi 阅读全文
posted @ 2016-11-25 22:29 s1124yy 阅读(633) 评论(0) 推荐(0)
Codeforces Round #381 (Div. 2)A. Alyona and copybooks(dfs)

摘要:A. Alyona and copybooks Problem Description: Little girl Alyona is in a shop to buy some copybooks for school. She study four subjects so she wants to 阅读全文
posted @ 2016-11-24 08:40 s1124yy 阅读(587) 评论(3) 推荐(0)
UVa 297 Quadtrees(树的递归)

摘要:Quadtrees 四分树就是一颗一个结点只有4个儿子或者没有儿子的树 【题目链接】 " UVa 297 Quadtrees " 【题目类型】树的递归 &题意: 一个图片,像素是32\ 32,给你两个先序递归的字符串,要你把他俩合起来输出面积。p代表结点,f代表黑色,e代表白色。 &题解: 用字符串 阅读全文
posted @ 2016-09-20 22:46 s1124yy 阅读(371) 评论(0) 推荐(0)
Codeforces Round #368 (Div. 2) D. Persistent Bookcase

摘要:Persistent Bookcase Problem Description: Recently in school Alina has learned what are the persistent data structures: they are data structures that a 阅读全文
posted @ 2016-08-24 19:17 s1124yy 阅读(258) 评论(0) 推荐(0)
POJ 3984 迷宫问题(BFS)

摘要:迷宫问题 迷宫问题 迷宫问题 迷宫问题 Description 定义一个二维数组: 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, 1, 0, }; 它表示一个迷宫,其中的 阅读全文
posted @ 2016-03-17 15:57 s1124yy 阅读(211) 评论(0) 推荐(0)
HDU 2717 Catch That Cow(BFS)

摘要:Catch That Cow Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100 阅读全文
posted @ 2016-03-16 04:44 s1124yy 阅读(137) 评论(0) 推荐(0)

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3