
数据结构
吃货妍
努力学习中
展开
-
Hrbust2223水题
水题Time Limit: 500 MSMemory Limit: 32768 KTotal Submit: 248(82 users)Total Accepted: 106(64 users)Rating: Special Judge: NoDescription因为是有关于接水的原创 2016-03-28 21:14:31 · 341 阅读 · 0 评论 -
sdut 3252 Lowest Unique Price
Lowest Unique PriceTime Limit: 1000MS Memory Limit: 65536KB Submit Statistic Discuss Problem DescriptionRecently my buddies and I came across an idea! We want to build a website to sell things in a new原创 2017-05-03 23:30:33 · 259 阅读 · 0 评论 -
[BZOJ]2038 小Z的袜子 莫队算法
代码:#include<cstdio>#include<iostream>#include<cmath>#include<algorithm>#define ll long longusing namespace std;const int N=50010;int n,m;int col[N],f[N],pos[N];ll gcd(ll x,ll y){ return y原创 2017-04-08 22:45:55 · 604 阅读 · 0 评论 -
Codeforces Round #390 (Div. 2)DFedor and coupons (排序+优先队列)
D. Fedor and couponstime limit per test:4 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputAll our characters have hobbies. The same is true for Fedor. He enjoys shop原创 2017-01-07 21:26:22 · 551 阅读 · 0 评论 -
Codeforces Round #304 (Div. 2)C. Soldier and Cards(STL+模拟)
C. Soldier and Cardstime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputTwo bored soldiers are playing card war. Their card deck consists of exactl原创 2016-12-28 23:10:59 · 457 阅读 · 0 评论 -
Codeforces Round #388 (Div. 2)C. Voting(数据结构+模拟)
C. Votingtime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputThere are n employees in Alternative Cake Manufacturing (ACM). They are now voting on s原创 2016-12-22 20:03:39 · 510 阅读 · 0 评论 -
等差数列Ⅱ
1416: 等差数列Ⅱ Time Limit: 1 Sec Memory Limit: 32 MB Submit: 98 Solved: 9 [Submit][Status][Web Board] Description zjw最近回忆起了等差数列,等差数列满足相邻两项的差值为定值,这个定值叫做公差d,所以f(n) – f(n-1) = d (n>1)。zjw得到一个序列,但是zjw只原创 2016-11-14 16:38:41 · 556 阅读 · 0 评论 -
Codeforces Round #378 (Div. 2)D(MAP)
。 D. Kostya the Sculptortime limit per test:3 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputKostya is a genial sculptor, he has an idea: to carve a marble sculptu原创 2016-11-02 15:46:03 · 595 阅读 · 0 评论 -
POJ2823Sliding Window(单调队列)
Sliding WindowTime Limit: 12000MS Memory Limit: 65536K Total Submissions: 55878 Accepted: 16068 Case Time Limit: 5000MS DescriptionAn array of size n ≤ 106 is given to you. There is a sliding win原创 2016-10-31 21:16:55 · 428 阅读 · 0 评论 -
BZOJ1012: [JSOI2008]最大数maxnumber(单调栈)
1012: [JSOI2008]最大数maxnumber Time Limit: 3 Sec Memory Limit: 162 MB Submit: 8597 Solved: 3768 Description 现在请求你维护一个数列,要求提供以下两种操作:1、 查询操作。语法:Q L 功能:查询当前数列中末尾L 个数中的最大的数,并输出这个数的值。限制:L不超过当前数列的长度。2、原创 2016-10-30 20:44:58 · 631 阅读 · 0 评论 -
Hrbust2261近代化改修(优先队列+贪心+猜数据)
近代化改修 Time Limit: 3000 MS Memory Limit: 32768 K Total Submit: 162(47 users) Total Accepted: 33(32 users) Rating: Special Judge: No Description 舰娘们的战斗力可以用一个数值来表示,又分成了面板战斗力和实际战斗力。他们的换 算关系是:如果一个舰娘的面板原创 2016-10-20 16:29:57 · 370 阅读 · 0 评论 -
HDU-5945 Fxx and game (dp+单调队列)
Fxx and gameAccepts: 74 Submissions: 1857 Time Limit: 3000/1500 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)问题描述 青年理论计算机科学家Fxx给的学生设计了一款数字游戏。一开始你将会得到一个数X,每次游戏将给定两个参数k,t, 任意时刻你可以对你的数执行下面原创 2016-11-01 21:39:24 · 354 阅读 · 0 评论 -
第三章 例题三 阿格斯(自定义优先队列)
题目链接:可交题的传送门 记得刚入门的时候问过学长可不可以自己定义一个优先队列,不过学长没搭理我。。。代码:#include using namespace std;struct node//注意优先队列里的比较函数,跟正常的正好相反。{ int Qnum,Period,Time; bool operator < (const node &t)const{ r原创 2016-10-06 18:02:17 · 408 阅读 · 0 评论 -
HDU5127 Dogs' Candies 暴力+list
Dogs' CandiesTime Limit: 30000/30000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 1478 Accepted Submission(s): 351Problem DescriptionFar far原创 2016-10-04 16:39:10 · 693 阅读 · 0 评论 -
Hrbust 1355 Leyni,罗莉和XianGe (最短路 思维建图,dij优化)
Leyni,罗莉和XianGeTime Limit: 1000 MSMemory Limit: 65536 KTotal Submit: 128(23 users)Total Accepted: 31(19 users)Rating: Special Judge: NoDes原创 2016-09-12 13:12:44 · 482 阅读 · 0 评论 -
ZOJ 3963 Heap Partition (STL)
Heap PartitionTime Limit: 2 Seconds Memory Limit: 65536 KB Special Judge A sequence S = {s1, s2, …, sn} is called heapable if there exists a binary tree T with n nodes such that every node原创 2017-04-24 00:48:08 · 682 阅读 · 0 评论