题目链接
题目描述
Given a matrix of size n×m and an integerk, where A i,j=lcm(i,j), the least common multiple of i and j. You should determine the sum of the maximums among all k×k submatrices.
输入描述
Only one line containing three integers n,m,k(1≤n,m≤5000,1≤k≤min{n,m}).
输出描述
Only one line containing one integer, denoting the answer.
样例输入
3 4 2
样例输出
38
说明
题解
给定大小为n×m的矩阵和整数k,其中A {i,j} =lcm(i,j),是i和j的最小公倍数。找到所有大小为k×k的子矩阵中的最大值之和。下面是官方题解: