📅  最后修改于: 2022-03-11 14:44:51.031000             🧑  作者: Mango
#include using namespace std;int main(){int n, q,i;cin>>n>>q;string temp;vector hrml;vector quer;cin.ignore();for(i=0;i m;vector tag;for(i=0;i' ),temp.end()); if(temp.substr(0,2)=="") { tag.pop_back(); } else { stringstream ss; ss.str(""); ss<>ch>>t1>>p1>>ch>>v1; string temp1=""; if(tag.size()>0) { temp1=*tag.rbegin(); temp1=temp1+"."+t1; } else temp1=t1; tag.push_back(temp1); m[*tag.rbegin()+"~"+p1]=v1; while(ss) { ss>>p1>>ch>>v1; m[*tag.rbegin()+"~"+p1]=v1; } }}for(i=0;i