For this Question: Given an array, A of N integers. Find the product of maximum values for every subarray of size K. Print the answer modulo 10<sup>9</sup>+7.
A subarray is any contiguous sequence of elements in an array.The first line contains two integers N and K, denoting the size of the array and the size of the subarray respectively.
The next line contains N integers denoting the elements of the array.

<b>Constarints</b>
1 <= K <= N <= 1000000
1 <= A[i] <= 1000000Print a single integer denoting the product of maximums for every subarray of size K modulo 1000000007Sample Input 1:
6 4
1 5 2 3 6 4

Sample Output 1:
180

<b>Explanation:</b>
For subarray [1, 5, 2, 3], maximum = 5
For subarray [5, 2, 3, 6], maximum = 6
For subarray [2, 3, 6, 4], maximum = 6
Therefore, ans = 5*6*6 = 180, I have written this Solution Code: #include<bits/stdc++.h>
#define int            long long
#define ll             long long
#define pb          push_back
#define    endl        '\n'
#define pii         pair<int,int>
#define vi          vector<int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (int)x.size()
#define hell        1000000007
#define rep(i,a,b)    for(int i=a;i<b;i++)
#define dep(i,a,b)    for(int i=a;i>=b;i--)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
using namespace std;

const int N = 1e6 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;

int a[N];

void solve(){
	int n, k;	
	cin >> n >> k;
	for(int i = 1; i <= n; i++)
		cin >> a[i];
	deque<int> q;
	for(int i = 1; i <= k; i++){
		while(!q.empty() && a[q.back()] <= a[i])
			q.pop_back();
		q.push_back(i);
	}
	int ans = a[q.front()];
	for(int i = k+1; i <= n; i++){
		if(q.front() == i-k)
			q.pop_front();
		while(!q.empty() && a[q.back()] <= a[i])
			q.pop_back();
		q.push_back(i);
		ans = (ans*a[q.front()]) % mod;
	}
	cout << ans;
}
void testcases(){
	int tt = 1; 
	//cin >> tt;
	while(tt--){
		solve();
	}
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

 		clock_t start = clock();
 	

    testcases();


 		cerr << (double)(clock() - start)*1000/CLOCKS_PER_SEC << " ms: ";
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?