- 博客(27)
- 收藏
- 关注
原创 暑期训练DAY9(贪心)
1588: 合并果子Submit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 1905 Solved: 905 Description现在有n堆果子,第i堆有ai个果子。现在要把这些果子合并成一堆,每次合并的代价是两堆果子的总果子数。求合并所有果子的最小代价。...
2018-07-31 20:36:59 373
原创 CF1012A Photo of The Sky(思考,模拟)
A. Photo of The Skytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPavel made a photo of his favourite stars in the sky. His came...
2018-07-31 20:15:49 622
原创 Codeforces Round #500 (Div. 2)B.And(思考+利用set去重)
B. Andtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is an array with n elements a1, a2, ..., an and the number x.In one...
2018-07-31 20:01:27 243
原创 暑假训练DAY8(BFS)
Oil DepositsTime Limit: 2 Seconds Memory Limit: 65536 KBThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectang...
2018-07-31 09:11:08 568
原创 Poj1753 Flip Game(状态压缩+BFS)
Flip GameTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 51439 Accepted: 21712 DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed...
2018-07-31 09:10:52 183
原创 hdu1429 胜利大逃亡(续)(bfs+状态压缩)
胜利大逃亡(续)Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10777 Accepted Submission(s): 3911 Problem DescriptionIgnatius再次被魔王抓走了(搞不懂他咋这...
2018-07-31 08:53:20 162
原创 暑假训练DAY7(计算几何)
B - 直线相交 POJ - 1269 We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they ar...
2018-07-29 23:04:03 184
原创 UVA3902 - Network (二次搜索+邻接表)
3902 - NetworkTime limit: 3.000 secondshttps://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1903Consider a tree network with n nodes...
2018-07-29 22:53:44 215
原创 csu2146 神奇的金字塔(寻找通项)
D - 神奇的金字塔 CSU - 2146 总所周知,CSU没有金字塔,但在世界某地有一座神奇的金字塔。神奇的金字塔位于N*N的网格地上。第0分钟时,金字塔底面很小,只占据(x,y) 这个格子,之后每过一分钟,金字塔会长大,就算超过边界也会继续长大,不过边界外是无限深渊,所以超过边界的部分不算占据的面积,而且由于是无限深渊,不需要考虑什么时候被填满的问题。那么现在问题来...
2018-07-29 22:33:57 226
原创 暑假训练DAY6 csu七月月赛(水题部分)
A - 商 CSU - 2143 编一个程序求A/B的值 ,要求精确到小数点后N位(N<=80的自然数,并且A<B,A和B是整型 数范围),不足N位的用“0”补齐。例如:精确到小数点后9位:6/7=0.857142857。输入A、B、N, 求A/B。Input输入文件: 只有一行,就是A,B,N,Output输出文件: 只有一行,就是A/B的结果。Sampl...
2018-07-29 21:51:38 290
原创 二维计算几何模板
本模板主要来自刘汝佳的《算法竞赛入门经典》,部分缺省的地方我进行了补齐,且对每个函数作出了解释/*****************************************************************点和向量的声明,以及加减,数乘比较等基础操作 ********************************************************...
2018-07-29 20:38:01 215
原创 暑假训练DAY5(深度优先搜索dfs)
#1049 : 后序遍历时间限制:10000ms单点时限:1000ms内存限制:256MB描述在参与过了美食节之后,小Hi和小Ho在别的地方又玩耍了一阵子,在这个过程中,小Ho得到了一个非常有意思的玩具——一棵由小球和木棍连接起来的二叉树!小Ho对这棵二叉树爱不释手,于是给它的每一个节点都标记了一个标号——一个属于A..Z的大写字母,并且没有任意两个节点的标号是一样的。小H...
2018-07-28 18:28:47 160
原创 2087: Tragedy Words(dfs)
2087: Tragedy WordsSubmit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 144 Solved: 58 Description As is known to all, Wells doesn't have a good command of...
2018-07-28 08:37:16 204
原创 2061: Z‘s Coffee(bfs或dfs+记录路径)
2061: Z‘s Coffeehttp://acm.csu.edu.cn/csuoj/problemset/problem?pid=2061Submit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 120 Solved: 40 SpecialJudgeDesc...
2018-07-28 08:30:46 185
原创 K Best(二分与思考)
K Best Time Limit: 8000MS Memory Limit: 65536K Total Submissions: 7491 Accepted: 1936 Case Time Limit: 2000MS ...
2018-07-26 23:28:10 707 1
原创 poj3301 Texas Trip(坐标旋转+三分)
Texas Triphttp://poj.org/problem?id=3301Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4709 Accepted: 1473 DescriptionAfter a day trip with his friend Dick, Harry...
2018-07-26 23:20:51 229
原创 暑假训练DAY4(递推&递归)
一只小蜜蜂...http://acm.hdu.edu.cn/showproblem.php?pid=2044Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 93324 Accepted Submission(s): 3322...
2018-07-26 23:08:34 206
原创 1081. Binary Lexicographic Sequence(找规律)
1081. Binary Lexicographic Sequencehttp://acm.timus.ru/problem.aspx?space=1&num=1081Time limit: 0.5 secondMemory limit: 64 MBConsider all the sequences with length (0 < N < 44), conta...
2018-07-26 22:50:42 184
原创 关于曲线分割平面问题
问题一:n条直线在平面上相交所能分割出的平面最多有多少?解:设i条直线所能分割出的平面最多为f(i),则n-1条能分割出f(n-1),n条能分割出f(n)。可以观察得当新增的直线与之前的所有直线均相交且交点重复时有最大增加量为n。因此得到f(n)=f(n-1)+n.再使用累加法与f(1)=2的结论可得f(n)=n*(n+1)/2+1。问题二:n条v型线在平面上相交所能分割出...
2018-07-26 14:09:20 1308
原创 (补题)A - Big binary tree(map储存二叉树,完全二叉树,树型dp)
A - Big binary tree HDU - 6161Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 849 Accepted Submission(s): 323 Problem Description...
2018-07-26 08:52:01 187
原创 DAY3(测验)(模拟&stl&二分)
A - Tricky Sum CodeForces - 598A http://codeforces.com/problemset/problem/598/Atime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output...
2018-07-25 23:15:25 212
原创 夏季训练DAY2(二分&三分)
A - 例题 HDU - 2141 http://acm.hdu.edu.cn/showproblem.php?pid=2141Can you find it?Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/10000 K (Java/Others)Total Submission(s): 41092 ...
2018-07-24 21:18:24 202
原创 K - GukiZ hates Boxes (二分&贪心)
K - GukiZ hates Boxes CodeForces - 551C http://codeforces.com/problemset/problem/551/CProfessor GukiZ is concerned about making his way to school, because massive piles of boxes are blocking his...
2018-07-24 21:16:23 343
原创 H - Numbers HDU - 6168 (贪心+multiset)
http://acm.hdu.edu.cn/showproblem.php?pid=6168Problem Descriptionzk has n numbers a1,a2,...,an. For each (i,j) satisfying 1≤i<j≤n, zk generates a new number (ai+aj). These new numbers could mak...
2018-07-24 19:15:46 131
原创 (bfs+二分)2112: Wells的明星生活
很久之前就看到这个题目,今天第一次做出来,纪念一下2112: Wells的明星生活csuoj2112http://acm.csu.edu.cn/csuoj/problemset/problem?pid=2112Description和很多人想的不同,Wells其实是很低调的。刚刚过了520和521,爱信不信,巨怂Wells和喜欢的小姐姐表白了!Wells那是相当相当低调...
2018-07-24 16:02:07 167
原创 对边bfs的最短路问题
在我们的日常做题中,我们经常会碰到一些情况,他的信息都是依照边给出的,并要求我们在这些边的基础上进行bfs以此来找出某种最短路。由于对边进行操作,我们这里就需要用到邻接表。 先行分享一个邻接表的模板#include<stdio.h>#include<algorithm>using namespace std;int main()...
2018-07-23 22:37:59 409
原创 夏季训练DAY1(stl+模拟)
A题http://acm.csu.edu.cn/csuoj/problemset/problem?pid=2018A - Game Rank CSU - 2018 DescriptionThe gaming company Sandstorm is developing an online two player game. You have been asked to impl...
2018-07-23 22:11:59 390
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人