| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1233046 | dssfsuper2 | Crayfish scrivener (IOI12_scrivener) | C++20 | 438 ms | 89680 KiB | 
#include <bits/stdc++.h>
using namespace std;
struct state{
  int curl;
  char curc;
  vector<int> bl;
};
vector<state> states;
state cs;
state null;
void Init() {
  
  cs.curl=-1;
  cs.curc=' ';
  cs.bl={};
  
  states.push_back(cs);
  for(int i = 0;i<20;i++){
    states.back().bl.push_back(0);
  }
}
void TypeLetter(char L) {
  state x;
  x.curl=cs.curl+1;
  x.curc=L;
  //to generate parents: first take previous, then take his first bl, then take the 2nd bl of his, etc
  //x.par=&states[states.size()-1];
  auto temp = states[states.size()-1];
  x.bl={(int)states.size()-1};
  for(int i = 0;i<19;i++){
    x.bl.push_back((temp.bl[i]));
    temp=states[temp.bl[i]];
  }
  states.push_back(x);
  cs=x;
}
void UndoCommands(int U) {
  state x;
  x.curl=states[states.size()-U-1].curl;
  x.curc=states[states.size()-U-1].curc;
  auto temp = states[states.size()-U-1];
  x.bl={(int)states.size()-U-1};
  for(int i = 0;i<19;i++){
    x.bl.push_back(temp.bl[i]);
    temp=states[temp.bl[i]];
  }
  states.push_back(x);
  cs=states.back();
}
char GetLetter(int P) {
 state& tmp=cs;
 state& tmp2=cs;
 if(cs.curl==P){
  return cs.curc;
 }
 for(int i = 19;i>=0;i--){
  tmp2=states[tmp.bl[i]];
  if(tmp2.curl>P)tmp=states[tmp.bl[i]];
  else if (tmp2.curl==P)return tmp2.curc;
 }
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 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... | ||||
