首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
2517专题
HDU 2517 棋盘分割(DP)
思路:dp[n][x1][y1][x2][y2],表示还剩n刀可以切,当前矩形位置为左上角(x1,y1), 右下角(x2,y2), 然后把公式转化下,其实就是求平方和最小 代码: #include <cstdio>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const i
阅读更多...