随笔分类 -  搜索_DFS

摘要:A New Year and Counting Cards 题目链接: http://codeforces.com/contest/908/problem/A 思路: 如果卡片上面是数字,如果是奇数,就需要检查一下。如果是字母,如果是原音字母,需要检查一下。 代码: #include <bits/s 阅读全文
posted @ 2018-01-04 11:58 lemonsbiscuit 阅读(390) 评论(0) 推荐(0)
摘要:893C Rumor 思路: 前向星+DFS 代码: c++ include using namespace std; define _for(i,a,b) for(int i=(a); i n m; _rep(i,1,n) cin w[i]; _rep(i,1,m) { cin u v; add( 阅读全文
posted @ 2017-11-26 00:05 lemonsbiscuit 阅读(343) 评论(2) 推荐(0)