#include <iostream> using namespace std; int main() { string str, head, tmp, headTmp, out; int pos, headTmpSize, comma, equal; cin >> head; cin >> str; cout << head << " " << str << endl << endl; while((pos = str.find(']')) > 0) { tmp = str.substr(0,pos+1); headTmpSize = tmp.find('['); headTmp = tmp.substr(0,headTmpSize); cout << tmp << endl; if(head == headTmp) { tmp = tmp.substr(head.size()); while((equal = tmp.find('=')) > 0) { comma = tmp.find(','); if(comma <= 0)comma = tmp.size()-1; out += tmp.substr(equal+1, comma - equal - 1) + " "; tmp = tmp.substr(comma+1); } cout << out << endl; } out.clear(); if(pos+1 == str.size()) break; str = str.substr(pos+2); cout << endl; } return 0; }
点赞 评论

相关推荐

05-09 12:23
已编辑
华南理工大学 Java
野猪不是猪🐗:给他装的,双九+有实习的能看的上这种厂我直接吃⑨✌们拿它练练面试愣是给他整出幻觉了
点赞 评论 收藏
分享
矫健的闭门羹烹饪师又熬夜了:本人双非本,在鹅厂测开实习,你这个简历上写的这两个项目的技术栈都差不多,能够让面试官去延伸去问的八股除了redis就再没啥了,建议项目这边可以再改改,然后专业技能那块的话,感觉linux和测试工具可以分开写,毕竟不是干一件事的,反正没实习的基础上面试就深挖项目和八股,好好卷吧
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
06-25 17:22
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务