回复:My bad! I didn't read your solution carefully.

回答: 回复:It simplifies the problem.sub1012008-02-13 07:24:26

Your logic thinking is great. Your solution is my first thought. However, if you like to find out the best algorithm, calculation is cheaper than logic comparison.

所有跟帖: 

回复:回复:My bad! I didn't read your solution carefully. -sub101- 给 sub101 发送悄悄话 (0 bytes) () 02/13/2008 postreply 07:37:29

回复:回复:But I am not sure -sub101- 给 sub101 发送悄悄话 (55 bytes) () 02/13/2008 postreply 07:38:49

1 abs > 1 compare -Jamesxu- 给 Jamesxu 发送悄悄话 (507 bytes) () 02/13/2008 postreply 08:35:15

sub01's calculation might takes long cpu circle -Jamesxu- 给 Jamesxu 发送悄悄话 (380 bytes) () 02/13/2008 postreply 08:24:43

回复:multiply by 2 is same as bit shift -sub101- 给 sub101 发送悄悄话 (73 bytes) () 02/13/2008 postreply 08:48:02

回复:sub01's calculation might takes long cpu circle -DCD- 给 DCD 发送悄悄话 (78 bytes) () 02/13/2008 postreply 09:04:19

回复:回复:it doesn't work! -sub101- 给 sub101 发送悄悄话 (85 bytes) () 02/13/2008 postreply 09:09:04

回复:it doesn't work! - Yes mistake- thx -DCD- 给 DCD 发送悄悄话 (274 bytes) () 02/13/2008 postreply 09:37:47

请您先登陆,再发跟帖!