제출 #921207

#제출 시각아이디문제언어결과실행 시간메모리
921207Alihan_8크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++17
컴파일 에러
0 ms0 KiB
string s; void Init() {} void TypeLetter(char L) { s += L; } void UndoCommands(int U) { assert(false); } char GetLetter(int P) { return s[P]; }

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

scrivener.cpp:2:1: error: 'string' does not name a type
    2 | string s;
      | ^~~~~~
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:7:5: error: 's' was not declared in this scope
    7 |     s += L;
      |     ^
scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:11:5: error: 'assert' was not declared in this scope
   11 |     assert(false);
      |     ^~~~~~
scrivener.cpp:1:1: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
  +++ |+#include <cassert>
    1 | 
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:15:12: error: 's' was not declared in this scope
   15 |     return s[P];
      |            ^