dfs
Cruiying
这个作者很懒,什么都没留下…
展开
-
桂林电子科技大学第三届ACM程序设计竞赛 J题
链接:https://ac.nowcoder.com/acm/contest/558/J 来源:牛客网 小猫在研究网格图。 小猫在研究联通性。 给定一张N×M的网格图,只含字符0和1,问1形成的联通块有多少个。 两个1是联通的,当且仅当其中一个位于另一个的上、下、左、右四个方向之一。 思路:dfs水题,判断联通块的数量 #include <bits/stdc++.h> using...原创 2019-04-16 20:56:05 · 177 阅读 · 0 评论 -
CF 982C
C. Cut 'em all! time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You’re given a tree with n vertices. Your task is to determine the maximum poss...原创 2019-12-07 08:46:14 · 295 阅读 · 0 评论