- 博客(108)
- 收藏
- 关注
原创 14997: [Usaco2017 Feb]Why Did the Cow Cross the Road III
题目描述了一个农场地图问题,地图以N×N的网格形式展现,其中一些相邻格子之间由道路分隔。问题要求计算K头分布在不同格子上的牛中,“遥远”对的数量,即至少需要跨越一条道路才能相遇的牛对数。•我们可以想象一个初始状态,每个格子都能与其上、下、左、右四个方向的格子自由通行(除非有道路阻隔)。•根据输入的R条道路信息,对相应的网格格子间的连通性进行调整。例如,如果输入表示在(2,2)和(2,3)间有一条路,那么在并查集中,这两格应当被视为不再直接连通。如果是,说明这对牛至少需要经过一次道路才能见面,因此计数加一。
2024-10-05 10:30:15
1068
4
原创 14993: [Usaco2017 Feb]Why Did the Cow Cross the Road II
【代码】14993: [Usaco2017 Feb]Why Did the Cow Cross the Road II。
2024-09-27 19:13:49
198
原创 14992: [Usaco2017 Feb]Why Did the Cow Cross the Road
【代码】14992: [Usaco2017 Feb]Why Did the Cow Cross the Road。
2024-09-27 19:13:03
171
原创 14991: [Usaco2017 Feb]Why Did the Cow Cross the Road III
【代码】14991: [Usaco2017 Feb]Why Did the Cow Cross the Road III。
2024-09-27 19:12:19
104
原创 14990: [Usaco2017 Feb]Why Did the Cow Cross the Road II
【代码】14990: [Usaco2017 Feb]Why Did the Cow Cross the Road II。
2024-09-27 19:11:41
119
原创 14989: [Usaco2017 Feb]Why Did the Cow Cross the Road
【代码】14989: [Usaco2017 Feb]Why Did the Cow Cross the Road。
2024-09-27 19:11:03
105
原创 ↯14321:queue2
n 个沙茶,被编号 1~n。排完队之后,每个沙茶希望,自己的相邻的两人只要无一个人的编号和自己的编号相差为 1(+1 或-1)就行;现在想知道,存在多少方案满足沙茶们如此不苛刻的条件。用了一个专属符号,你们可以想象我对这题有多重视。
2024-08-27 09:34:31
211
3
原创 11511:[POI2006]OKR-Periods of Words
【代码】11511:[POI2006]OKR-Periods of Words。
2024-08-27 09:30:07
317
原创 14800:[Ceoi2015]Ice Hockey World Championship
【代码】14800:[Ceoi2015]Ice Hockey World Championship。
2024-08-23 08:18:54
315
原创 13212:Pku3468 A Simple Problem with Integers
【代码】13212:Pku3468 A Simple Problem with Integers。
2024-08-23 08:09:28
249
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人