参考代码:
#include<bits/stdc.h>
using namespace std;
typedef long long ll;
int data[105][105];int main()
{ios::sync_with_stdio(false);int n;cin >> n;for(int i 1; i < n; i){for(int j 1; j < i; j){cin >> data[i][j];}}int…
思路: 这道题一开始想复杂了,其实这么小的数据量直接暴力求解即可。
参考代码:
#include<bits/stdc.h>
using namespace std;
typedef long long ll;
int m 30, n 50;bool checkL(int x, int y) //判断坐标是否超出边界
{if(x &g…
#include<bits/stdc.h>
using namespace std;
typedef long long ll;
ll n, k;
vector<ll> width, height;bool check(ll length) //判断边长为length的正方形都否满足需求
{ll sum 0; //记录能切成的最大方块数 for(int i 0; i < n; i){sum (width[i] / …