[BOJ] 5397: 키로거
2022. 9. 28. 01:15
알고리즘
문제: https://www.acmicpc.net/problem/5397 #include #include #include using namespace std; string input; int n; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n; for (int i = 0; i > input; list l; list::iterator t = l.end(); for (char c : input) { switch (c) { case '': if (t == l.end()) continue; t++; break; case '-': if (t == l.begin()) continue; if (t == l.end()) { l.e..