C ++ Program to implement the above approach
#include <bits/stdc++.h> NEW_LINE #define ll  long long NEW_LINE using namespace std ; const int mod = ( int ) 1e9 + 7 ; bool comp ( ll a , ll b ) { if ( a > b ) return true ; else return false ; }