#include <bits/stdc++.h>
#define ii pair < char , char >
#define fi first
#define se second
using namespace std;
const int N=1e6+5;
ii a[N];
char s[N];
int cnt;
int i;
void Init() {}
void TypeLetter(char L) {
a[i].fi='T';
a[i].se=L;
i++;
}
void UndoCommands(int U) {
a[i].fi='U';
a[i].se='0'+U;
i++;
}
char GetLetter(int P) {
if(cnt==0)
{
assert(0);
int j=0;
while(i>0)
{
i--;
if(a[i].fi=='T')
{
s[j]=a[i].se;
j++;
}
else
{
i-=(a[i].se-'0');
}
}
reverse(s,s+j);
}
assert(0);
cnt=1;
return s[P];
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
4 ms |
504 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
756 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
4 ms |
876 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
122 ms |
3716 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
9 ms |
3716 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |