http://acm.hdu.edu.cn/showproblem.php?pid=5024 网络赛 Wang Xifeng's Little Plot Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 239 Accepted Submission(s): 156 Problem Description <Dream of the…
思路要开阔些,或者说要转化一下思路,别太死 把每一个点当拐点,爆一边就能够.用记忆化搜索也行.都不会超时 #include<bits/stdc++.h> using namespace std; int n; #define o ans=max(ans, char C[105][105]; int f(int i,int j,int a,int b){ int k=0; while(1){ if(i<0||j<0||i>=n||j>=n||C[i][j]!='.') b…