- 博客(4)
- 资源 (5)
- 收藏
- 关注
原创 再水一发相同序列
题目描述 试写一个算法,识别依次读入的一个以@为结束符的字符序列是否为形如‘序列1&序列2’模式的字符序列。其中序列1和序列2中都不含字符‘&’,且序列2是序列1的逆序列。输出YES或者NO。 输入 a+b&b+a 输出 YES 样例输入 1+3&3-1 样例输出 NO #include #include #includ
2016-02-29 23:29:17 583
转载 C++ stl队列Queue用法介绍:删除,插入等操作代码举例
C++队列queue模板类的定义在头文件中,queue 模板类需要两个模板参数,一个是元素类型,一个容器类型,元素类型是必要的,容器类型是可选的,默认为deque 类型。 C++队列Queue是一种容器适配器,它... C++队列queue模板类的定义在头文件中,queue 模板类需要两个模板参数,一个是元素类型,一个容器类型,元素类型是必要的,容器类型是可选的,默认为deque 类
2016-02-29 22:55:40 1573
原创 括号匹配(栈和队列)
#include<iostream> #include<stack> #include<string> using namespace std; int main () { string s; int i; char a; stack<char>st; while(cin>>s){ while(!st.emp...
2016-02-29 21:27:11 1407
原创 十进制转n进制
十进制转八进制; #include<iostream> #include<cstdio> #include<stack> using namespace std; int main() { int a; stack<int>st; while(~scanf("%d",&a)){ while(!st.empty())st.p...
2016-02-29 20:34:50 487
Win8安装程序出现2502、2503错误解决方法
2016-04-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人