hdu5706-GirlCat】的更多相关文章

GHIJ待补... A.HUD5702:Solving Order Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3550    Accepted Submission(s): 2149 Problem Description Welcome to HDU to take part in the first CCPC girls' co…
GirlCat Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description As a cute girl, Kotori likes playing ``Hide and Seek'' with cats particularly.Under the influence of Kotori, many girls and cats are playing `…
题意:给定一个n*m的矩阵,然后问你里面存在“girl”和“cat”的数量. 析:很简单么,就是普通搜索DFS,很少量.只要每一个字符对上就好,否则就结束. 代码如下: #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream> #include <cstring> #include <set> #i…
As a cute girl, Kotori likes playing ``Hide and Seek'' with cats particularly. Under the influence of Kotori, many girls and cats are playing ``Hide and Seek'' together. Koroti shots a photo. The size of this photo is n×mn×m, each pixel of the photo…
原题链接: 大致题意:给你一个二维字符串,可以看成图:再给两个子串“girl”和“cat”,求图中任意起点开始的不间断连接起来的字母构成的两个子串的分别的个数:连接的方向只有不间断的上下左右. 搜索函数: void dfsgirl(int i, int j,int k); //第一层(i1,j1,  k=0)时,k=0表示(i1,j1)上是g,然后枚举四个方位找到i——进入第二层//第二层(i2,j2,   k=1)时,k=1表示(i2,j2)位置上是字母i(并且该位置与i1,j1相邻,这是为什…