Newer
Older
---
layout : wiki
title : BOJ 1406. 에디터
summary :
date : 2021-02-03 10:57:16 +0900
updated : 2021-03-12 00:33:24 +0900
tag :
public : true
published : true
parent : [[boj]]
latex : false
---
* TOC
{:toc}
## 1 번째 시도(2021-02-02)
- 처음에 string으로 받아서 처리하였지만 시간 초과
- 최대 500,000 횟수로 삽입 삭제가 발생할 수 있음 -> list 사용해야 함을 깨달았어야 함(그러지 못했음)
- c++ list가 있는지 처음 알게 됨
```cpp
list<char> clist;
list<char>::iterator it;
clist.insert(it, ch);
clist.erase(it);
```