- 博客(22)
- 资源 (1)
- 收藏
- 关注
原创 CodeForces-859D Third Month Insanity(期望DP)
D. Third Month Insanitytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe annual college sports-ball tournament is approaching,...
2018-08-28 12:53:49 418
原创 CodeForces-803F Coprime Subsequences(莫比乌斯反演)
F. Coprime Subsequencestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's call a non-empty sequence of positive integers a1, ...
2018-08-27 22:35:41 393
原创 51Nod-1385 凑数字(贪心)
1385 凑数字 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注给定一个n,要求找出一个最短的字符串S,使得所有1到n的整数都是S的子序列。比如n=10,那么S=”1234056789”的时候,是满足条件的。这个时候S的长度是10。 现在给出一个n,要求输出最短S的长度。Input第1行:给出一个整数n (1&l...
2018-08-26 22:37:06 602
原创 51Nod-1476 括号序列的最小代价(贪心)
1476 括号序列的最小代价 题目来源: CodeForces基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注这里有一个关于合法的括号序列的问题。如果插入“+”和“1”到一个括号序列,我们能得到一个正确的数学表达式,我们就认为这个括号序列是合法的。例如,序列"(())()", "()"和"(()(()))"是合法的,但是")("...
2018-08-25 23:26:37 485
原创 51Nod-1672 区间交 (贪心+线段树)
1672 区间交 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注小A有一个含有n个非负整数的数列与m个区间,每个区间可以表示为li,ri。它想选择其中k个区间, 使得这些区间的交的那些位置所对应的数的和最大。(是指k个区间共同的交,即每个区间都包含这一段,具体可以参照样例) 在样例中,5个位置对应的值分别为1,2,3,4,...
2018-08-25 22:18:50 246
原创 51Nod-1530 稳定方块(贪心)
1530 稳定方块 题目来源: CodeForces基准时间限制:10 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注瓦西亚和皮台亚摆放了m个方块。方块被编号为0到m-1(每个号码出现恰好一次)。现在建立一个座标系OX表示地面,OY的方向是竖直向上的。每一方块的左下角有一个座标而且是整点座标。摆放好的方块一定要是稳定的。稳定的含意是每一个不在地...
2018-08-25 21:09:05 299
原创 CodeForces-988E Divisibility by 25(贪心)
E. Divisibility by 25time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an integer nn from 11 to 10181018 without l...
2018-08-23 22:07:50 295
原创 CodeForces-1004E Sonya and Ice Cream(树型DP+RMQ)
E. Sonya and Ice Creamtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSonya likes ice cream very much. She eats it even during p...
2018-08-23 19:20:29 322
原创 HDU-5932 Backpack on Tree(DP+贪心)
Backpack on TreeTime Limit: 9000/4500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 193 Accepted Submission(s): 54 Problem DescriptionThere is a rooted t...
2018-08-23 12:41:08 233
原创 HDU-5931 Mission Possible (线性规划+贪心)
Mission PossibleTime Limit: 36000/18000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 418 Accepted Submission(s): 85 Problem DescriptionMr. Frog loves pl...
2018-08-22 21:53:04 916
原创 HDU-6430 TeaTree(线段树合并)
Problem E. TeaTreeTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 165 Accepted Submission(s): 57 Problem DescriptionRecently, TeaTr...
2018-08-22 20:11:02 947
原创 CodeForces-1019A Elections(贪心)
A. Electionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you know, majority of students and teachers of Summer Informatics...
2018-08-21 19:03:22 548
原创 HDU-6407 Pop the Balloons(DP)
Pop the BalloonsTime Limit: 7000/7000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 87 Accepted Submission(s): 27 Problem DescriptionRecently, an inter...
2018-08-15 23:20:44 776
原创 HDU-6392 Reverse Game(线段树+并查集)
Reverse GameTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 73 Accepted Submission(s): 34Problem DescriptionOne day, Umaru was enjoyi...
2018-08-14 19:52:52 483
原创 HDU-6387 AraBellaC(RMQ)
AraBellaCTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 101 Accepted Submission(s): 41Problem DescriptionPrincess Arabella loves the ...
2018-08-14 15:56:10 502
原创 HDU-6393 Traffic Network in Numazu(基环树/树剖+树状数组)
Traffic Network in NumazuTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 200 Accepted Submission(s): 70Problem DescriptionChika is e...
2018-08-13 23:28:14 300
原创 HDU-6363 bookshelf(莫比乌斯反演)
bookshelfTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 208 Accepted Submission(s): 96 Problem DescriptionPatrick Star bought a book...
2018-08-09 10:34:54 774
原创 CodeForces-1017E The Supersonic Rocket(凸包+KMP)
E. The Supersonic Rockettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter the war, the supersonic rocket became the most comm...
2018-08-09 10:01:41 396
原创 HDU-6357 Hills And Valleys(DP)
Hills And ValleysTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 146 Accepted Submission(s): 47Special Judge Problem DescriptionTau...
2018-08-06 22:25:23 344
原创 线性基
定义线性基即在异或域中,一组线性无关的基向量V(v1,v2...vn)。(可以想象成N维坐标下的坐标轴)在原本的数域A1,A2...Am中,选择若干数值进行异或得到的结果都可以用基向量进行组合得到。模板struct LB { ll d[61], p[61]; int cnt, mx; LB() { memset(d, 0, sizeof(d...
2018-08-04 21:02:06 283
原创 Nowcoder-2018ACM多校训练营(第五场)D inv
时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述 Kanade has an even number n and a permutation b of all of the even numbers in [1,n]Let a denote an array [1,3,5....n...
2018-08-03 15:54:10 214
原创 HDU-6338 Problem G. Depth-First Search(计数)
Problem G. Depth-First SearchTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 378 Accepted Submission(s): 73 Problem DescriptionKaz...
2018-08-03 01:49:21 691
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人