# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
336933 | BY_KUTBILIM | 입자 가속기 (IZhO11_collider) | C++14 | 878 ms | 1672 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/** @BY_KUTBILIM **/
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
#define ll long long
int main(){
ios_base::sync_with_stdio(false);
cin.tie();
int n, q;
cin >> n >> q;
vector<char> v;
for(int i = 0; i < n; i++){
char c;
cin >> c;
v.pb(c);
}
while(q--){
char type;
cin >> type;
if(type == 'a'){
int i, j;
cin >> i >> j;
i--; j--;
char c = v[i];
v.erase(v.begin() + i, v.begin() + i + 1);
v.insert(v.begin() + j, c);
} else{
int i;
cin >> i;
i--;
cout << v[i] << endl;
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |