dfs
文章平均质量分 73
ScorpioN___
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
uva1103 Ancient Messages(dfs)
每个象形字中有不同数量的空白区域,因此寻找象形字中的空白区域,根据空白区域的数量来判断是哪个象形文字 ,最后#includeusing namespace std;int map1[250][250];int h,w;string s;int dir[4][2]={-1,0,0,1,1,0,0,-1};int cnt;void dfs(int x,int y){ if(m原创 2016-11-04 13:19:43 · 412 阅读 · 0 评论 -
742 C. Arpa's loud Owf and Mehrdad's evil plan codeforces
思路:在这个集合中找到一共有多少的环,如果环中元素个数为奇数,则不变,为偶数,则除以2,最后求出所有环的最小公倍数。#includeusing namespace std;int pre[105],n,num;bool visit[105];void dfs(int x,int now){ if(visit[now]) { num=-1;原创 2016-12-27 22:07:26 · 536 阅读 · 0 评论
分享