제출 #169299

#제출 시각아이디문제언어결과실행 시간메모리
169299AlexLuchianov크레이피쉬 글쓰는 기계 (IOI12_scrivener)C11
컴파일 에러
0 ms0 KiB
#include <iostream>
 
int const nmax = 1000000;
 
using ll = long long;
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX(a, b) (((a) < (b)) ? (b) : (a))
 
char last;
 
int far[20][1 + nmax], ptr = 0;
int level[1 + nmax];
char chr[1 + nmax];
 
void Init() {}
 
void TypeLetter(char L) {
  ++ptr;
  far[0][ptr] = ptr - 1;
  for(int h = 1; h < 20; h++)
    far[h][ptr] = far[h - 1][far[h - 1][ptr]];
  level[ptr] = level[far[0][ptr]] + 1;
  chr[ptr] = L;
}
 
void UndoCommands(int U) {
  ++ptr;
  far[0][ptr] = ptr - 1 - U;
  for(int h = 1; h < 20; h++)
    far[h][ptr] = far[h - 1][far[h - 1][ptr]];
  level[ptr] = level[far[0][ptr]];
}
 
char GetLetter(int P) {
  int pos = ptr;
  P++;
  for(int h = 19; 0 <= h; h--)
    if(P <= level[far[h][pos]] )
      pos = far[h][pos];
  return chr[pos];
}

컴파일 시 표준 에러 (stderr) 메시지

scrivener.c:1:10: fatal error: iostream: No such file or directory
 #include <iostream>
          ^~~~~~~~~~
compilation terminated.