| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 679990 | Ahmed57 | 크레이피쉬 글쓰는 기계 (IOI12_scrivener) | C++14 | 628 ms | 179232 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
//TRIE
struct node{
node *nxt[26];
int ind;
node(){
ind = -1;
for(int i = 0;i<26;i++){
nxt[i] = NULL;
}
}
};
map<int,node*> mp;
map<int,char> ch;
node* root = new node();
int op = 0;
void Init(){
mp[op] = root;
}
void TypeLetter(char l){
if(root->nxt[l-'a']==NULL){
root->nxt[l-'a'] = new node();
}
int z = root->ind;
root = root->nxt[l-'a'];
root->ind = z+1;
ch[z+1] = l;
mp[++op] = root;
}
void UndoCommands(int u){
mp[++op] = mp[op-(u+1)];
root = mp[op];
}
char GetLetter(int p){
return ch[p];
}
/*int main(){
ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
init();
TypeLetter('a');
TypeLetter('b');
cout<<GetLetter(1)<<"\n";
TypeLetter('d');
UndoCommands(2);
UndoCommands(1);
cout<<GetLetter(2)<<"\n";
}*/
컴파일 시 표준 에러 (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... | ||||
