hiho week 193 register

Ended

Participants:256

Verdict:Accepted
Score:100 / 100
Submitted:2018-03-17 00:57:55

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<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
#include<set>
using namespace std;
int n, m, l;
const int maxn = 1000 + 5;
int buckets[maxn];
int buck[maxn];
int headPri[maxn];
int arr[maxn];
int maxPanel = -1;
//int appearance[100000005];
int mark[maxn];
int maxNum;
int minNum;
bool doTest(int standard) {
    int cnt = 0;
    for (int i = 0; i < n; ++i) {
        if (buckets[i] < standard) {
            ++cnt;
        }
    }
    if (cnt > l * m) {
        return false;
    }
    memset(headPri, 0, sizeof(headPri));
    for (int i = 0; i < n; ++i) {
        int cur = 0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX