栈 stack 是一种先进后出的(First In Last Out, FILO)的数据结构。在 STL中,其底层容器默认使用的是 deque, 也可以自己指定用 vector 或 list容器,然后将其接口适配为栈的接口。队列 queue 是一种先进先出(First In First Out, FIFO)的数据结构。在 STL 中,其底层容器默认使用的也是 deque,也可以自己指定用 vector 或 list容器,然后将其接口适配为队列的接口。优先级队列 priority_queue 是一种允许用户以...
分类:
其他好文 时间:
2014-09-29 20:25:01
阅读次数:
230
由C/C++编译的程序占用的内存分为以下几个部分 1、栈区(stack): 由编译器自动分配释放,存放函数的参数值,局部变量的值等。内存的分配是连续的,类似于平时我们所说的栈,如果还不清楚,那么就把它想成数组,它的内存分配是连续分配的,即,所分配的内存是在一块连续的内存区域内.当我们声明变量时,那....
分类:
其他好文 时间:
2014-09-29 18:37:21
阅读次数:
197
css代码如下:.zxx_shade_image{display:-moz-inline-stack; display:inline-block; padding:0 1px 1px 0; font-size:0; background:#bfbfbf; border-bottom:1px soli...
分类:
其他好文 时间:
2014-09-29 15:19:31
阅读次数:
174
C++ 容器和算法(1)
“泛型算法”:
1. 算法可以作用于不同的容器类型。
2. 容器容纳多种不同类型元素
顺序容器: vector list deque(全称double-ended queue)
适配器: stack queue priority_queue
定义: vector svere;
C c(b,e)当[b,e) 左开右...
分类:
编程语言 时间:
2014-09-29 01:39:37
阅读次数:
269
#include
#include
using namespace std;
const int N = 100005;
struct Elem
{
long long height;
long long width;
int begin;
int count;
};
Elem stack[N];
int top;
int main()
{
int num, n;
long...
分类:
其他好文 时间:
2014-09-28 23:31:56
阅读次数:
300
http://acm.hdu.edu.cn/showproblem.php?pid=5053
ll就不超范围
写一道BFS题写的烦了 来水一道
//#pragma comment(linker, "/STACK:102400000,102400000")
#include
#include
#include
#include
#include
#include
#include ...
分类:
其他好文 时间:
2014-09-28 20:08:56
阅读次数:
200
1 //poj3580 2 //#pragma comment(linker,"/STACK:102400000,102400000") 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include ...
分类:
其他好文 时间:
2014-09-28 19:36:06
阅读次数:
194
升级Debian到wheezy后重新编译php。在编译libiconv时出错(话说俺居然没有找到这货的二进制包)./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)下面报make[2]: *** [progname.o...
分类:
其他好文 时间:
2014-09-28 15:50:22
阅读次数:
221
从小到大写过的第二长的code了(而且是在今天比赛的过程中码出来的,-_-||)。。。。。结果竟然告诉我是TLE!!! 1 #pragma comment(linker,"/STACK:36777216") 2 #include 3 #include 4 #include 5 #inclu...
分类:
其他好文 时间:
2014-09-28 02:07:30
阅读次数:
451
将字符串翻转,如下:
输入:Hi Welcome to cricode
输出:cricode to Welcome Hi
#include
#include
#include
using std::cout;
using std::endl;
using std::string;
using std::stack;
void main()
{
string...
分类:
其他好文 时间:
2014-09-27 13:09:29
阅读次数:
175