【思路题】
文章平均质量分 83
Gijkstra
Can we do better?
展开
-
CodeForces - 729D(思路)
D. Sea Battletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGalya is playing one-dimensional Sea Battle on原创 2017-03-17 17:05:52 · 631 阅读 · 0 评论 -
福州大学第十四届程序设计竞赛_重现赛 A Salty Fish(思路)
Problem A Salty FishAccept: 108 Submit: 400Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description海边躺着一排咸鱼,一些有梦想的咸鱼成功翻身(然而没有什么卵用),一些则是继续当咸鱼。一个善良的渔夫想要帮这些咸鱼翻身,但是渔夫比较懒,所以只原创 2017-07-14 16:58:09 · 1505 阅读 · 2 评论 -
“玲珑杯”ACM比赛 Round #18 A -- 图论你先敲完模板(DP+思路)
1146 - 图论你先敲完模板Time Limit:5s Memory Limit:256MByteSubmissions:679Solved:167DESCRIPTION今天HHHH在操场上跑步,HHHH作为一个爱运动的人,肯定会想方设法把跑步所消耗的能量减到最少.现在这个操场上有nn个可以休息的点,他们的坐标分别为x1,x2...原创 2017-07-15 17:25:25 · 360 阅读 · 0 评论 -
NYOJ备用2344 盖伦的告白(线段树||双端队列)
2344: 盖伦的告白时间限制: 1 Sec 内存限制: 128 MB提交: 56 解决: 19[提交][状态][讨论版]题目描述盖伦和赵信这对基友又在打赌,谁输了就去向卡特琳娜告白。。这一季中盖伦一如既往的怂。赵信为了帮他一把,故意表现出很厉害的样子,结果成功激活了盖伦的智商。赵信手中有n张牌,每张牌上面有一个数,这些牌是非递减的。现在盖伦从他手中抽取k张原创 2017-07-31 15:29:52 · 297 阅读 · 0 评论 -
玲珑1117RE:从零开始的异世界生活(线段树+思路)
1117 - RE:从零开始的异世界生活Time Limit:1s Memory Limit:256MByteSubmissions:431Solved:66DESCRIPTION486到了异世界,看到了一群可爱的妹子比如蕾姆啊,艾米莉亚啊,拉姆啊,白鲸啊,怠惰啊等等!有一天膜女告诉486说她的能力可能不能再用了,因为膜女在思考一个数据结原创 2017-08-07 18:02:34 · 456 阅读 · 0 评论 -
HDU6069 Kanade's sum(链表+思路)
Kanade's sumTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2292 Accepted Submission(s): 945Problem DescriptionGive you an ar原创 2017-08-03 18:30:06 · 279 阅读 · 0 评论 -
BZOJ2957 楼房重建(线段树+思路)
楼房重建Description 小A的楼房外有一大片施工工地,工地上有N栋待建的楼房。每天,这片工地上的房子拆了又建、建了又拆。他经常无聊地看着窗外发呆,数自己能够看到多少栋房子。 为了简化问题,我们考虑这些事件发生在一个二维平面上。小A在平面上(0,0)点的位置,第i栋楼房可以用一条连接(i,0)和(i,Hi)的线段表示,其中Hi为第i栋楼房的高度。如果这栋楼房上任何一原创 2017-08-04 18:00:15 · 475 阅读 · 0 评论 -
HDU6047 Maximum Sequence(思路)
Maximum SequenceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 42 Accepted Submission(s): 19Problem DescriptionSteph is extr原创 2017-07-27 17:28:16 · 229 阅读 · 0 评论 -
CodeForces - 758D(递归)
D. Ability To Converttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlexander is learning how to convert n原创 2017-07-28 18:29:41 · 342 阅读 · 0 评论 -
codeforce 851 B Arpa and an exam about geometry(思路)
B. Arpa and an exam about geometry time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Arpa is taking a geometry exam. Here is the last proble原创 2017-09-05 21:46:56 · 1071 阅读 · 0 评论 -
HDU6092 Rikka with Subset(01背包+思路)
Rikka with SubsetTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 856 Accepted Submission(s): 422Problem DescriptionAs we know原创 2017-08-09 10:03:14 · 269 阅读 · 0 评论 -
UVALive - 7503 Change(规律)
链接:点击打开链接题意:有一个自动贩卖机,你想用它来换零钱,你目前有的钱A,想得到B,问最少需要买多少钱东西;通过观察所给货币的大小可以发现,只有0.01,0.1,1,10是特例,其他货币之间均只要花费0.01元就能得到B,于是要对这四个数据进行特判然后观察这四种货币:发现,如果A与B相邻(A一定大于B),那么只需要花费0.01元,即可获得B,如果不相邻,可以先花费0.01元获原创 2017-10-15 19:51:36 · 257 阅读 · 0 评论 -
codeforce 551C GukiZ hates Boxes(二分+贪心)
C. GukiZ hates Boxestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputProfessor GukiZ is concerned about mak原创 2017-12-02 19:26:31 · 313 阅读 · 0 评论 -
hdu3338 Kakuro Extension(最大流)
Kakuro ExtensionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2425 Accepted Submission(s): 844Special JudgeProblem Description原创 2018-01-12 09:19:14 · 301 阅读 · 0 评论 -
Educational Codeforces Round 37 E. Connected Components?(bfs+思路)
E. Connected Components?time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an undirected graph原创 2018-02-03 09:56:52 · 562 阅读 · 0 评论 -
codeforces 754D. Fedor and coupons(思路)
D. Fedor and couponstime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAll our characters have hobbies. The same is true for Fedor. He enjoys shoppin...原创 2018-04-02 18:07:47 · 200 阅读 · 0 评论 -
HDU 6345 Problem J. CSGO(思路)
Problem J. CSGO Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 571 Accepted Submission(s): 301Problem Description You are playing CS...原创 2018-08-23 15:57:33 · 276 阅读 · 0 评论 -
HDU 3392 Pie(dp滚动数组+思路)
PieTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1034 Accepted Submission(s): 288Problem DescriptionA lot of boys and girls原创 2017-07-15 08:47:38 · 327 阅读 · 0 评论 -
URAL - 1329. Galactic History(树的遍历)
1329. Galactic HistoryTime limit: 1.0 secondMemory limit: 64 MBIt is very hard for one person to learn all galactic history. But, on the other hand, every diplomat who wants to hold a mo原创 2017-04-13 20:33:50 · 313 阅读 · 0 评论 -
HDU4722~Good Numbers(思路)
Good NumbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4728 Accepted Submission(s): 1502Problem DescriptionIf we sum up原创 2017-03-17 18:58:44 · 266 阅读 · 0 评论 -
4489: misaka and last order(思路)
DescriptionMisaka Mikoto is a main character of the Animation "To Aru Majutsu no Index" and "To Aru Kagaku no Railgun". She was enrolled into the Academy City to train herself and had been working原创 2017-03-19 07:56:16 · 356 阅读 · 0 评论 -
CodeForces - 359C~Prime Number(思路)
C. Prime Numbertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSimon has a prime number x and an array of n原创 2017-03-19 14:43:00 · 477 阅读 · 0 评论 -
CodeForces - 376C~Divisible by Seven(思路)
C. Divisible by Seventime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have number a, whose decimal repre原创 2017-03-19 16:10:00 · 271 阅读 · 0 评论 -
洛谷~P1582 倒水(思路)
题目描述一天,CC买了N个容量可以认为是无限大的瓶子,开始时每个瓶子里有1升水。接着~~CC发现瓶子实在太多了,于是他决定保留不超过K个瓶子。每次他选择两个当前含水量相同的瓶子,把一个瓶子的水全部倒进另一个里,然后把空瓶丢弃。(不能丢弃有水的瓶子)显然在某些情况下CC无法达到目标,比如N=3,K=1。此时CC会重新买一些新的瓶子(新瓶子容量无限,开始时有1升水),以到达目标。原创 2017-03-27 18:18:09 · 962 阅读 · 0 评论 -
BNUOJ49477~RGCDQ(思路)
RGCDQTime Limit: 3000msMemory Limit: 65536KBThis problem will be judged on HDU. Original ID: 531764-bit integer IO format: %I64d Java class name: MainPrev Submit Status原创 2017-03-21 09:48:59 · 281 阅读 · 0 评论 -
ZOJ - 3713 ~ In 7-bit (思路)
In 7-bit ZOJ - 3713 Very often, especially in programming contests, we treat a sequence of non-whitespace characters as a string. But sometimes, a string may contain whitespace characters or e原创 2017-04-07 17:16:56 · 286 阅读 · 0 评论 -
POJ1835~宇航员(思路)
宇航员Time Limit: 2000MS Memory Limit: 30000KTotal Submissions: 5997 Accepted: 2618Description问题描述: 宇航员在太空中迷失了方向,在他的起始位置现在建立一个虚拟xyz坐标系,称为绝对坐标系,宇航员正面的方向为x轴正方向,头原创 2017-03-29 19:50:08 · 241 阅读 · 0 评论 -
NBUT - 1225~NEW RDSP MODE I(快速幂+倒推)
[1225] NEW RDSP MODE I时间限制: 1000 ms 内存限制: 131072 K问题描述Little A has became fascinated with the game Dota recently, but he is not a good player. In all the modes, the rdsp Mode原创 2017-04-12 13:14:13 · 297 阅读 · 0 评论 -
nyoj~228 士兵杀敌(五)(思路)
士兵杀敌(五)时间限制:2000 ms | 内存限制:65535 KB难度:5描述南将军麾下有百万精兵,现已知共有M个士兵,编号为0~M,每次有任务的时候,总会有一批编号连在一起人请战(编号相近的人经常在一块,相互之间比较熟悉),最终他们获得的军功,也将会平分到每个人身上,这样,有时候,计算他们中的哪一个人到底有多少军功就是一个比较困难的事情。原创 2017-04-28 10:32:13 · 216 阅读 · 0 评论 -
2017 Wuhan University Programming Contest 现场赛G. Room(set+思路)
问题 G: Room时间限制: 1 Sec 内存限制: 64 MB提交: 11 解决: 8[提交][状态][讨论版]题目描述The ACM / ICPC team has a large room, the length and width of which is 10^6 . However, the guys in ACM / ICPC teams are to原创 2017-04-17 21:06:57 · 431 阅读 · 0 评论 -
HDU~5423 Rikka with Tree(思路+搜索)
Rikka with TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 893 Accepted Submission(s): 409Problem DescriptionAs we know,原创 2017-04-14 15:28:48 · 227 阅读 · 0 评论 -
2017广东工业大学程序设计竞赛决赛C.Collection Game(dp)
C.Collection GameTime Limit: 1000 MSMemory Limit: 128000 KTotal Submit: 841(248 users)Total Accepted: 236(165 users)Special Judge: NoDescription原创 2017-04-05 20:22:50 · 709 阅读 · 0 评论 -
HDU - 4850~Wow! Such String!(dp)
Wow! Such String!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1527 Accepted Submission(s): 485Special JudgeProblem Description原创 2017-04-05 21:06:00 · 287 阅读 · 0 评论 -
FZU 2203 单纵大法好 (思路)
Problem 2203 单纵大法好Accept: 240 Submit: 728Time Limit: 5000 mSec Memory Limit : 65536 KB Problem Description人在做,天在看,单纵不怂保平安众娘皆为轮回来,敢教POI进夜战。勿怪战列低智商,航母不是一个样?假摔不虚有损管,大破进击是真相!原创 2017-06-11 10:14:44 · 401 阅读 · 0 评论 -
ACM-ICPC 2018 南京赛区网络预赛 J.SUM(线筛)
链接 题意:给出一个f函数,定义为 把i拆分成两个因子的方案数(且每一个因子都不能被平方数整除),求∑ni=1f(i)∑i=1nf(i)\sum _{i=1} ^{n} f(i)分析:首先我们考虑f(i)如何求 对于任意一个i,我们可以拆分成素因子的乘积形式 此时就可以根据素因子的幂分为3种情况讨论1.素因子的幂>=3时,由于只能拆分成两个因子无论怎么组合,f(i)一定为0 ...原创 2018-09-06 21:41:35 · 208 阅读 · 0 评论