| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 686341 | Ronin13 | Collider (IZhO11_collider) | C++14 | 250 ms | 19448 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include <ext/rope>
#define ll long long
#define ull unsigned ll
#define f first
#define s second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define epb emplace_back
using namespace std;
using namespace __gnu_cxx;
const int nmax = 5e5 + 1;
int main(){
ios_base::sync_with_stdio(false); cin.tie(0);
crope r = "";
int n; cin >> n;
int m; cin >> m;
for(int i = 1; i <= n; ++i){
char x; cin >> x;
r.pb(x);
}
for(int i = 1; i <= m; i++){
char t; cin >> t;
if(t == 'a'){
int x, y; cin >> x >> y;
char v = r[x - 1];
r.erase(x - 1, 1);
r.insert(y - 1, v);
}
else{
int x; cin >> x;
cout << r[x - 1] << "\n";
}
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
