
STL
pullulate_99
这个作者很懒,什么都没留下…
展开
-
哈理工OJ-2330-Final Ugly English【栈】
哈理工OJ-2330 Description ACM twist-toy encountered such a problem in the work, this article, to ensure that this article only lowercase letters and spaces, please send the articles in each word inve...原创 2018-02-08 19:32:25 · 221 阅读 · 0 评论 -
ACM/ICPC 2018亚洲区预选赛北京赛站网络赛 D【队列】
#1831 : 80 Days时间限制:1000ms单点时限:1000ms内存限制:256MB描述80 Days is an interesting game based on Jules Verne’s science fiction “Around the World in Eighty Days”. In this game, you have to manage the limi...原创 2018-09-23 20:37:51 · 402 阅读 · 0 评论 -
2017 亚洲区(乌鲁木齐赛区)网络赛-A
#include<bits/stdc++.h>using namespace std;int num=-1e9;struct node{ int x,y;} stu[55];int cmp(node a,node b){ if(a.x==b.x) return a.y<b.y; return a.x<b.x;}int main(...原创 2018-08-21 22:47:09 · 2410 阅读 · 0 评论 -
HDU-1075-What Are You Talking About【map应用】
Ignatius is so lucky that he met a Martian yesterday. But he didn’t know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves. Now Ignatius want ...原创 2018-08-01 15:49:32 · 264 阅读 · 0 评论 -
哈理工OJ - 1248-The kth great number 【优先队列】
HRBUST - 1248-The kth great number 【优先队列】 Xiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, or ask Xiao Bao what the kth great number i...原创 2018-02-21 20:40:34 · 175 阅读 · 0 评论 -
2018寒假第一场B—— 最强的决斗者一切都是必然的!【vector学习】
L一直喜欢玩游戏王这款声控印卡游戏,使用一套连锁式削血卡组便可战无不胜。每当陷入危机即将败北之际,L便会高呼“最强的决斗者一切都是必然的!”,然后发动闪光印卡技能,直接翻盘,伤害不多不少,正好足够击败对手。发动闪光印卡技能后,L抽取一张牌,然后微微一笑。接着L以一定顺序打出若干张牌,造成的伤害正好等于对方的生命值。每一张牌都有其发动速度以及效果。如果后发动的一张牌的发动速度不小于前一张牌,则后...原创 2018-02-17 21:31:36 · 310 阅读 · 0 评论 -
2018年全国多校算法寒假训练营练习比赛(第四场)C-求交集
给你两个升序排列的集合,求出两个集合的交集。 // 2 3 1 2 1 2 3输出:1 2 //#include<bits/stdc++.h>using namespace std;int main(){ int n,m; while(scanf("%d%d",&n,&m)!=EOF) { int a...原创 2018-02-11 23:03:28 · 198 阅读 · 0 评论 -
hrbust-1170-语法检查-括号匹配【栈应用】
hrbust-1170-语法检查-括号匹配【栈应用】 检索括号匹配 学会多行输入,每行检测方式。 还有栈。【先进后出】【后进先出】#include<bits/stdc++.h>using namespace std;char a[10000][10000];int main(){ while(scanf("%s",&a[0])!=EOF) { int i原创 2018-02-05 22:26:20 · 385 阅读 · 0 评论 -
HDU-4989-Summary(STL之set)
SummaryProblem DescriptionSmall W is playing a summary game. Firstly, He takes N numbers. Secondly he takes out every pair of them and add this two numbers, thus he can get N*(N - 1)/2 new num原创 2018-01-20 19:51:51 · 399 阅读 · 1 评论 -
HDU1075-What Are You Talking About【map】
What Are You Talking About Problem Description Ignatius is so lucky that he met a Martian yesterday. But he didn’t know the language the Martians use. The Martian gives him a history book of Mars an...转载 2018-02-09 23:58:27 · 273 阅读 · 0 评论 -
HDU-6015-Skip the Class(STL:map)
Skip the ClassProblem DescriptionFinally term begins. luras loves school so much as she could skip the class happily again.(wtf?)Luras will take n lessons in sequence(in another word, to have原创 2018-01-20 01:08:10 · 195 阅读 · 0 评论 -
【STL:vector学习】n的第k个约数
主要是为了学习vector。参考了http://blog.youkuaiyun.com/lsh_2013/article/details/46731331?%3E1.声明: 一个vector类似于一个动态的一维数组。vector中可以存在重复的元素! vector a; // 声明一个元素为int类型的vector avectot a; // 声明一个元素为MyType类型的原创 2018-01-20 00:38:38 · 411 阅读 · 0 评论 -
UVA 10954 【贪心+优先队列】
贪心思想是:数据排序的贪心方式进行n-1次甲方 每次最小的俩个和进入队列,然后将每次和相加#include<bits/stdc++.h>using namespace std;struct node{ int x; bool operator<(const node &a)const { return x > a....原创 2019-01-25 01:06:03 · 242 阅读 · 0 评论