| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 166723 | Dilshod_Imomov | 입자 가속기 (IZhO11_collider) | C++17 | 773 ms | 1684 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
# include <bits/stdc++.h>
//# pragma GCC optimize("Ofast")
# define pb push_back
# define ll long long
# define fi first
# define se second
# define all(vc) vc.begin(),vc.end()
# define forn(i, n) for (int i = 0; i < int(n); i++)
# define ford(i, n) for (int i = int(n) - 1; i >= 0; i--)
# define fore(i, l, r) for (int i = int(l); i < int(r); i++)
# define in freopen("input.txt", "r", stdin)
# define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
# define time cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n"
  
using namespace std;
  
const ll INF = 1e18;
const int mod = 1e9 + 7;
const ll N = 1e7 + 7; 
 
int n, m;
string s;
   
int main()
{      
    speed;
    cin >> n >> m >> s;
    forn( i, m ) {
        char c;
        cin >> c;
        if ( c == 'a' ) {
            int x, y;
            cin >> x >> y;
            x--,y--;
            string t = "";
            t = s[x];
            s.erase( x, 1 );
            s.insert( y, t );
        }
        else {
            int x;
            cin >> x;
            cout << s[x - 1] << "\n"; 
        }
    }
 
    //time;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
