hiho week 148 register

Ended

Participants:382

Verdict:Accepted
Score:100 / 100
Submitted:2017-04-30 11:06:23

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<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstring>
#include<map>
#include<set>
#include<list>
#include<queue>
#include<stack>
#include<unordered_map>
#include<bitset>
typedef long long LL;
typedef long L;
using namespace std;
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) <(b) ? (a) : (b))
#define INF 1000000000
int N, P, W, H;
int a[1007];
int check(int S) {
    int perline = W / S;
    int perpage = H / S;
    int maxline = perpage*P;
    int lines = 0;
    for (int i = 1; i <= N; i++)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX