#include <map>
using namespace std;
map<char, int> trie[1000001];
int node,now,time,hist[1000001]; char get[10000001];
void Init() {}
void TypeLetter(char L) {
int &n = trie[now][L];
if (n == 0){
n = ++node;
get[n] = L;
}
hist[++time] = now = n;
}
void UndoCommands(int U) {
now = hist[time-U];
hist[++time] = now;
}
char GetLetter(int P) {
return get[now];
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
61748 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
12 ms |
61748 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
61880 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
212 ms |
88676 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
276 ms |
84452 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |