# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
312397 | 2020-10-13T06:03:51 Z | Trickster | Collider (IZhO11_collider) | C++ | 2000 ms | 1436 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 | 1 ms | 256 KB | Output is correct |
2 | Correct | 11 ms | 256 KB | Output is correct |
3 | Correct | 110 ms | 512 KB | Output is correct |
4 | Correct | 908 ms | 1436 KB | Output is correct |
5 | Correct | 1804 ms | 1436 KB | Output is correct |
6 | Execution timed out | 2065 ms | 1428 KB | Time limit exceeded |
7 | Halted | 0 ms | 0 KB | - |