sohel, thank u very much, u enlightened me:)
I use bisearch to find the first one in a1-an
which larger than an/2, supposing it's ai
which larger than an/3, supposing it's aj
which larger than an/5, supposing it's ak
then an+1 is min{2*ai, 3*aj, 5*ak}
Search found 6 matches
- Tue Jan 08, 2008 9:19 am
- Forum: Algorithms
- Topic: V = 2^i * 3^j * 5^k, how 2 work out the problem efficiently?
- Replies: 7
- Views: 8264
- Mon Jan 07, 2008 12:20 pm
- Forum: Algorithms
- Topic: V = 2^i * 3^j * 5^k, how 2 work out the problem efficiently?
- Replies: 7
- Views: 8264
V = 2^i * 3^j * 5^k, how 2 work out the problem efficiently?
Recently, I met an interesting problem, I don't know whether VOJ has a similar problem.
V = 2^i * 3^j * 5^k
i, j, k all belong to natural number, i.e. , 0, 1, 2...
so, V can be 1, 2, 3, 4, 5, 6, 8, 9, 10,..... in ascending order.
Input is n, which represents the order number of V
Output is the ...
V = 2^i * 3^j * 5^k
i, j, k all belong to natural number, i.e. , 0, 1, 2...
so, V can be 1, 2, 3, 4, 5, 6, 8, 9, 10,..... in ascending order.
Input is n, which represents the order number of V
Output is the ...
- Tue Dec 25, 2007 7:19 am
- Forum: FAQ
- Topic: How Can I See The Whole Ranklist Of The Problem I Solved?
- Replies: 0
- Views: 5750
How Can I See The Whole Ranklist Of The Problem I Solved?
I want 2 see the whole ranklist of the problem I got ac with,
not only the top 20.
I remembered the old system could, but how about the new one?
Thanks!
not only the top 20.
I remembered the old system could, but how about the new one?
Thanks!
- Tue Dec 25, 2007 6:49 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 110643
- Mon Dec 24, 2007 7:05 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 110643
I also got RTE, but on POJ, I got AC.
http://acm.pku.edu.cn/JudgeOnline/problemlist
This is my code. Can anybody tell me why RTE on VOJ. Thanks A LOT!
http://acm.pku.edu.cn/JudgeOnline/problemlist
This is my code. Can anybody tell me why RTE on VOJ. Thanks A LOT!
Code: Select all
/*HIDE*/