| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 119826 | dolphingarlic | 크레이피쉬 글쓰는 기계 (IOI12_scrivener) | C++14 | 1080 ms | 253496 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
pair<char, char> v[1000001];
string s, t;
int indx = 0;
bool got = false;
void get() {
int ptr = indx - 1;
while (ptr != -1) {
while (ptr != -1 && v[ptr].first == 'U') ptr -= (int)v[ptr].second + 1;
s += v[ptr--].second;
}
for (int i = 0; i < s.size(); i++) t[i] = s[s.size() - 1 - i];
}
void Init() {
}
void TypeLetter(char L) {
v[indx++] = {'T', L};
}
void UndoCommands(int U) {
v[indx++] = {'U', (char)U};
}
char GetLetter(int P) {
if (!got) {
get();
got = true;
}
return t[P];
}
// int main() {
// int t;
// cin >> t;
// for (int i = 0; i < t; i++) {
// char c, d; int 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) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
