03 2014 档案

摘要:STL 栈,队列,优先队列用法分类:Learning C++2013-11-15 00:52843人阅读评论(2)收藏举报c++栈队列优先队列STLSTL中栈的使用方法(stack)#include基本操作:push(x)将x加入栈中,即入栈操作pop()出栈操作(删除栈顶),只是出栈,没有返回值top()返回第一个元素(栈顶元素)size()返回栈中的元素个数empty()当栈为空时,返回trueSTL中队列的使用(queue)#include基本操作:push(x)将x压入队列的末端pop()弹出队列的第一个元素(队顶元素),注意此函数并不返回任何值front()返回第一个元素(队顶元素) 阅读全文
posted @ 2014-03-17 20:41 Szz 阅读(429) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2089题意:给定 m,.n;求车牌号 m~n之间 有多少数字 不含 4或62 ,8652是可以的 。Sample Input1 100 0 0Sample Output80 1 #include 2 #include 3 #include 4 #define maxn 11 5 int dp[maxn][11] ; 6 using namespace std; 7 void init() 8 { 9 int i,j,k;10 11 memset(dp,0,sizeof(dp));12... 阅读全文
posted @ 2014-03-10 22:01 Szz 阅读(231) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示