Submission #15630

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
156302015-07-13 12:37:31progressiveCrayfish scrivener (IOI12_scrivener)C++14
5 / 100
239 ms109580 KiB
using namespace std;
static const int MAXN=1010101;
static bool isundo[MAXN];
static int real[MAXN];
static char working[MAXN];
static int length[MAXN];
static int sparse[MAXN][25];
static int turn;
void Init()
{
turn=1;
real[0]=0;
length[0]=0;
for(int i=0;i<25;i++) sparse[0][i]=-1;
}
void TypeLetter(char L)
{
isundo[turn]=false;
working[turn]=L;
length[turn]=length[turn-1]+1;
real[turn]=turn;
sparse[turn][0]=turn-1;
for(int i=1;i<25;i++)
{
int v=sparse[turn][i-1];
if(v==-1) sparse[turn][i]=-1;
else sparse[turn][i]=sparse[v][i-1];
}
turn++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...