#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector<int>v(21);
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
for (int i = 0; i <= 20; i++) {
v[i] = i;
}
for (int i = 1; i <= 10; i++) {
int a, b; cin >> a >> b;
reverse(v.begin() + a, v.end() - 21 + b+1);
}
for (int i = 1; i <= 20; i++) {
cout << v[i] << ' ';
}
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 10809๋ฒ - ์ํ๋ฒณ ์ฐพ๊ธฐ (0) | 2021.10.23 |
---|---|
[๋ฐฑ์ค,c++] 10808๋ฒ - ์ํ๋ฒณ ๊ฐ์ (0) | 2021.10.23 |
[๋ฐฑ์ค,c++] 10807๋ฒ - ๊ฐ์ ์ธ๊ธฐ (0) | 2021.10.23 |
[๋ฐฑ์ค,c++] 10798๋ฒ - ์ธ๋ก ์ฝ๊ธฐ (0) | 2021.10.23 |
[๋ฐฑ์ค,c++] 10773๋ฒ - ์ ๋ก (0) | 2021.10.23 |
[๋ฐฑ์ค,c++] 10718๋ฒ - We love kriii (0) | 2021.10.16 |
๋๊ธ