[C++][STL] 泛型编程
O0o王钰o0O
ACM爱好者
展开
-
[Data Structure Primary][stack and queue]Rujia Liu-6.1.1-卡片游戏-栈和队列应用1
#include #include using namespace std; queue q; int main(int argc, char** argv) { int n; scanf("%d", &n); for(int i = 0; i < n; i++) q.push(i + 1); //初始化队列 while(!q.empt原创 2013-02-23 10:55:21 · 790 阅读 · 0 评论 -
[Data Structure Primary][stack and queue]Rujia Liu-6.1.12-铁轨-栈和队列应用2
(1)使用STL模板方法 ///STL #include #include using namespace std; const int MAXN = 1000 + 10; int n, target[MAXN]; int main(int argc, char** argv) { while(scanf("%d", &n) == 1) { stack s;原创 2013-02-23 12:02:27 · 488 阅读 · 0 评论