제출 #456164

#제출 시각아이디문제언어결과실행 시간메모리
456164BT21tataCrayfish scrivener (IOI12_scrivener)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; string s[1000005]; int pos=0; void Init() {} void TypeLetter(char L) { s[pos+1]=s[pos]+L; pos++; } void UndoCommands(int U) { s[pos+1]=s[pos-U] pos++; } char GetLetter(int P) { return s[pos][P]; } /* 14 T a T b P 1 T d U 2 U 1 P 2 T e U 1 U 5 T c P 2 U 2 P 2 */

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

scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:17:22: error: expected ';' before 'pos'
   17 |     s[pos+1]=s[pos-U]
      |                      ^
      |                      ;
   18 |     pos++;
      |     ~~~