
搜索dfs
threeh20
暑假有半个月整个人像死了一样,所以更加明白生命的可贵
展开
-
poj 1129 Channel Allocation
which indicates that the repeaters B, C, D and H are adjacent to the repeater A. The first line describes those adjacent to repeater A, the second those adjacent to B, and so on for all of the repeate原创 2017-07-15 21:45:41 · 196 阅读 · 0 评论 -
poj 1639 Picnic Planning(具有限度的最小生成树,挺难)
http://poj.org/problem?id=1639转自https://blog.youkuaiyun.com/u011265346/article/details/42919889#include <cstdio>#include <cstring>#include <algorithm>#include <iostream>#include ...转载 2018-07-15 14:08:01 · 196 阅读 · 0 评论 -
CodeForces 510C Fox And Names
http://codeforces.com/problemset/problem/510/C#include<bits/stdc++.h>using namespace std;int n;int main(){ char a[111][111]; bool vis[33][33]; int ru[33]; int ma[33][33]; int flag=0; wh...原创 2018-05-11 10:34:38 · 200 阅读 · 0 评论 -
CodeForces 510B Fox And Two Dots
http://codeforces.com/problemset/problem/510/B#include<bits/stdc++.h>using namespace std;int flag;int sx,sy; int n,m;char ma[55][55];bool vis[55][55];void dfs(char md,int x,int y,int js){...原创 2018-05-11 10:29:41 · 165 阅读 · 0 评论 -
CodeForces 103B Cthulhu
http://codeforces.com/problemset/problem/103/B找环,一个环#include<bits/stdc++.h>using namespace std;#define ll long longconst int N=511111;int mm[105][105];bool vis[1005];int m,n;void dfs(int ...原创 2018-05-06 16:20:29 · 257 阅读 · 0 评论 -
CodeForces 102A Clothes
http://codeforces.com/problemset/problem/102/A暴力搜索#include<bits/stdc++.h>using namespace std;#define ll long longvector<int> p[1111];bool ma[1111][1111];int v[1111];long long ans;vo...原创 2018-05-04 10:43:11 · 166 阅读 · 0 评论 -
hdu 4403 A very hard Aoshu problem
http://acm.hdu.edu.cn/showproblem.php?pid=4403#include#include#includeusing namespace std;long long int ans=0;char a[22];void dfs(int wz,long long int dq,long long int sav,int op){ if(wz原创 2017-11-11 21:13:44 · 234 阅读 · 0 评论 -
hdu 5952 Counting Cliques
http://acm.split.hdu.edu.cn/showproblem.php?pid=5952#include #include #include #include #include #include #include #includeusing namespace std; vector st[111];b原创 2017-10-14 10:36:50 · 206 阅读 · 0 评论 -
CodeForces 760C Pavel and barbecue
http://codeforces.com/problemset/problem/760/C#includeusing namespace std;int ans;int ans1;int ma[222222];bool vis[222222];void dfs(int x){ if(vis[ma[x]]==1){ a原创 2017-10-14 19:30:05 · 295 阅读 · 0 评论 -
codeforces 884C Bertown Subway
http://codeforces.com/problemset/problem/884/C#include using namespace std;int con=0;long long int ans[111111]; bool vis[111111]; int ma[111111];void dfs(int x,int num原创 2017-10-29 17:24:08 · 474 阅读 · 0 评论 -
hdu 5971 Wrestling Match
http://acm.hdu.edu.cn/showproblem.php?pid=5971#include#include#include#include#include#include #include#includeusing namespace std;int n,m,x,y;vectorma[1111];in原创 2017-09-29 21:52:54 · 231 阅读 · 0 评论 -
hdu 1426 Sudoku Killer
Sudoku KillerTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8125 Accepted Submission(s): 2507Problem Description自从2006年3月10日至11日原创 2017-07-19 12:43:04 · 246 阅读 · 0 评论 -
hdu2952 Counting Sheep
Counting Sheep Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 49 Accepted Submission(s) : 38Font: Times New Roman | Verdana | Georgia F原创 2017-07-15 20:29:51 · 268 阅读 · 0 评论 -
hdu 1258 Sum It Up
Sum It Up Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 49 Accepted Submission(s) : 33Font: Times New Roman | Verdana | Georgia Font S原创 2017-07-15 20:30:46 · 211 阅读 · 0 评论 -
hdu1518 Square
Square Time Limit : 10000/5000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 154 Accepted Submission(s) : 57Font: Times New Roman | Verdana | Georgia Font Si原创 2017-07-15 20:31:50 · 345 阅读 · 0 评论 -
hdu 1501 Zipper
Zipper Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 96 Accepted Submission(s) : 42Font: Times New Roman | Verdana | Georgia Font Size原创 2017-07-15 20:42:29 · 176 阅读 · 0 评论 -
hdu 2181 哈密顿绕行世界问题
哈密顿绕行世界问题 Time Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 82 Accepted Submission(s) : 44Font: Times New Roman | Verdana | Georgia Font S原创 2017-07-15 20:46:22 · 225 阅读 · 0 评论 -
csu 1562 Fun House
1562: Fun HouseSubmit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 498 Solved: 176 DescriptionAmerican Carnival Makers Inc. (ACM) has a l原创 2017-07-29 21:11:00 · 359 阅读 · 0 评论 -
牛客国庆集训派对Day3 J Graph Coloring(dfs)
https://www.nowcoder.com/acm/contest/203/J 分开来看,第一个问题很简单,知道染色发现冲突即可。对于第二个问题就是一个dfs找奇数环即可。 #include<bits/stdc++.h>using namespace std;const int maxn=3e5+10;vector<int>e[...原创 2018-10-12 20:41:00 · 140 阅读 · 0 评论