Atcoder Beginner Contest 356

A - Subsegment Reverse

#include <bits/stdc++.h>

using namespace std;
using i64 = long long;

int main() {
	ios::sync_with_stdio(false), cin.tie(nullptr);
	int N, L, R;
	cin >> N >> L >> R;
	vector<int> v(N);
	iota(v.begin(), v.end(), 1);
	reverse(v.begin() + L - 1, v.begin() + R);
	for (auto i : v) cout << i << " ";
	return 0;
}
posted @ 2024-06-07 23:45  胖柚の工作室  阅读(23)  评论(0)    收藏  举报