随笔分类 -  优化

摘要:Office Keystime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n people and k keys on a straight line. Every person wants to get to the offi... 阅读全文
posted @ 2017-08-18 19:30 Pic 阅读(173) 评论(0) 推荐(0)
摘要:Time Limit: 3000MSMemory Limit: 65536KTotal Submissions: 3119Accepted: 696DescriptionThe Disc, being flat, has no real horizon. Any adventurous sailors who get funny ideas from staring at eggs and ora... 阅读全文
posted @ 2017-08-06 20:54 Pic 阅读(265) 评论(0) 推荐(0)
摘要:给定n个最多为32位的数, 阅读全文
posted @ 2017-05-25 21:56 Pic 阅读(130) 评论(0) 推荐(0)
摘要:Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Description You are given a sequence of positive integers x1, x2, ..., xn and two non-negative integers a and b. Your ... 阅读全文
posted @ 2017-03-16 17:07 Pic 阅读(272) 评论(0) 推荐(0)
摘要:免费馅饼Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24440 Accepted Submission(s): 8264 Problem Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽... 阅读全文
posted @ 2017-03-13 18:25 Pic 阅读(172) 评论(0) 推荐(0)
摘要:Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ou... 阅读全文
posted @ 2017-03-13 13:00 Pic 阅读(182) 评论(0) 推荐(0)
摘要:Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 107 Accepted Submission(s): 69 Problem Description On Saint Valentine's Day, Alex imagined to pr... 阅读全文
posted @ 2017-02-12 22:45 Pic 阅读(129) 评论(0) 推荐(0)
摘要:对于a^b,普通的求法是用一个循环一直乘b个a,这样的方法对于某些题目来说可能显得比较慢。 二分快速幂是一种利用b的二进制特征来快速求a^b的算法。 例如: a = 2, b = 35 则b的二进制表示形式为100011 则 a^b = (2^32) * (2^2) * (2^1) 有了这样的思路之 阅读全文
posted @ 2016-11-15 10:46 Pic 阅读(169) 评论(0) 推荐(0)