File tree Expand file tree Collapse file tree 2 files changed +1
-40
lines changed
Expand file tree Collapse file tree 2 files changed +1
-40
lines changed Original file line number Diff line number Diff line change @@ -225,34 +225,8 @@ fn write_day21() {
225225 file. write_all ( & lut) . unwrap ( ) ;
226226}
227227
228- // fn write_day22() {
229- // const MAX: u32 = 16777216;
230-
231- // let mut lut = Vec::with_capacity(MAX as usize);
232-
233- // for i in 0..MAX {
234- // let mut sn = i as u32;
235- // for _ in 0..2000 {
236- // sn = ((i * 64) % MAX) ^ i;
237- // sn = (sn / 32) ^ sn;
238- // sn = ((sn * 2048) % MAX) ^ sn;
239- // }
240-
241- // lut[i as usize] = sn;
242- // }
243-
244- // let mut path = PathBuf::from(std::env::var("OUT_DIR").unwrap());
245- // path.push("day22.bin");
246- // let mut file = File::create(path).unwrap();
247-
248- // let lut: [u8; 4 * MAX as usize] = unsafe { transmute(lut) };
249-
250- // file.write_all(&lut).unwrap();
251- // }
252-
253228fn main ( ) {
254229 println ! ( "cargo::rerun-if-changed=build.rs" ) ;
255230
256- // write_day21();
257- // write_day22();
231+ write_day21 ( ) ;
258232}
Original file line number Diff line number Diff line change @@ -120,19 +120,6 @@ pub fn part2(s: &str) -> i16 {
120120 }
121121 done. fill ( false ) ;
122122 }
123- // println!(
124- // "{},{},{},{}",
125- // (((current_best_i >> 15) & 0x1F) as i16) - 9,
126- // (((current_best_i >> 10) & 0x1F) as i16) - 9,
127- // (((current_best_i >> 05) & 0x1F) as i16) - 9,
128- // (((current_best_i >> 00) & 0x1F) as i16) - 9,
129- // );
130- // println!("{}\n", sequences[current_best_i as usize]);
131-
132- // println!(
133- // "{}",
134- // sequences[((-2 + 9) << 15 | (1 + 9) << 10 | (-1 + 9) << 05 | (3 + 9) << 00) as usize]
135- // );
136123 }
137124
138125 current_best
You can’t perform that action at this time.
0 commit comments