摘要:
#include<iostream>#include<queue>#include<cstring>#include<string>using namespace std;const int maxn=1000+10;int main(){ int n,sum=1; while(cin>>n) { if(n==0)break; int i,j; int map[maxn*maxn]; int visit[maxn]; memset(visit,-1,sizeof(visit)); memse... 阅读全文
摘要:
string插入一个字符s.insert((string::size_type)0,1,'a');先由stack的后缀表达式得到原表达式的树,再由queue得到后缀表达式#include<iostream>#include<stack>#include<queue>#include<cctype>#include <algorithm> #include<string>#include<cstring>using namespace std;struct node{ char ch; int l 阅读全文
摘要:
#include<iostream>#include<stack>#include<cctype>#include<map>#include<string>using namespace std;struct matrix{ int x,y;};int main(){ int n; cin>>n; char ch; int i,x,y; matrix ma; map<int,matrix> m; for(i=0;i<n;i++) { cin>>ch; cin.ignore(); cin> 阅读全文