[algorithm] 백준 10866번 덱
·
algorithm/덱
스택,큐의 기본문제들과 같은 패턴으로덱을 잘 이해했는 지에 대한 개념확인 문제다#include #include #include using namespace std;int main() { ios::sync_with_stdio(0); cin.tie(0); int n,x; string s; cin >> n; deque d; for(int tmp=0; tmp> s; if(s == "push_front") { cin >> x; d.push_front(x); } if(s == "push_back") { ..