摘要: 题目大意:队列操作,在同一个团队里的可以插队,求最终序列题解:建立n个子队列,同时建立一个总队列记录团队的先后顺序,插队的直接插到子队列的队尾即可,对总队列没有任何影响。#include #include #include #include using namespace std; c... 阅读全文
posted @ 2014-04-18 17:27 forever97 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 题解:简单的数括号问题……#include char s[1005];int main(){ while(scanf("%s",s)!=EOF){ int top=0; for(int i=0;;i++){ if(s[i]=='B')brea... 阅读全文
posted @ 2014-04-18 11:23 forever97 阅读(115) 评论(0) 推荐(0) 编辑