hiho week 64 register

Ended

Participants:874

Verdict:Accepted
Score:100 / 100
Submitted:2015-09-19 22:57:29

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#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;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX