답안 #976600

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
976600 2024-05-06T19:34:28 Z Isam 크레이피쉬 글쓰는 기계 (IOI12_scrivener) C++17
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;

string s[1000001];

int tot;

void init();

void TypeLetter(char L){
	
	s[++tot] = s[tot-1] + 'L';
	
}

void UndoCommands(int U){
	s[tot] = s[tot - U];
	
}

char GetLetter(int P){
	return s[tot][P-1];
}

Compilation message

scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:12:4: warning: operation on 'tot' may be undefined [-Wsequence-point]
   12 |  s[++tot] = s[tot-1] + 'L';
      |    ^~~~~
/usr/bin/ld: /tmp/ccSuwLS0.o: in function `main':
grader.cpp:(.text.startup+0x63): undefined reference to `Init()'
collect2: error: ld returned 1 exit status