Submission #975772

#TimeUsernameProblemLanguageResultExecution timeMemory
975772marinalucaCrayfish scrivener (IOI12_scrivener)C++14
5 / 100
222 ms89940 KiB
char c[1000010]; int a[1000010],lev[1000010],st[20][1000010],t; void Init(){} void TypeLetter(char L){ int i; c[a[++t]=t]=L; lev[t]=lev[st[0][t]=a[t-1]]+1; for(i=1;i<20;++i)st[i][t]=st[i-1][st[i-1][t]]; } void UndoCommands(int U){a[++t]=a[t-U-1];} char GetLetter(int P){ int i,x=a[t]; for(i=20;i--;)if(lev[st[i][x]]>P)x=st[i][x]; return c[x]; }

Compilation message (stderr)

scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:10:28: warning: operation on 't' may be undefined [-Wsequence-point]
   10 | void UndoCommands(int U){a[++t]=a[t-U-1];}
      |                            ^~~
scrivener.cpp:10:28: warning: operation on 't' may be undefined [-Wsequence-point]
#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...