自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(34)
  • 收藏
  • 关注

原创 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 400

原创 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 583

原创 Codeforces Round #370 (Div. 2)C. Memory and De-Evolution(数学,思维))

C. Memory and De-Evolutiontime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputMemory is now interested in the de-evolution of objects, specifically

2016-10-29 21:50:29 357

原创 Codeforces Round #377 (Div. 2)D. Exams(二分+贪心)

D. Examstime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputVasiliy has an exam period which will continue for n days. He has to pass exams on m sub

2016-10-27 19:52:40 388

原创 Codeforces Round #377 (Div. 2)C. Sanatorium(贪心)

C. Sanatoriumtime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputVasiliy spent his vacation in a sanatorium, came back and found that he completely

2016-10-26 20:08:59 379

原创 Codeforces Round #377 (Div. 2)(A+B)

A. Buy a Shoveltime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputPolycarp urgently needs a shovel! He comes to the shop and chooses an appropriate

2016-10-26 19:03:18 307

原创 Codeforces Round #336 (Div. 1)A. Chain Reaction(DP)

A. Chain Reactiontime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputThere are n beacons located at distinct positions on a number line. The i-th b

2016-10-24 18:20:03 439

原创 HDU2217Visit

Visit Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 644 Accepted Submission(s): 250Problem DescriptionWangye is interested in traveling.

2016-10-24 13:20:14 207

原创 Canada Cup 2016

A. Jumping Balltime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputIn a new version of the famous Pinball game, one of the most important parts of

2016-10-23 13:22:19 232

原创 POJ1949 (DAG图的最长路径)

ChoresTime Limit: 3000MS Memory Limit: 30000K Total Submissions: 5834 Accepted: 2758 DescriptionFarmer John’s family pitches in with the chores during milking, doing all the chores as quickly as po

2016-10-21 16:12:32 884

原创 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 314

原创 Codeforces Round #376 (Div. 2)F(前缀和,模拟)

F. Video Cardstime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputLittle Vlad is fond of popular computer game Bota-2. Recently, the developers anno

2016-10-17 21:41:21 403

原创 Codeforces Round #376 (Div. 2)C(DFS)

C. Sockstime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputArseniy is already grown-up and independent. His mother decided to leave him alone for

2016-10-17 16:33:59 240

原创 Codeforces Round #376 (Div. 2)(A+B)

A. Night at the Museumtime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputGrigoriy, like the hero of one famous comedy film, found a job as a night

2016-10-17 11:26:53 257

原创 FZOJ 1026: [SCOI2009]windy数(数位dp)

1026: [SCOI2009]windy数 Time Limit: 1 Sec Memory Limit: 162 MB Submit: 6176 Solved: 2756 [Submit][Status][Discuss] Description  windy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道, 在A和B之间

2016-10-15 13:16:12 367

原创 HDU4722 Good Numbers (基础数位dp)

Good NumbersTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4383    Accepted Submission(s): 1422Problem DescriptionIf we sum u

2016-10-12 18:31:49 234

原创 HDU 5919 (还算基础的主席树)

                                   Sequence IITime Limit: 9000/4500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1045    Accepted Submission(s): 251

2016-10-11 18:53:39 570

原创 Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined)

C. Ray Tracingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are k sensors located in the rectangular room of

2016-10-09 12:03:11 415

原创 HDU 4791 Alice's Print Service(RMQ)

Alice's Print ServiceTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2175    Accepted Submission(s): 567Problem DescriptionAli

2016-10-08 14:23:21 222

原创 第三章例题8 (频繁出现的数值)RMQ

给你长度为n的非递减数组,m次询问,问[l,r]内出现最多的值所出现的次数。  可交题的链接题解:真是好题,书上刚讲了RMQ,然后给出这道题,我一看两者也没啥联系啊,后来才知道,通过变化, 就是一道RMQ题。因为是非递减的,所以相等的元素一定是连续出现的,然后我们记录每个连续块的数值(value),长度(coun),左端点(lef),右端点(righ),以及每个数属于哪个连续块(num

2016-10-07 19:29:07 397

原创 RMQ(快速查询区间最值)

#include #include #include #include #include #define ll long longusing namespace std;const int maxn=5e4+10;int maxnum[maxn][20];int minnum[maxn][20];void RMQ(int num){ for(int j=1;j<20;

2016-10-07 18:02:17 296

原创 第三章 例题7(乒乓比赛)基础树状数组

可交题的链接一直WA,错在add 操作时,我把上限设成n,设成n不对吗? 不解。。。枚举每一个数,记录在它左边且比他小的数,在它右边且比他小的数,然后随便乘一下就好。代码:#include #include #include #include #define ll long longusing namespace std;const int maxn=20100;

2016-10-07 17:07:29 383

原创 Hrbust OJ 1734 a + b + c=0(双指针法)

                                                                      a + b + c=0Description There is a sequence A containing n integers. How many combinations can make a + b + c = 0 (a∈

2016-10-07 15:15:22 221

原创 第三章例题4 k个最小和

可交题的传送门挺好的姿势。代码:#include using namespace std;const int maxn=800;void merge(int *A,int *B,int *C,int n){ priority_queue pq; for(int i=0;i<n;i++) { pq.push((node){A[i]+B[0],0

2016-10-06 19:26:44 224

原创 第三章 例题三 阿格斯(自定义优先队列)

题目链接:可交题的传送门   记得刚入门的时候问过学长可不可以自己定义一个优先队列,不过学长没搭理我。。。代码:#include using namespace std;struct node//注意优先队列里的比较函数,跟正常的正好相反。{ int Qnum,Period,Time; bool operator < (const node &t)const{ r

2016-10-06 18:02:17 376

原创 HDU5119 Happy Matt Friends(穷举子集dp)

Happy Matt FriendsTime Limit: 6000/6000 MS (Java/Others)    Memory Limit: 510000/510000 K (Java/Others)Total Submission(s): 3044    Accepted Submission(s): 1201Problem DescriptionMat

2016-10-06 14:09:34 410

原创 Codeforces Round #375 (Div. 2) A&B&C

A. The New Year: Meeting Friendstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are three friend living o

2016-10-05 14:49:20 145

原创 HDU 4734 F(x) (数位dp)

F(x)Time Limit: 1000/500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4642    Accepted Submission(s): 1725Problem DescriptionFor a decimal number

2016-10-05 13:20:31 459

原创 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 643

原创 HDU 5137 How Many Maos Does the Guanxi Worth(删点最短路)

How Many Maos Does the Guanxi WorthTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 2133    Accepted Submission(s): 828Problem

2016-10-04 16:24:54 190

原创 HUD 5074 Hatsune Miku

Hatsune MikuTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1499    Accepted Submission(s): 1019Problem DescriptionHatsune Mik

2016-10-04 15:48:30 536

原创 HDU 5119 Happy Matt Friends

Happy Matt FriendsTime Limit: 6000/6000 MS (Java/Others)    Memory Limit: 510000/510000 K (Java/Others)Total Submission(s): 2966    Accepted Submission(s): 1167Problem DescriptionMatt

2016-10-03 18:27:51 318

原创 Intel Code Challenge Elimination Round (Div.1 + Div.2, combined)

A. Broken Clocktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a broken clock. You know, that it is supposed to s

2016-10-02 13:52:43 387

原创 Codeforces Round #374 (Div. 2) A&B

A. One-dimensional Japanese Crosswordtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Adaltik discovere

2016-10-01 13:03:07 238

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除