本题题意:在一个矩阵中,去随机一点,设定一个步数K,求出从这个点可以走到的范围的和,求最大值 思路:这个范围的和是一个菱形,我们把他旋转45°,然后成为一个正放的矩阵,求出二维前缀和 然后用前缀和的性质枚举每一块矩阵的大小,更新答案 #include<cstdio> #include<algorithm> using namespace std; ; int a[maxn][maxn]; ][maxn*]; int main() { int n,m,k,x,y,xl,yl,xr,y…
题目链接:HDU 1700 Problem Description There is a cycle with its center on the origin. Now give you a point on the cycle, you are to find out the other two points on it, to maximize the sum of the distance between each other you may assume that the radius…