摘要:
来源:http://acm.hust.edu.cn:8080/judge/contest/view.action?cid=9948#problem/D题意:就是给你一种队列,两端都能插入,两端都能删除,然后给你一些操作,输出操作的结果。思路:用deque可以完美实现,题目没什么难度。。。代码:#include <iostream>
#include <cstdio>
#include <string.h>
#include <string>
#include <deque>
using namespace std; int main( 阅读全文
随笔分类 - STL
杭电 4006 multiset 妙用
2012-03-27 15:09 by javaspring, 232 阅读, 收藏,
摘要:
用stl可以解决。。题目:The kth great numberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 2574Accepted Submission(s): 1119Problem DescriptionXiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, o. 阅读全文
hdu++1800++STL
2011-10-13 20:16 by javaspring, 207 阅读, 收藏,
摘要:
这道题刚开始一直和拦截装置混淆了,,,后来才明白两道题的差别。这道题转化之后就是求出现最多的次数,用map可以轻松解决。。。。题目:Flying to the MarsTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4320Accepted Submission(s): 1395Problem DescriptionIn the year 8888, the Earth is ruled by the PPF Empire . As ... 阅读全文