제출 #119910

#제출 시각아이디문제언어결과실행 시간메모리
119910dolphingarlic크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; pair<char, ll> v[1000005]; char s[1000005]; ll indx = 0, i = 0; bool got = false; void Init() { } void TypeLetter(char L) { v[indx++] = {'T', L - 'a'}; } void UndoCommands(ll U) { v[indx++] = {'U', U + 1}; } char GetLetter(ll P) { if (!got) { ll ptr = indx - 1; while (ptr > -1) { while (v[ptr].first == 'U') ptr -= v[ptr].second; s[i++] = (char)(v[ptr--].second + 'a'); } got = true; } return s[i - 1 - P]; } // int main() { // ll t; // cin >> t; // Init(); // for (ll i = 0; i < t; i++) { // char c, d; ll e; // cin >> c; // switch (c) { // case 'T': // cin >> d; // TypeLetter(d); // break; // case 'P': // cin >> e; // cout << GetLetter(e) << '\n'; // break; // default: // cin >> e; // UndoCommands(e); // } // } // }

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

/tmp/cckE2LuK.o: In function `main':
grader.cpp:(.text.startup+0x14b): undefined reference to `UndoCommands(int)'
grader.cpp:(.text.startup+0x177): undefined reference to `GetLetter(int)'
collect2: error: ld returned 1 exit status