Search found 4 matches
- Fri Oct 26, 2007 10:01 am
- Forum: Volume 113 (11300-11399)
- Topic: 11319 - Stupid Sequence
- Replies: 19
- Views: 9695
- Wed Oct 24, 2007 1:36 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11319 - Stupid Sequence
- Replies: 19
- Views: 9695
- Sat Sep 08, 2007 11:00 am
- Forum: Volume 112 (11200-11299)
- Topic: 11264 - Coin Collector
- Replies: 14
- Views: 7552
DP
Our team use dynamic programming to slove it in O(n^2) time.
- Wed Sep 05, 2007 3:57 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11269 - Setting Problems
- Replies: 26
- Views: 15006
greedy algorithm
I using greedy algorithm.
if a[] present the time the first people use to set each problem and b[] for second.
if min(ai,aj,bi,bj)==ai or ==bj, then set the ith problem before the jth.
Furthermore if min(a1,b1...an,bn)==ak let k be the first one to be solved,
or if min(a1,b1...an,bn)==bk let k be ...
if a[] present the time the first people use to set each problem and b[] for second.
if min(ai,aj,bi,bj)==ai or ==bj, then set the ith problem before the jth.
Furthermore if min(a1,b1...an,bn)==ak let k be the first one to be solved,
or if min(a1,b1...an,bn)==bk let k be ...