avatar
文章
215
标签
0
分类
1
主页
分类
标签
归档
友链
爱飞鱼的blogtrick——1和2可达性系列
搜索
主页
分类
标签
归档
友链

trick——1和2可达性系列

发表于2023-03-05|更新于2025-03-04|ICPC
|浏览量:

title: trick——1和2可达性系列
categories:
- ICPC
tags:
- null
abbrlink: 9c5a2d2d
date: 2023-03-05 00:00:00

1和2可达性系列

https://codeforces.com/gym/104768/problem/H

image-20240925200434121

https://codeforces.com/contest/1896/problem/D

题源:https://www.luogu.com.cn/problem/P3514

带修改加强:

https://www.luogu.com.cn/problem/P6859

文章作者: WTY
文章链接: https://my-mathmaster-github-io.vercel.app/posts/9c5a2d2d.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 爱飞鱼的blog!
cover of previous post
上一篇
曼哈顿距离与切比雪夫距离
title: 曼哈顿距离与切比雪夫距离categories: - ICPCtags: - nullabbrlink: b4c59b70date: 2023-03-04 00:00:00曼哈顿距离与切比雪夫距离距离 - OI Wiki (oi-wiki.org)已经说的比较清晰,提取要点和结论便于复习使用。 曼哈顿距离:$d \left(\right. A , B \left.\right) = \left|\right. x_{1} - x_{2} \left|\right. + \left|\right. y_{1} - y_{2} \left|\right.$ 切比雪夫距离:$d \left(\right. A , B \left.\right) = max \left(\right. \left|\right. x_{1} - x_{2} \left|\right. , \left|\right. y_{1} - y_{2} \left|\right....
cover of next post
下一篇
二分图
title: 二分图categories: - ICPCtags: - nullabbrlink: 973bc934date: 2023-03-05 00:00:00 染色法判别二分图 —— 模板题 AcWing 860. 染色法判定二分图时间复杂度是 $O(n+m)$, $n$ 表示点数,$m$ 表示边数bool dfs(int u,int c){//判断存在奇环,存在返回true color[u]=c; for(auto v:e[u]){ if(!color[v]){ if(dfs(v,3-c))return 1; } else if(color[v]==c)return 1;//有奇环 } return 0; } bool check() {//判断是不是二分图 fill(color,color+1+n,0); bool flag = true; for (int i = 1; i <= n; i ++...
avatar
WTY
理性思考,和平交流
文章
215
标签
0
分类
1
Follow Me
目录
  1. 1. title: trick——1和2可达性系列categories: - ICPCtags: - nullabbrlink: 9c5a2d2ddate: 2023-03-05 00:00:00
  • 1和2可达性系列
  • 最新文章
    贪心
    贪心2024-12-22
    Z_exkmp
    Z_exkmp2024-12-21
    Codeforces Round 895 (Div. 3)
    Codeforces Round 895 (Div. 3)2024-12-16
    可持久化字典树(Trie)
    可持久化字典树(Trie)2024-12-16
    网格图上问题
    网格图上问题2024-12-15
    ©2022 - 2025 By WTY
    框架 Hexo|主题 Butterfly
    Copyright 爱飞鱼
    搜索
    数据加载中