@@ -66,8 +66,6 @@ pub fn solve_small(task: Task) -> Vec<Command> {
6666 Point :: new( 0 , 1 ) ,
6767 ] ) ;
6868 let mut hand_count = 0 ;
69- let mut fast_wheel_count = 0 ;
70- let mut fast_wheel_turns = 0 ;
7169
7270 while remaining > 0 {
7371 while hand_count > 0 && !new_bodies. is_empty ( ) {
@@ -76,13 +74,8 @@ pub fn solve_small(task: Task) -> Vec<Command> {
7674 bodies_diff. push ( new_hand) ;
7775 res. push ( Command :: NewHand ( new_hand) ) ;
7876 }
79- if fast_wheel_count > 0 && fast_wheel_turns == 0 {
80- fast_wheel_count -= 1 ;
81- res. push ( Command :: FastWheel ) ;
82- fast_wheel_turns = 50 ;
83- }
8477
85- let mut data: Matrix < Option < ( Move , usize ) > > = Matrix :: new ( width, height, None ) ;
78+ let mut data: Matrix < Option < ( Move , u16 ) > > = Matrix :: new ( width, height, None ) ;
8679 let mut queue = VecDeque :: new ( ) ;
8780 queue. push_back ( cp) ;
8881 data. set ( cp, Some ( ( Move :: Noop , 0 ) ) ) ;
@@ -121,7 +114,6 @@ pub fn solve_small(task: Task) -> Vec<Command> {
121114 }
122115 Some ( Some ( BoosterType :: FastMove ) ) => {
123116 booster_map. set ( iter, None ) ;
124- fast_wheel_count += 1 ;
125117 }
126118 _ => { }
127119 }
@@ -130,13 +122,9 @@ pub fn solve_small(task: Task) -> Vec<Command> {
130122 _ => panic ! ( "no data" ) ,
131123 } ;
132124 iter = iter. revert_with ( mv) ;
133- if * cost - 1 < fast_wheel_turns {
134- iter = iter. revert_with ( mv) ;
135- }
136125 local_cmds. push ( Command :: Move ( mv. clone ( ) ) ) ;
137126 }
138127 local_cmds. reverse ( ) ;
139- fast_wheel_count -= std:: cmp:: min ( fast_wheel_count, local_cmds. len ( ) ) ;
140128 res. extend ( local_cmds) ;
141129
142130 cp = c;
@@ -145,11 +133,7 @@ pub fn solve_small(task: Task) -> Vec<Command> {
145133 }
146134 moves. shuffle ( & mut rng) ;
147135 for m in & moves {
148- let nc = if cost < fast_wheel_turns {
149- c. move_with ( m) . move_with ( m)
150- } else {
151- c. move_with ( m)
152- } ;
136+ let nc = c. move_with ( m) ;
153137 if let Some ( None ) = data. get ( nc) {
154138 if let Some ( true ) = valid. get ( nc) {
155139 data. set ( nc, Some ( ( m. clone ( ) , cost + 1 ) ) ) ;
0 commit comments