Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <iostream>#include <cstdio>#include <vector>#include <algorithm>using namespace std;const int N = 1005;struct Sections{vector<int> rows;int minLength;Sections(): minLength(0){}bool operator < (const Sections &sec) const{if (minLength == sec.minLength){return rows.size() < sec.rows.size();}return minLength > sec.minLength;}};struct Panel{vector<Sections> sections;int minLength;};Panel panel[N];bool cmp1 (const int &a, const int &b){return panel[a].minLength > panel[b].minLength;