- 博客(11)
- 资源 (1)
- 收藏
- 关注
原创 Stars POJ - 2352 树状数组
Stars POJ - 2352 Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars tha...
2018-07-26 09:56:03 218
原创 Japan POJ - 3067 树状数组
Japan POJ - 3067 Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coas...
2018-07-26 09:54:39 156
原创 Just a Hook HDU - 1698 线段树区间更新
Just a Hook HDU - 1698 In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of th...
2018-07-26 09:49:40 160
原创 敌兵布阵 HDU--1166 线段树改变单点
敌兵布阵 HDU - 1166 C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。 ...
2018-07-26 09:46:21 160
原创 多重背包二进制优化
F : 安详概览问题列表状态排名Progress Bar时间限制:1 Sec 内存限制:256 MiB提交:280 答案正确:21提交 题目描述 spring最近喜欢上了B站新秀主播,身为顿顿吃黄焖鸡的土豪,当然要过去打赏一番,但是spring还是喜欢精打细算,所以在打赏的时候,想要掏出有限的钱,获得主播的最大好感。主播的好感值是通过送不同的礼物而提升不同...
2018-07-24 15:48:36 737
原创 已知前序(先序)与中序输出后序
已知前序(先序)与中序输出后序:前序:1, 2, 3, 4, 5, 6(根左右)中序:3, 2, 4, 1, 6, 5(左根右)分析:因为前序(根左右)最先出现的总是根结点,所以令root为前序中当前的根结点下标(并且同时把一棵树分为左子树和右子树)。start为当前需要打印的子树在中序中的最左边的下标,end为当前需要打印的子树在中序中最右边的下标。递归打印这棵树的后序,递归出口为start &...
2018-07-20 21:03:33 1905
原创 Codeforce - 872 - B. Maximum of Maximums of Minimums 思路好题
Maximum of Maximums of MinimumsYou are given an array a1, a2, ..., an consisting of n integers, and an integer k. You have to split the array into exactly k non-empty subsegments. You'll then comput...
2018-07-19 23:05:35 168
原创 最大生成树模板 POJ-2377
Bad CowtractorsBessie has been hired to build a cheap internet network among Farmer John's N (2 <= N <= 1,000) barns that are conveniently numbered 1..N. FJ has already done some surveying, a...
2018-07-19 10:25:25 158
原创 spfa首发 POJ 3259
WormholesWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a ...
2018-07-18 21:15:23 147
原创 Dijkstra算法模板---单源最短路---邻接矩阵模板+题目 poj 3268 Silver Cow Party
Silver Cow PartyOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirec...
2018-07-18 14:17:42 276
原创 美团2018年CodeM大赛-资格赛 B 可乐
链接:https://www.nowcoder.com/acm/contest/138/B来源:牛客网题目描述小美和小团最近沉迷可乐。可供TA们选择的可乐共有k种,比如可口可乐、零度可乐等等,每种可乐会带给小美和小团不同的快乐程度。 TA们一共要买n瓶可乐,每种可乐可以买无限多瓶,小美会随机挑选其中的m瓶喝,剩下的n-m瓶小团喝。 请问应该如何购买可乐,使得小美和小团得到的快乐程度的和的期望值最大...
2018-07-10 11:37:45 213
算法艺术与信息学竞赛
2018-08-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人