이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/*
vector <char> A[1e6+5];
vector <int> idx[1e6+5];
idx = -1;
stack <pair <char, int> > Ins;
*/
#include <bits/stdc++.h>
using namespace std;
struct Instruction {
char type;
int prev, x;
Instruction() {};
Instruction(char cc, int a1, int a2) {
type = cc;
prev = a1;
x = a2;
}
};
vector <Instruction> Ins;
vector <char> A;
int idx = -1;
void Init() {
//for (int i=0; i<1e6+5; i++) idx[i] = -1;
for (int i=0; i<1e6+5; i++) A.push_back(-1);
}
void TypeLetter(char L) {
idx++;
//int anterior = A[idx];
A[idx] = L;
//Ins.push_back(Instruction('T', anterior, L);
}
void ReverseType(Instruction it) {
A[idx] = it.prev;
}
void ReverseUndone(int u) {
idx += u;
}
void UndoCommands(int U) {
/*
for (int i=0; i<U; i++) {
pair <int, char> temp = Ins.top();
Ins.pop();
// Type was undone
if (temp.first == 'T') ReverseType();
else {}
}
*/
int a = 1;
a++;
}
char GetLetter(int p) {
return A[p];
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |