当前位置:网站首页>【学习笔记】图论思维题
【学习笔记】图论思维题
2022-07-23 03:39:00 【仰望星空的蚂蚁】
连锁反应(chain)
- 万物皆可构造
乱搞 - 显然可以分连通块考虑
- 如果这个连通块能被分成两个内部没有连边的集合 X X X, Y Y Y,并且只存在 X → Y X\to Y X→Y的边,那么显然不能生成新的边
- 如果我能构造出三个内部没有连边的集合 X X X, Y Y Y, Z Z Z,并且只存在 X → Y X\to Y X→Y, Y → Z Y\to Z Y→Z, Z → X Z\to X Z→X的边,那么显然 X , Y , Z X,Y,Z X,Y,Z会保持内部的独立性,并且最终边数为 ∣ X ∣ ∣ Y ∣ + ∣ Y ∣ ∣ Z ∣ + ∣ X ∣ ∣ Z ∣ |X||Y|+|Y||Z|+|X||Z| ∣X∣∣Y∣+∣Y∣∣Z∣+∣X∣∣Z∣
- 如果我构造不出来那么这个连通块就是一个完全图
- 为了方便,可以在无向图的背景下构造
- 复杂度 O ( n + m ) O(n+m) O(n+m)
边栏推荐
- 华泰证券网上开户安全吗是真的吗
- Anaconda source change and opencv installation
- Normal form and anti normal form
- 自组织是管理者和成员的双向奔赴
- 30行自己写并发工具类(Semaphore, CyclicBarrier, CountDownLatch)是什么体验?
- What is the experience of writing concurrent tool classes (semaphore, cyclicbarrier, countdownlatch) by yourself in line 30?
- leetcode 1074. Number of Submatrices That Sum to Target(和为target的子矩阵个数)
- 如何在OneFlow中新增算子
- Airtest脚本的点击位置与点击偏移
- [C language foundation] 16 variable array (array length can be extended)
猜你喜欢

leetcode-99.恢复二叉搜索树

软考 系统架构设计师 简明教程 | 逆向工程

专题训练-链表

error MSB4181: “QtRunWork”任务返回了 false,但未记录错误

redis分片集群如何搭建与使用

Leetcode 1074. number of submatrices that sum to target

金仓数据库 KingbaseES SQL 语言参考手册 (8. 函数(九))

Seven sorts -- detailed explanation of ten thousand words

EasyCVR新版本(v2.5.0)目录分级功能如何使用?

Qt报错:错误 C2039 “Value“: 不是 “`global namespace‘“ 的成员
随机推荐
C language -- several classic exercises of C language
数据中台、BI业务访谈(三):如何选择合适的访谈对象
浏览器怎么导入导出|删除书签,方法步骤来咯
Transfer software testing salary 10K | there is food in the hand and a bottom in the heart, which is the truth at all times
Airtest脚本的点击位置与点击偏移
时间序列-数据集:电力变压器数据集 (ETDataset)
Target detection XML file to achieve mixup data enhancement (modifying the file path can be used directly, which is very convenient)
深入理解MVCC与BufferPool缓存机制
Decompile the jar package / class file / modify the jar package using the decompile plug-in of idea
【循环语句】
专题训练-链表
EasyCVR平台CGO回放回调参数缺失导致设备录像无法播放,该如何解决?
Leetcode 1074. number of submatrices that sum to target
指针的底层机制
软考 系统架构设计师 简明教程 | 需求工程
These four key technologies are necessary to realize the unified management of urban governance through one network
60 open-ended test questions, recite them and get a pay rise directly
金仓数据库 KingbaseES SQL 语言参考手册 (8. 函数(七))
Undo log日志详解
Error msb4181: the "qtrunwork" task returned false, but no error was recorded