i**********e 发帖数: 1145 | 1 其实我之前的帖子有一些错误.
例如,我的假设是integer是错的.
liveInBoston 也犯了这个错误,题目说 N, D, C, F is real numbers.
另外,我也漏了一些细节部分.
例如,忘了处理当中间没油了的情况.
但是基本思路还是对的.
我已经把我解这道题的详细思路 记录在这里:
http://www.ihas1337code.com/2011/01/nuts-in-oasis-interview-que
Below is my output for the sample test cases:
N: 1 D: 1 C: 1 F: 1 maxNuts: 0
N: 1 D: 2 C: 1 F: 1 maxNuts: 0
N: 1 D: 0.25 C: 1 F: 1 maxNuts: 0.75
N: 2 D: 1 C: 1 F: 1 maxNuts: 0.333333
N: ... 阅读全帖 |
|