![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
队列
文章平均质量分 71
一只会冒泡的猫
不是一个人的努力
展开
-
打印队列
The only printer in the computer science students’union is experiencing an extremely heavy workload.Sometimes there are a hundred jobs in the printerqueue and you may have to wait for hours to get asi原创 2017-07-15 10:00:24 · 1979 阅读 · 0 评论 -
Instability(typedef pair<LL,int> P;)
InstabilityTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 471 Accepted Submission(s): 176Problem DescriptionLong long ago, there原创 2017-08-23 18:58:08 · 521 阅读 · 0 评论 -
Triangle
TriangleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1365 Accepted Submission(s): 809Problem DescriptionMr. Frog has n sticks,原创 2017-08-20 17:00:42 · 210 阅读 · 0 评论 -
01组成的N的倍数
给定一个自然数N,找出一个M,使得M > 0且M是N的倍数,并且M的10进制表示只包含0或1。求最小的M。例如:N = 4,M = 100。Input输入1个数N。(1 Output输出符合条件的最小的M。Sample Input4#include#include#include#include#include#includeusing namespac原创 2017-07-27 09:08:25 · 1231 阅读 · 0 评论 -
Problem Description
一批幸福的列车即将从杭州驶向幸福的终点站——温州,身为总列车长的linle有一些奇怪的癖好。他会记录下全部乘客的名字(name)和他们的人品值(RP),根据这些将他们排序,并不时地从某辆列车里踢出人品最不好(RP值最低)的一个人,当两个人人品一样不好时,他就会踢出名字难听的人(linle认为按字典顺序,排在越在后面的人名字越难听)。当然出于列车行驶需要,他还会不时的发布一些命令,比如让某个原创 2017-07-19 10:12:45 · 1250 阅读 · 0 评论 -
双向队列deque
双向队列的成员函数: dequeq;//定义一个双向队列q,类型为int q.push_front(a);//将a从队首插入队列 q.push_back(a);//将a从队尾插入队列 q.pop_front();//队首弹掉一个元素 q.pop_back();//队尾弹出一个元素 a=q.front();//返回队首元素 a=q.back();//返原创 2017-07-22 14:38:18 · 669 阅读 · 0 评论 -
poj----Game Prediction
DescriptionSuppose there are M people, including you, playing a special card game. At the beginning, each player receives N cards. The pip of a card is a positive integer which is at most N*M. And原创 2017-05-01 21:28:39 · 303 阅读 · 0 评论 -
卡片游戏
Given is an ordered deck of n cards numbered 1to n with card 1 at the top and card n at thebottom. The following operation is performed aslong as there are at least two cards in the deck:Throw away th原创 2017-07-15 13:26:50 · 326 阅读 · 0 评论 -
Ducci 队列
A Ducci sequence is a sequence of n-tuples of integers. Given an n-tuple of integers (a1, a2, · · · , an),the next n-tuple in the sequence is formed by taking the absolute differences of neighboring i原创 2017-07-15 11:28:55 · 176 阅读 · 0 评论