用的双端队列模拟栈,用数组也可以,只要最后能遍历
#include <bits/stdc++.h>
using namespace std;
int n;
string curPath;//当前路径
string s;
//处理绝对路径并输出
void dealWithAbsolutePathAndPrint(string& s){
deque<string> dq;//双端队列
string get_s;//获取每一次拿到的文件名
int last=0;//上一次斜杠位置
for(int ...