제출 #1192131

#제출 시각아이디문제언어결과실행 시간메모리
1192131TroySer크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++20
컴파일 에러
0 ms0 KiB
#include <ext/rope>
#include <bits/stdc++.h>

using namespace std;
using namespace __gnu_cxx;

const ll SZ = 1e7 + 1;

crope states[SZ];
int currentIndex = 0;

void Init() {}

void TypeLetter(char L) {
	
	states[currentIndex + 1] = states[currentIndex] + L;
	currentIndex++;

}

void UndoCommands(int U) {

	states[currentIndex + 1] = states[currentIndex - U];
	currentIndex++;

}

char GetLetter(int P) {

  	return states[currentIndex][P];

}

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

scrivener.cpp:7:7: error: 'll' does not name a type
    7 | const ll SZ = 1e7 + 1;
      |       ^~
scrivener.cpp:9:14: error: 'SZ' was not declared in this scope
    9 | crope states[SZ];
      |              ^~
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:16:9: error: 'states' was not declared in this scope; did you mean 'static'?
   16 |         states[currentIndex + 1] = states[currentIndex] + L;
      |         ^~~~~~
      |         static
scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:23:9: error: 'states' was not declared in this scope; did you mean 'static'?
   23 |         states[currentIndex + 1] = states[currentIndex - U];
      |         ^~~~~~
      |         static
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:30:16: error: 'states' was not declared in this scope; did you mean 'static'?
   30 |         return states[currentIndex][P];
      |                ^~~~~~
      |                static