#include using namespace std; vector costlyIntervals(long long int n, long long int k, vector a) { // Return a list of length n consisting of the answers long long int x; //long long int cost[n][n][2]; long long int c1,c2,c3,c4; //vector > > arr; vector res(n); for(long long int i=0;i=k){ //cout<> n >> k; vector A(n); for(long long int A_i = 0; A_i < n; A_i++){ cin >> A[A_i]; } vector result = costlyIntervals(n, k, A); for (ssize_t i = 0; i < result.size(); i++) { cout << result[i] << (i != result.size() - 1 ? "\n" : ""); } cout << endl; return 0; }