hiho week 72 register

Ended

Participants:370

Verdict:Accepted
Score:100 / 100
Submitted:2015-11-17 20:16:32

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 <cstring>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
using namespace std;
#define maxn 100100
int n,m,h,r;
int arr[maxn];
int findmax()
{
    for(int i=n-1;i>=0;i--)
    {
        if(arr[i]<=r)
        {
            return i;
        }
    }
    return -1;
}
int main()
{
    cin>>n>>m>>h>>r;
    int num=0;
    while(n--)
    {
        scanf("%d",arr+num);
        if(arr[num]<=h+r-1)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX