随笔分类 -  并查集

摘要:E - Networking You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a 阅读全文
posted @ 2023-02-22 22:26 Keith- 阅读(22) 评论(0) 推荐(0) 编辑
摘要:D - Equals Problem Statement We have a permutation of the integers from 1 throughN,p1,p2,..,pN. We also have M pairs of two integers betwe 阅读全文
posted @ 2023-02-22 21:56 Keith- 阅读(18) 评论(0) 推荐(0) 编辑
摘要:C - The Suspects 2019冠状病毒病(英语:Coronavirus disease 2019,缩写:COVID-19 ),是一种由严重急性呼吸系统综合症冠状病毒2型(缩写:SARS-CoV-2)引发的传染病。此病在全球各国大规模爆发并急速扩散,成为人类历史上致死人数最多的流行病之一。 阅读全文
posted @ 2023-02-22 21:37 Keith- 阅读(15) 评论(0) 推荐(0) 编辑
摘要:B - Learning Languages 原题链接 思路 由于可以传译,所以可以将共同语言(包括传译)者视为一个集合(合并),最后查询总共集合数-1就是答案 注意 特判:有可能有公司所有人一种语言都不会,而答案不应为-1,所以需要特判 代码 点击查看代码 #include<iostream> # 阅读全文
posted @ 2023-02-19 00:41 Keith- 阅读(27) 评论(0) 推荐(0) 编辑
摘要:A - 并查集 思路 模板 注意 01串的处理 代码 点击查看代码 #include<iostream> using namespace std; #define X first #define Y second typedef pair<int,int> pii; typedef long lon 阅读全文
posted @ 2023-02-19 00:35 Keith- 阅读(29) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示