直接stl打就行了#include <bits/stdc++.h>using namespace std;#pragma GCC optimize(2)int main(){ ios::sync_with_stdio(false); deque<int> q; int trash,n; cin>>trash>>n; while(n--){ int op; cin>>op; switch(op){ case 1: ...