#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define int ll
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int p=0;
int op=0;
vector<char> s[1000010];
int pos[1000010];
void Init(){
}
void TypeLetter(char L){
s[p].push_back(L);
pos[op]=p;
p++;
op++;
}
void UndoCommands(int U){
p=pos[op-U];
op++;
}
char GetLetter(int P){
return s[P].back();
}/*
signed main(){
ios_base::sync_with_stdio(0);cin.tie(0);
}*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
23808 KB |
Output is correct |
2 |
Correct |
14 ms |
23864 KB |
Output is correct |
3 |
Correct |
14 ms |
23808 KB |
Output is correct |
4 |
Correct |
14 ms |
23808 KB |
Output is correct |
5 |
Correct |
14 ms |
23808 KB |
Output is correct |
6 |
Correct |
14 ms |
23808 KB |
Output is correct |
7 |
Correct |
14 ms |
23808 KB |
Output is correct |
8 |
Correct |
14 ms |
23808 KB |
Output is correct |
9 |
Correct |
14 ms |
23808 KB |
Output is correct |
10 |
Correct |
14 ms |
23808 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
23808 KB |
Output is correct |
2 |
Correct |
14 ms |
23808 KB |
Output is correct |
3 |
Correct |
14 ms |
23808 KB |
Output is correct |
4 |
Correct |
14 ms |
23808 KB |
Output is correct |
5 |
Correct |
14 ms |
23808 KB |
Output is correct |
6 |
Correct |
14 ms |
23808 KB |
Output is correct |
7 |
Correct |
14 ms |
23808 KB |
Output is correct |
8 |
Correct |
14 ms |
23768 KB |
Output is correct |
9 |
Correct |
14 ms |
23808 KB |
Output is correct |
10 |
Correct |
15 ms |
23808 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
37 ms |
48120 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
146 ms |
60932 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
47 ms |
51320 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |