摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1312题意:就是找从@出发的能经过的'.'的数目。dfs写法:View Code #include<stdio.h>#include<string.h>int col,row;int sx,sy;int sum;int vis[25][25];char map[25][25];void dfs(int x,int y){ if(vis[x-1][y]==0&&map[x-1][y]=='.') { sum++; vis[x-1][y]=1
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1016Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13648Accepted Submission(s): 6220Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1241Oil DepositsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5360Accepted Submission(s): 3092Problem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposi
阅读全文