#include <algorithm>
#include <iostream>
#include <utility>
#include <vector>

using namespace std;

int main() {
	const vector<pair<int, int>> intervals = { { 1, 3 },{ 7, 9 },{ 13, 13 } };
	std::vector<double> values = { 4.2, 6.4, 2.3, 3.4, 9.1, 2.3, 0.6, 1.2, 0.3, 0.4, 6.4, 3.6, 1.4, 2.5, 7.5 };
	size_t write = 0U;
	auto it = cbegin(intervals);

	values.resize(distance(begin(values), remove_if(begin(values), end(values), [i = 0U, it = cbegin(intervals), end = cend(intervals)](const auto&) mutable { return it != end && ++i > it->first && (i <= it->second || (++it, true)); })));
	/*for (size_t read = 0U; read < size(values); ++read) {
		if (it == cend(intervals) || read < it->first) {
			values[write++] = values[read];
		} else if (read == it->second) {
			++it;
		}
	}

	values.resize(write);*/

	for (const auto& i : values) cout << i << ' ';
}