feng_zhiyu的博客

http://www.fzhiy.com/ 欢迎关注我的博客,期待与大家一起学习~

【PAT甲级】1044 Shopping in Mars(25 分)(二分法)

题目链接 Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When ...

2018-08-24 14:35:44

阅读数 70

评论数 0

【PAT甲级】1057 Stack (30)(BIT+二分)

题目链接 Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include...

2018-08-01 22:09:02

阅读数 90

评论数 0

【PAT甲级】1085 Perfect Sequence (25)(二分法)

题目链接 Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M &a...

2018-07-27 21:41:46

阅读数 45

评论数 0

【PAT 甲级】1010 Radix (25)(二分法)

题目链接Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a de...

2018-07-11 15:57:57

阅读数 38

评论数 0

(UVA - 11524) Values whose Sum is 0(二分+枚举)

链接: https://vjudge.net/problem/UVA-1152分析:最简单粗暴的方法 4个循环,但是一定TLE,然后a,b分别相加再枚举,复杂度降低了,和二分结合,时间复杂度降为O(n^2log(n))#include<cstdio> #include<set&...

2017-08-13 15:57:56

阅读数 119

评论数 0

内部收益率(二分法)

在金融中,我们有时会用内部收益率IRR来评价项目的投资财务效益,它等于使得投资净现值NPV等于0的贴现率。换句话说,给定项目的期数T、初始现金流CF0和项目各期的现金流CF1, CF2, …,CFT,IRR是下面方程的解:为了简单起见,本题假定:除了项目启动时有一笔投入(即初始现金流CF0 <...

2017-08-07 15:48:45

阅读数 860

评论数 2

提示
确定要删除当前文章?
取消 删除
关闭
关闭