-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemp.cpp
More file actions
48 lines (31 loc) · 743 Bytes
/
Copy pathtemp.cpp
File metadata and controls
48 lines (31 loc) · 743 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
ifstream yyy("input.txt");
ofstream zzz("output.txt");
// } Driver Code Ends
void max_of_subarrays(int *arr, int n, int k){
int totalIteration = n - k + 1;
vector<int>array;
stack<int>auxStack;
stack<int>mainStack;
for(int i = 0; i< array.size(); i++)
{
zzz << array[i] << ' ';
}
}
// { Driver Code Starts.
int main() {
int t;
yyy >> t;
while(t--){
int n, k;
yyy >> n >> k;
int arr[n];
for(int i = 0;i<n;i++)
yyy >> arr[i];
max_of_subarrays(arr, n, k);
zzz << endl;
}
return 0;
} // } Driver Code Ends