# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
173610 | 2020-01-04T17:12:48 Z | juggernaut | Collider (IZhO11_collider) | C++14 | 722 ms | 3500 KB |
//Just try and the idea will come #include<bits/stdc++.h> using namespace std; int main(){ string s; int n,m,l,r; cin>>n>>m>>s; char ch; while(m--){ cin>>ch; if(ch=='a'){ scanf("%d%d",&l,&r); l--; r--; string c=""; c=s[l]; s.erase(l, 1); s.insert(r,c); } else{ scanf("%d", &l); l--; printf("%c\n", s[l]); } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 13 ms | 376 KB | Output is correct |
3 | Correct | 28 ms | 632 KB | Output is correct |
4 | Correct | 224 ms | 2096 KB | Output is correct |
5 | Correct | 390 ms | 2224 KB | Output is correct |
6 | Correct | 531 ms | 2352 KB | Output is correct |
7 | Correct | 580 ms | 3500 KB | Output is correct |
8 | Correct | 273 ms | 3500 KB | Output is correct |
9 | Correct | 722 ms | 3500 KB | Output is correct |
10 | Correct | 503 ms | 3500 KB | Output is correct |