hdu 4414 Finding crosses】的更多相关文章

题目:http://acm.hdu.edu.cn/showproblem.php?pid=4414 CSUST:点击打开链接 Finding crosses Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 729    Accepted Submission(s): 411 Problem Description The Nazca L…
题目链接:hdu 4414 其实是一道简单的字符型水题,不涉及任何算法,可比赛时却没能做出来,这几天的状态都差到家了... 题目大意是求有多少个满足条件的十字架,十字架的边不能有分叉路口,所以枚举每个点看是否满足条件就行,只是编码量的问题而已(感觉自己的码力不断下降了,我也不知道该怎么办好..) #include<cstdio> #include<cstring> #include<algorithm> using namespace std; ][]; int n;…
Problem Description The Nazca Lines are a series of ancient geoglyphs located in the Nazca Desert in southern Peru. They were designated as a UNESCO World Heritage Site in 1994. The high, arid plateau stretches more than 80 kilometres (50 mi) between…
题意:在N*N的图中,找出孤立存在的十字架的个数.十字架要求为正十字,孤立表示组成十字架的‘#的周围的一格再无’#‘. dfs找出在中心的‘#’(周围四格也为‘#'),则缩小了搜索范围,再bfs找出是否是符合要求. #include <cstdio> #include <iostream> #include <cmath> #include <cstring> #include <algorithm> using namespace std; c…
Finding crosses Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1631 Accepted Submission(s): 868 Problem Description The Nazca Lines are a series of ancient geoglyphs located in the Nazca Desert i…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4414 直接暴力判断即可. //STATUS:C++_AC_15MS_232KB #include <functional> #include <algorithm> #include <iostream> //#include <ext/rope> #include <fstream> #include <sstream> #includ…
转载请注明出处,谢谢http://blog.csdn.net/ACM_cxlove?viewmode=contents    by---cxlove 题意:给出一个压缩后的串,以及一个模式串,问模式串出现了多少次. http://acm.hdu.edu.cn/showproblem.php?pid=4668 这种压缩形式的话,在去年金华邀请赛中出现过,但是那题的范围不大. 直接展开作多串匹配,暴力AC自动机就行. 但是这题的原串不大,但是展开后会非常大. 可以发现压缩串把原串分为一个个区间,那么…
#include <cstdio> #include <cstring> #include <iostream> #include <cmath> #include <algorithm> #include <queue> #include <vector> using namespace std; ; ; const int INF = 0x3f3f3f; char G[maxn][maxn]; bool vis[max…
题意:n家旅店,每个旅店都有坐标x,y,每晚价钱z,m个客人,坐标x,y,钱c,问你每个客人最近且能住进去(非花最少钱)的旅店,一样近的选排名靠前的. 思路:KD树模板题 代码: #include<set> #include<map> #include<stack> #include<cmath> #include<queue> #include<vector> #include<cstdio> #include<c…
Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 889    Accepted Submission(s): 290 Problem Description A group of K friends is going to see a movie. However, they are too late to get good ticket…