For this Question: Rahul is playing a game in which he has to kill a monster in order to win the game. He has N types of weapons available with him having different attack powers and different weights. Rahul can pick a weapon only if it is not heavier than D.
Given the health of the monster H, the attack powers and weights of weapons, what is the minimum number of weapons required in order to kill the monster?

Note:- A weapon can only be used once.First line of input contains three space separated integers N, D and H. 
Second line contains N space separated integers depicting the attack power of each weapon.
Third line of input contains the weight of each weapon.

Constraints:-
1 < = N < = 100000
1 < = D, Weight[i] < = 100000
1 < = H, Power[i] < = 100000000Print the minimum number of weapons required or print -1 if it is impossible to win the game.Sample Input:-
5 5 15
3 8 16 12 6
3 4 10 6 5

Sample Output:-
3

Sample Input:-
5 3 12
3 1 3 6 19
4 5 3 4 8

Sample Output:-
-1, I have written this Solution Code: #include <bits/stdc++.h>


using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))

#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)

#define IN(A, B, C) assert( B <= A && A <= C)

#define MP make_pair
#define FOR(i,a) for(int i=0;i<a;i++)

#define FOR1(i,j,a) for(int i=j;i<a;i++)

#define EB emplace_back

#define INF (int)1e9

#define EPS 1e-9

#define PI 3.1415926535897932384626433832795
#define max1 100001
#define MOD 1000000007

#define read(type) readInt<type>()
#define int long long
#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'

void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
/*
bool check(int A){
    int cnt=0;
FOR(i,n){
if(a[i]<=A){cnt++;}
pre[i]=cnt;
}
int ans;
FOR(i,n){
    if(a[i]>A){
ans=pre[i];
if(i>d){ans-=pre[i-d-1];}
if(i+d<n){ans+=pre[i+d]-pre[i];}
else{ans+=pre[n-1]-pre[i];}
//out1(A);out(ans);
if(ans*A<a[i]){return false;}
}}
return true;
}
*/
signed main(){

    int n,d,h;
    cin>>n>>d>>h;
    int a[n];
    FOR(i,n){cin>>a[i];}
    vector<int> v;
    int x;
    FOR(i,n){
    cin>>x;
    if(x<=d){v.EB(a[i]);}
    }
    sort(v.begin(),v.end());
    int sum=0;
    for(int i=v.size()-1;i>=0;i--){
        sum+=v[i];
        if(sum>=h){out(v.size()-i);return 0;}
    }
    out(-1);


}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?