2016, 2017, 2018, 2024 puzzle progress
This commit is contained in:
parent
af075edb24
commit
e1bdbe21c8
@ -1,5 +1,5 @@
|
|||||||
const SCREEN_COLS: usize = 8;
|
const SCREEN_COLS: usize = 50;
|
||||||
const SCREEN_ROWS: usize = 3;
|
const SCREEN_ROWS: usize = 6;
|
||||||
const SCREEN_SIZE: usize = SCREEN_COLS * SCREEN_ROWS;
|
const SCREEN_SIZE: usize = SCREEN_COLS * SCREEN_ROWS;
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
@ -17,25 +17,35 @@ struct World {
|
|||||||
|
|
||||||
impl Actions {
|
impl Actions {
|
||||||
// rotate a column 1 time.
|
// rotate a column 1 time.
|
||||||
fn rotate_column(&self, column_index: u32, target: &mut [bool; SCREEN_SIZE]) {
|
fn rotate_column(&self, column_index: usize, target: &mut [bool; SCREEN_SIZE]) {
|
||||||
let first_value = target[column_index as usize];
|
// Save the bottom value (wrap-around)
|
||||||
let mut last_value = false;
|
let bottom = target[(SCREEN_ROWS - 1) * SCREEN_COLS + column_index];
|
||||||
for index in (0..SCREEN_COLS).rev() {
|
|
||||||
let offset = index as u32 * SCREEN_COLS as u32 + column_index;
|
// Shift everything down
|
||||||
let next_offset = offset + SCREEN_COLS as u32;
|
for row in (1..SCREEN_ROWS).rev() {
|
||||||
println!("index: {} offset: {} next_offset: {}",
|
let from = (row - 1) * SCREEN_COLS + column_index;
|
||||||
index, offset, next_offset);
|
let to = row * SCREEN_COLS + column_index;
|
||||||
last_value = target[offset as usize];
|
target[to] = target[from];
|
||||||
target[offset as usize] = last_value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Put the old bottom value at the top
|
||||||
|
target[column_index] = bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rotate a row 1 time.
|
// rotate a row 1 time.
|
||||||
fn rotate_row(&self, row_index: u32, target: &mut [bool; SCREEN_SIZE]) {
|
fn rotate_row(&self, row_index: u32, target: &mut [bool; SCREEN_SIZE]) {
|
||||||
for index in (SCREEN_ROWS..0).rev() {
|
// Save the last element of the row
|
||||||
let offset = index as u32 * SCREEN_COLS as u32 + index as u32;
|
let rightmost = target[(row_index * SCREEN_COLS as u32 + (SCREEN_COLS - 1) as u32) as usize];
|
||||||
println!("index = {index} offset = {offset}");
|
|
||||||
|
// Shift everything to the right
|
||||||
|
for col in (1..SCREEN_COLS).rev() {
|
||||||
|
let from = row_index * SCREEN_COLS as u32 + (col - 1) as u32;
|
||||||
|
let to = row_index * SCREEN_COLS as u32 + col as u32;
|
||||||
|
target[to as usize] = target[from as usize];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Put the old rightmost value at the start
|
||||||
|
target[(row_index * SCREEN_COLS as u32) as usize] = rightmost;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn apply(&self, target: &mut [bool; SCREEN_SIZE]) {
|
pub fn apply(&self, target: &mut [bool; SCREEN_SIZE]) {
|
||||||
@ -61,7 +71,7 @@ impl Actions {
|
|||||||
let actual_rotate = distance_to_rotate % 6;
|
let actual_rotate = distance_to_rotate % 6;
|
||||||
println!("Rotate Column {column_to_rotate} by {distance_to_rotate} ({actual_rotate})");
|
println!("Rotate Column {column_to_rotate} by {distance_to_rotate} ({actual_rotate})");
|
||||||
for _ in 0..*distance_to_rotate {
|
for _ in 0..*distance_to_rotate {
|
||||||
self.rotate_column(*column_to_rotate, target)
|
self.rotate_column(*column_to_rotate as usize, target)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,13 +93,27 @@ impl Actions {
|
|||||||
let (_, axis_to_rotate_s) = axis_stub.split_once('=').unwrap();
|
let (_, axis_to_rotate_s) = axis_stub.split_once('=').unwrap();
|
||||||
let distance_to_rotate = distance_to_rotate_s.parse::<u32>().unwrap();
|
let distance_to_rotate = distance_to_rotate_s.parse::<u32>().unwrap();
|
||||||
let axis_to_rotate = axis_to_rotate_s.parse::<u32>().unwrap();
|
let axis_to_rotate = axis_to_rotate_s.parse::<u32>().unwrap();
|
||||||
Actions::RotateColumn(axis_to_rotate, distance_to_rotate)
|
match direction {
|
||||||
|
"column" => {Actions::RotateColumn(axis_to_rotate, distance_to_rotate)}
|
||||||
|
"row" => {Actions::RotateRow(axis_to_rotate, distance_to_rotate)}
|
||||||
|
_ => { unreachable!("Invalid rotation"); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
unreachable!("Invalid command -> [[{input}]]");
|
unreachable!("Invalid command -> [[{input}]]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn num_lit(body: &[bool; SCREEN_SIZE]) -> u32 {
|
||||||
|
let mut num_lit = 0;
|
||||||
|
|
||||||
|
for index in 0..SCREEN_SIZE {
|
||||||
|
if body[index] { num_lit += 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
num_lit
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -97,28 +121,25 @@ fn dump_screen(to_display: &[bool; SCREEN_SIZE]) {
|
|||||||
for row in 0..SCREEN_ROWS {
|
for row in 0..SCREEN_ROWS {
|
||||||
for column in 0..SCREEN_COLS {
|
for column in 0..SCREEN_COLS {
|
||||||
let offset = row * SCREEN_COLS + column;
|
let offset = row * SCREEN_COLS + column;
|
||||||
// println!("Rendering offset {offset}");
|
|
||||||
print!("{}", if to_display[offset] { '#' } else { ' ' });
|
print!("{}", if to_display[offset] { '#' } else { ' ' });
|
||||||
}
|
}
|
||||||
println!();
|
println!();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use core::read_data;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut screen_space:[bool; SCREEN_SIZE] = [false; SCREEN_SIZE];
|
let mut screen_space:[bool; SCREEN_SIZE] = [false; SCREEN_SIZE];
|
||||||
|
|
||||||
let mut world = World {
|
|
||||||
width: 8,
|
|
||||||
height: 3,
|
|
||||||
memory: Box::new([false; 8*3]),
|
|
||||||
};
|
|
||||||
|
|
||||||
let directions = vec![
|
let directions = vec![
|
||||||
"rect 3x2",
|
"rect 3x2",
|
||||||
"rotate column x=1 by 1",
|
"rotate column x=1 by 1",
|
||||||
"rotate row y=0 by 4",
|
"rotate row y=0 by 4",
|
||||||
"rotate column x=1 by 1"
|
"rotate column x=1 by 1"
|
||||||
];
|
];
|
||||||
|
let binding = read_data("2016_08_data.txt");
|
||||||
|
let directions = binding.lines();
|
||||||
|
|
||||||
for direction in directions {
|
for direction in directions {
|
||||||
let parsed = Actions::parse(direction);
|
let parsed = Actions::parse(direction);
|
||||||
@ -126,6 +147,9 @@ fn main() {
|
|||||||
println!("[[{direction}]] -> [[{parsed:?}]]");
|
println!("[[{direction}]] -> [[{parsed:?}]]");
|
||||||
dump_screen(&screen_space);
|
dump_screen(&screen_space);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
println!("There are {} lit.", Actions::num_lit(&screen_space));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 106 lit.
|
||||||
|
// b> Code is CFLELOYFCS
|
||||||
3
2016/src/bin/2016_08b.rs
Normal file
3
2016/src/bin/2016_08b.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
println!("The answer is CFLELOYFCS. Part A display showed that.");
|
||||||
|
}
|
||||||
59
2016/src/bin/2016_09b.rs
Normal file
59
2016/src/bin/2016_09b.rs
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
use std::ptr::hash;
|
||||||
|
use core::read_data;
|
||||||
|
/// Calculate the decompressed length of a string.
|
||||||
|
/// If `recursive` is true, markers are expanded recursively (Part 2).
|
||||||
|
/// If `recursive` is false, markers are expanded only once (Part 1).
|
||||||
|
fn decompressed_len(input: &str, recursive: bool) -> usize {
|
||||||
|
let mut total = 0;
|
||||||
|
let mut i = 0;
|
||||||
|
let binding = input.to_ascii_uppercase();
|
||||||
|
let bytes = binding.as_bytes();
|
||||||
|
|
||||||
|
while i < bytes.len() {
|
||||||
|
if bytes[i] == b'(' {
|
||||||
|
// find end of marker
|
||||||
|
let end = input[i..].find(')').unwrap() + i;
|
||||||
|
let marker = &input[i + 1..end];
|
||||||
|
let (a, b) = marker.split_once('x').unwrap();
|
||||||
|
let a: usize = a.parse().unwrap();
|
||||||
|
let b: usize = b.parse().unwrap();
|
||||||
|
i = end + 1;
|
||||||
|
|
||||||
|
let segment = &input[i..i + a];
|
||||||
|
let seg_len = if recursive {
|
||||||
|
decompressed_len(segment, true)
|
||||||
|
} else {
|
||||||
|
segment.len()
|
||||||
|
};
|
||||||
|
total += seg_len * b;
|
||||||
|
i += a;
|
||||||
|
} else {
|
||||||
|
total += 1;
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
total
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let puzzle_input = read_data("2016_09_data.txt");
|
||||||
|
let params = vec![
|
||||||
|
("ADVENT", 6),
|
||||||
|
("A(1x5)BC", 7),
|
||||||
|
("(3x3)XYZ", 9),
|
||||||
|
("A(2x2)BCD(2x2)EFG", 11),
|
||||||
|
("(6x1)(1x3)A", 6),
|
||||||
|
("X(8x2)(3x3)ABCY", 18),
|
||||||
|
(puzzle_input.as_str(), 100)
|
||||||
|
];
|
||||||
|
|
||||||
|
for (input, size) in params {
|
||||||
|
|
||||||
|
let decompressed_size = decompressed_len(input, true);
|
||||||
|
println!("Tested {} char string for expanded size of {} -> Calculated {}", input.len(), size, decompressed_size);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 11125026826 ChatGPT held my hand through this as parsing text is not my strong point.
|
||||||
77
2016/src/bin/2016_10a.rs
Normal file
77
2016/src/bin/2016_10a.rs
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
use std::collections::HashMap;
|
||||||
|
use core::read_data;
|
||||||
|
#[derive(Debug)]
|
||||||
|
enum InputLines {
|
||||||
|
Distribution { bot_id: u32, low_target: u32, high_target: u32 },
|
||||||
|
Allocation { bot_id: u32, value: u32 },
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Bot {
|
||||||
|
id: u32,
|
||||||
|
values: [u32; 2],
|
||||||
|
low_target: u32,
|
||||||
|
high_target: u32
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for Bot {
|
||||||
|
fn default() -> Self {
|
||||||
|
Bot {
|
||||||
|
id: u32::MAX,
|
||||||
|
values: [u32::MAX; 2],
|
||||||
|
low_target: u32::MAX,
|
||||||
|
high_target: u32::MAX
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn parse_line(input: &str) -> InputLines {
|
||||||
|
let parts: Vec<_> = input.split_whitespace().collect();
|
||||||
|
|
||||||
|
match parts[0] {
|
||||||
|
"bot" => {
|
||||||
|
InputLines::Distribution {
|
||||||
|
bot_id: parts[1].parse::<u32>().unwrap(),
|
||||||
|
low_target: parts[6].parse::<u32>().unwrap(),
|
||||||
|
high_target: parts[11].parse::<u32>().unwrap(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"value" => {
|
||||||
|
InputLines::Allocation {
|
||||||
|
bot_id: parts[5].parse::<u32>().unwrap(),
|
||||||
|
value: parts[1].parse::<u32>().unwrap(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => { unreachable!("") }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let lines = "value 5 goes to bot 2\nbot 2 gives low to bot 1 and high to bot 0\nvalue 3 goes to bot 1\nbot 1 gives low to output 1 and high to bot 0\nbot 0 gives low to output 2 and high to output 0\nvalue 2 goes to bot 2";
|
||||||
|
let lines = read_data("2016_10_data.txt");
|
||||||
|
|
||||||
|
let mut botmap: HashMap<u32, Bot> = HashMap::new();
|
||||||
|
|
||||||
|
for line in lines.lines() {
|
||||||
|
let parsed = parse_line(line);
|
||||||
|
match parse_line(line) {
|
||||||
|
InputLines::Distribution { bot_id, low_target, high_target } => {
|
||||||
|
// find the bot if it exists...
|
||||||
|
botmap.entry(bot_id).or_insert(Bot { id: bot_id, values: [0, 0], low_target, high_target } );
|
||||||
|
}
|
||||||
|
InputLines::Allocation { bot_id, value: value_new } => {
|
||||||
|
botmap.entry(bot_id).or_insert(Bot { id: bot_id, values: [0, 0], low_target: 0, high_target: 0 } );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
println!("Botmap has {} entries.", botmap.keys().len());
|
||||||
|
|
||||||
|
|
||||||
|
let mut num_2chips = 0;
|
||||||
|
for (key, bot) in botmap {
|
||||||
|
println!("Bot ID : {key} / {} & {}", bot.values[0], bot.values[1]);
|
||||||
|
if bot.values[0] != 0 && bot.values[1] != 0 {
|
||||||
|
num_2chips += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
println!("Found {num_2chips} bots with 2 chips.");
|
||||||
|
}
|
||||||
61
2016/src/bin/2016_19a.rs
Normal file
61
2016/src/bin/2016_19a.rs
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
const NUM_ELVES: u32 = 3014603;
|
||||||
|
|
||||||
|
fn next_elf_id(current_elf: u32, elves: &Vec<u32>) -> u32 {
|
||||||
|
let mut real_return_value: i32 = -1;
|
||||||
|
while real_return_value < 0 {
|
||||||
|
let mut working_next = if current_elf + 1 == NUM_ELVES {
|
||||||
|
0
|
||||||
|
} else {
|
||||||
|
current_elf + 1
|
||||||
|
};
|
||||||
|
|
||||||
|
while elves[working_next as usize] == 0 {
|
||||||
|
working_next += 1;
|
||||||
|
if working_next == NUM_ELVES {
|
||||||
|
working_next = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
real_return_value = working_next as i32
|
||||||
|
}
|
||||||
|
|
||||||
|
real_return_value as u32
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let mut elves = vec![1; NUM_ELVES as usize];
|
||||||
|
let mut elf_with_presents = -1;
|
||||||
|
let mut num_loops = 0;
|
||||||
|
let mut num_with_presents = 0;
|
||||||
|
|
||||||
|
while num_with_presents != 1 && num_loops < 80 {
|
||||||
|
for current_elf in 0..NUM_ELVES {
|
||||||
|
// if the elf has a present...
|
||||||
|
if elves[current_elf as usize] > 0 {
|
||||||
|
let next_elf_id = next_elf_id(current_elf, &elves);
|
||||||
|
// ...look at the next elf and take their presents.
|
||||||
|
let num_to_take = elves[next_elf_id as usize];
|
||||||
|
elves[current_elf as usize] += num_to_take;
|
||||||
|
let new_total = elves[current_elf as usize];
|
||||||
|
elves[next_elf_id as usize] = 0;
|
||||||
|
// println!("Elf {} took {} presents from {} and has {} now.", current_elf + 1, num_to_take, next_elf_id + 1, new_total);
|
||||||
|
} else {
|
||||||
|
// println!("Elf {} has no presents and is skipped.", current_elf + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut last_elf = -1i32;
|
||||||
|
num_with_presents = 0;
|
||||||
|
last_elf = 0;
|
||||||
|
for count_elf in 0..NUM_ELVES {
|
||||||
|
if elves[count_elf as usize] > 0 {
|
||||||
|
num_with_presents += 1;
|
||||||
|
last_elf = count_elf as i32;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
println!("There are {num_with_presents} elves with presents. Last ID was {last_elf}");
|
||||||
|
num_loops += 1;
|
||||||
|
}
|
||||||
|
// println!("Elves: {elves:?}");
|
||||||
|
}
|
||||||
|
// 1834903
|
||||||
|
|
||||||
63
2016/src/bin/2016_20a.rs
Normal file
63
2016/src/bin/2016_20a.rs
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
use std::arch::x86_64::__get_cpuid_max;
|
||||||
|
use std::io::{stdout, Write};
|
||||||
|
use core::read_data;
|
||||||
|
|
||||||
|
struct Firewall {
|
||||||
|
blocked_ranges: Vec<(u32, u32)>
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Firewall {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Firewall { blocked_ranges: vec![] }
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn add_range(&mut self, min: u32, max: u32) {
|
||||||
|
self.blocked_ranges.push((min, max));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Check if the target IP is allowed.
|
||||||
|
pub fn valid(&self, target: u32) -> (bool, u32) {
|
||||||
|
let mut is_valid = true;
|
||||||
|
let mut return_max = target + 1;
|
||||||
|
|
||||||
|
for (cmin, cmax) in self.blocked_ranges.clone() {
|
||||||
|
if target <= cmax && target >= cmin {
|
||||||
|
return_max = cmax;
|
||||||
|
is_valid = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
(is_valid, return_max)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn add_range_str(&mut self, line: &str) {
|
||||||
|
let (new_min_s, new_max_s) = line.split_once('-').unwrap();
|
||||||
|
self.blocked_ranges.push((new_min_s.parse::<u32>().unwrap(), new_max_s.parse::<u32>().unwrap()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let binding = read_data("2016_20_data.txt");
|
||||||
|
let lines = binding.lines();
|
||||||
|
// let lines = "5-8\n0-2\n4-7".lines();
|
||||||
|
|
||||||
|
let mut firewall = Firewall::new();
|
||||||
|
|
||||||
|
for line in lines {
|
||||||
|
firewall.add_range_str(line)
|
||||||
|
}
|
||||||
|
println!("Firewall has {} rules.", firewall.blocked_ranges.len());
|
||||||
|
|
||||||
|
let mut current_target = 0;
|
||||||
|
while current_target < i32::MAX {
|
||||||
|
let (check_result, next_id) = firewall.valid(current_target as u32);
|
||||||
|
if check_result {
|
||||||
|
println!("Rule for {current_target} passed.");
|
||||||
|
break
|
||||||
|
}
|
||||||
|
current_target = next_id as i32;
|
||||||
|
current_target += 1;
|
||||||
|
if current_target % 10000 == 0 { print!("."); stdout().flush().unwrap() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 4793564
|
||||||
101
2016/src/bin/2016_20b.rs
Normal file
101
2016/src/bin/2016_20b.rs
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
use std::collections::HashMap;
|
||||||
|
use std::io::{stdout, Write};
|
||||||
|
use core::read_data;
|
||||||
|
|
||||||
|
struct Firewall {
|
||||||
|
blocked_ranges: Vec<(u32, u32)>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Firewall {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Firewall { blocked_ranges: vec![] }
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn add_range(&mut self, min: u32, max: u32) {
|
||||||
|
self.blocked_ranges.push((min, max));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Check if the target IP is allowed.
|
||||||
|
pub fn valid(&self, target: u32) -> bool {
|
||||||
|
let mut is_valid = true;
|
||||||
|
|
||||||
|
for (cmin, cmax) in self.blocked_ranges.clone() {
|
||||||
|
if target <= cmax && target >= cmin {
|
||||||
|
is_valid = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_valid
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn add_range_str(&mut self, line: &str) {
|
||||||
|
let (new_min_s, new_max_s) = line.split_once('-').unwrap();
|
||||||
|
self.blocked_ranges.push((new_min_s.parse::<u32>().unwrap(), new_max_s.parse::<u32>().unwrap()));
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn sort_rules(&mut self) {
|
||||||
|
self.blocked_ranges.sort_by_key(|x| x.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
use core::merge_ranges;
|
||||||
|
use core::format_with_commas;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let binding = read_data("2016_20_data.txt");
|
||||||
|
let lines = binding.lines();
|
||||||
|
let mut firewall = Firewall::new();
|
||||||
|
for line in lines {
|
||||||
|
print!(".");
|
||||||
|
stdout().flush().unwrap();
|
||||||
|
firewall.add_range_str(line);
|
||||||
|
}
|
||||||
|
firewall.sort_rules();
|
||||||
|
|
||||||
|
println!("Found {} ranges.", firewall.blocked_ranges.len());
|
||||||
|
let mut working_lines = vec![];
|
||||||
|
|
||||||
|
let mut index = 0;
|
||||||
|
|
||||||
|
let mut last_num_rows = i32::MAX;
|
||||||
|
|
||||||
|
while index < firewall.blocked_ranges.len() - 1 {
|
||||||
|
let r1 = firewall.blocked_ranges[index];
|
||||||
|
let r2 = firewall.blocked_ranges[index + 1];
|
||||||
|
let merge_result = merge_ranges(r1, r2);
|
||||||
|
match merge_result {
|
||||||
|
None => {
|
||||||
|
// println!("NO MERGE -> {}-{} / {}-{}",
|
||||||
|
// format_with_commas(r1.0),
|
||||||
|
// format_with_commas(r1.1),
|
||||||
|
// format_with_commas(r2.0),
|
||||||
|
// format_with_commas(r2.1));
|
||||||
|
}
|
||||||
|
Some(merged) => {
|
||||||
|
// println!("MERGED -> {}-{} / {}-{} = {}-{}",
|
||||||
|
// format_with_commas(r1.0),
|
||||||
|
// format_with_commas(r1.1),
|
||||||
|
// format_with_commas(r2.0),
|
||||||
|
// format_with_commas(r2.1),
|
||||||
|
// format_with_commas(merged.0),
|
||||||
|
// format_with_commas(merged.1));
|
||||||
|
working_lines.push(merged);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
index += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
println!("Went from {} to {}", firewall.blocked_ranges.len(), working_lines.len());
|
||||||
|
|
||||||
|
let mut num_blocked = 0u64;
|
||||||
|
let mut last_max = 0;
|
||||||
|
for index in 0..working_lines.len() {
|
||||||
|
let (cmin, cmax) = working_lines[index];
|
||||||
|
num_blocked += (cmax - cmin) as u64;
|
||||||
|
last_max = cmax;
|
||||||
|
}
|
||||||
|
println!("Found {num_blocked} blocked.");
|
||||||
|
let allowed = last_max - num_blocked as u32;
|
||||||
|
println!("Found {allowed} permitted.");
|
||||||
|
}
|
||||||
|
// 852102276 too high
|
||||||
|
// 851631862
|
||||||
@ -9,27 +9,41 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::str;
|
||||||
use core::read_data;
|
use core::read_data;
|
||||||
|
|
||||||
fn is_valid(input: &str) -> bool {
|
fn is_valid(input: &str) -> bool {
|
||||||
|
let mut is_valid = true;
|
||||||
let parts = input.split(' ');
|
let parts = input.split(' ');
|
||||||
let mut working = HashMap::new();
|
let expected_parts = parts.clone().count();
|
||||||
|
let mut working: HashMap<&str, u32> = HashMap::new();
|
||||||
|
|
||||||
for part in parts {
|
for part in parts {
|
||||||
working.entry(part);
|
*working.entry(part).or_insert(0);
|
||||||
}
|
}
|
||||||
true
|
println!("Working has {} entries.", working.keys().len());
|
||||||
|
expected_parts == working.keys().len()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// let binding = read_data("2017_04_data.txt");
|
let binding = read_data("2017_04_data.txt");
|
||||||
let params = vec![
|
let params = vec![
|
||||||
("aa bb cc dd ee", true),
|
("aa bb cc dd ee", true),
|
||||||
("aa bb cc dd aa", false),
|
("aa bb cc dd aa", false),
|
||||||
("aa bb cc dd aaa", true)
|
("aa bb cc dd aaa", true)
|
||||||
];
|
];
|
||||||
|
|
||||||
for (input, expected) in params {
|
for (input, expected) in params {
|
||||||
let actual = is_valid(input);
|
let actual = is_valid(input);
|
||||||
println!("||{input}|| was expected to be {expected} but was {actual}");
|
println!("{}\t||{input}|| expected to be {expected} and was {actual}",
|
||||||
|
if actual == expected { '✔' } else { '❌' }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut num_valid = 0;
|
||||||
|
for to_check in binding.lines() {
|
||||||
|
if is_valid(to_check) { num_valid += 1 }
|
||||||
}
|
}
|
||||||
|
println!("Found {num_valid} valid entries.");
|
||||||
|
}
|
||||||
|
// 451
|
||||||
|
|||||||
27
2017/src/bin/2017_05a.rs
Normal file
27
2017/src/bin/2017_05a.rs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
use core::read_data;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let mut instructions = vec![];
|
||||||
|
let mut instruction_pointer: i32 = 0;
|
||||||
|
let input = "0\n3\n0\n1\n-3";
|
||||||
|
//let input = read_data("2017_05_data.txt");
|
||||||
|
let lines = input.lines();
|
||||||
|
let num_lines = lines.clone().count();
|
||||||
|
println!("Found {num_lines}");
|
||||||
|
for line in lines {
|
||||||
|
let value = line.parse::<i32>().unwrap();
|
||||||
|
instructions.push(value);
|
||||||
|
// println!("Line = [{value}]");
|
||||||
|
}
|
||||||
|
println!("Instructions loaded...Executing.");
|
||||||
|
let mut should_exit = false;
|
||||||
|
|
||||||
|
while !should_exit {
|
||||||
|
if instruction_pointer < 0 || instruction_pointer > num_lines as i32 { should_exit = true }
|
||||||
|
// find out the instruction we have at the current pointer...
|
||||||
|
let current_instruction = instructions[instruction_pointer as usize];
|
||||||
|
instructions[instruction_pointer as usize] += 1;
|
||||||
|
instruction_pointer += current_instruction;
|
||||||
|
}
|
||||||
|
println!("Final IP value is {instruction_pointer}");
|
||||||
|
}
|
||||||
@ -16,7 +16,11 @@ fn main() {
|
|||||||
let direction_val : i32 = velocity.parse().unwrap();
|
let direction_val : i32 = velocity.parse().unwrap();
|
||||||
match direction {
|
match direction {
|
||||||
"+" => {
|
"+" => {
|
||||||
working_value += direction_val;
|
let destination = working_value + direction_val;
|
||||||
|
for index in working_value..destination {
|
||||||
|
println!("At {index}");
|
||||||
|
}
|
||||||
|
working_value = destination;
|
||||||
}
|
}
|
||||||
"-" => {
|
"-" => {
|
||||||
working_value -= direction_val;
|
working_value -= direction_val;
|
||||||
@ -25,15 +29,6 @@ fn main() {
|
|||||||
unreachable!("Invalid direction");
|
unreachable!("Invalid direction");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println!("||{working_value}||\t");
|
|
||||||
if let Some(found) = visited_locations.get(&working_value) {
|
|
||||||
println!("GET SUCCESS -> {working_value} / {found}");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
for index in 0..working_value.abs() {
|
|
||||||
println!("Adding visit to {}", index + working_value);
|
|
||||||
visited_locations.insert(index + working_value, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// BROKEN
|
// BROKEN
|
||||||
62
2018/src/bin/2018_10a.rs
Normal file
62
2018/src/bin/2018_10a.rs
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
use core::read_data;
|
||||||
|
|
||||||
|
struct MovingPoint {
|
||||||
|
position_x: i32,
|
||||||
|
position_y: i32,
|
||||||
|
velocity_x: i32,
|
||||||
|
velocity_y: i32
|
||||||
|
}
|
||||||
|
|
||||||
|
impl MovingPoint {
|
||||||
|
fn current_position(&self) -> (i32, i32) {
|
||||||
|
(self.position_x, self.position_y)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn current_velocity(&self) -> (i32, i32) {
|
||||||
|
(self.velocity_x, self.velocity_y)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn tick(&mut self) {
|
||||||
|
self.position_x += self.velocity_x;
|
||||||
|
self.position_y += self.velocity_y;
|
||||||
|
}
|
||||||
|
|
||||||
|
// parse line like
|
||||||
|
// position=<-2, 3> velocity=< 1, 0>
|
||||||
|
fn parse(input: &str) -> Self {
|
||||||
|
let (_, balance) = input.split_once("=").unwrap();
|
||||||
|
let (pos_parts, vel_balance) = balance.split_once(">").unwrap();
|
||||||
|
let (pos_x, pos_y) = pos_parts.split_once(",").unwrap();
|
||||||
|
let (_, vel_balance) = vel_balance.split_once("=").unwrap();
|
||||||
|
let (vel_x, vel_y) = vel_balance.split_once(",").unwrap();
|
||||||
|
|
||||||
|
let position_x = pos_x.clone()[1..].trim().parse::<i32>().unwrap();
|
||||||
|
let position_y = pos_y.trim().parse::<i32>().unwrap();
|
||||||
|
let velocity_x = vel_x.clone()[1..].trim().parse::<i32>().unwrap();
|
||||||
|
let velocity_y = vel_y[0..(vel_y.len() - 1)].trim().parse::<i32>().unwrap();
|
||||||
|
|
||||||
|
MovingPoint {
|
||||||
|
position_x,
|
||||||
|
position_y,
|
||||||
|
velocity_x,
|
||||||
|
velocity_y,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let mut points = vec![];
|
||||||
|
|
||||||
|
let binding = read_data("2018_10_data_SAMPLE.txt");
|
||||||
|
let lines = binding.lines();
|
||||||
|
for line in lines {
|
||||||
|
// println!("Input: [[{line}]]");
|
||||||
|
let parsed = MovingPoint::parse(line);
|
||||||
|
points.push(parsed);
|
||||||
|
}
|
||||||
|
println!("Loaded {} points. Preparing to move them.", points.len());
|
||||||
|
|
||||||
|
for mut point in points {
|
||||||
|
point.tick()
|
||||||
|
}
|
||||||
|
}
|
||||||
92
2024/src/bin/2024_09a.rs
Normal file
92
2024/src/bin/2024_09a.rs
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
use core::read_data;
|
||||||
|
|
||||||
|
fn display_filesystem(from: &[u32]) {
|
||||||
|
for (index, value) in from.iter().enumerate() {
|
||||||
|
if index.is_multiple_of(16) { println!(); }
|
||||||
|
if *value < u32::MAX { print!("{value}"); } else { print!("_"); }
|
||||||
|
}
|
||||||
|
println!();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn build_filesystem(from: String) -> Vec<u32> {
|
||||||
|
let mut fs: Vec<u32> = vec![];
|
||||||
|
let mut file_entry = true;
|
||||||
|
let mut last_file_entry_id = 0;
|
||||||
|
for current_char in from.chars() {
|
||||||
|
let as_digit = current_char.to_digit(10).unwrap_or(0);
|
||||||
|
|
||||||
|
let (to_push, should_inc) = if file_entry {
|
||||||
|
(last_file_entry_id, true)
|
||||||
|
} else {
|
||||||
|
(u32::MAX, false)
|
||||||
|
};
|
||||||
|
|
||||||
|
if should_inc { last_file_entry_id += 1; }
|
||||||
|
for i in 0..as_digit {
|
||||||
|
fs.push(to_push)
|
||||||
|
}
|
||||||
|
file_entry = !file_entry;
|
||||||
|
}
|
||||||
|
fs
|
||||||
|
}
|
||||||
|
fn compact_filesystem(from: &[u32]) -> Vec<u32> {
|
||||||
|
let mut fs = from.clone().to_vec();
|
||||||
|
|
||||||
|
let mut left = 0;
|
||||||
|
let mut right = fs.len() - 1;
|
||||||
|
let fs_len = fs.len();
|
||||||
|
|
||||||
|
while left < right {
|
||||||
|
// find next empty slot from the left
|
||||||
|
while left < fs_len && fs[left] != u32::MAX {
|
||||||
|
left += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// find next data slot from the right
|
||||||
|
while right > 0 && fs[right] == u32::MAX {
|
||||||
|
right -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if left >= right {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// move data left
|
||||||
|
fs[left] = fs[right];
|
||||||
|
fs[right] = u32::MAX;
|
||||||
|
}
|
||||||
|
|
||||||
|
fs
|
||||||
|
}
|
||||||
|
|
||||||
|
fn calculate_checksum(from: &[u32]) -> u64 {
|
||||||
|
let mut checksum: u64 = 0;
|
||||||
|
for (index, &value) in from.iter().enumerate() {
|
||||||
|
if value != u32::MAX {
|
||||||
|
checksum += index as u64 * value as u64;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checksum
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
// let binding = "2333133121414131402".to_string();
|
||||||
|
let binding = read_data("2024_09_data.txt");
|
||||||
|
// build out the filesystem...
|
||||||
|
let mut filesystem = build_filesystem(binding);
|
||||||
|
|
||||||
|
println!("Filesystem built...");
|
||||||
|
// display_filesystem(&filesystem);
|
||||||
|
// ...start to compact it...
|
||||||
|
|
||||||
|
filesystem = compact_filesystem(&filesystem);
|
||||||
|
|
||||||
|
// ...calculate the checksum
|
||||||
|
|
||||||
|
// println!("filesystem post compact:");
|
||||||
|
// display_filesystem(&filesystem);
|
||||||
|
println!("Filesystem compacted...");
|
||||||
|
println!("Calculated Checksum = {} / Expected 1928", calculate_checksum(&filesystem));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6331212425418
|
||||||
@ -56,3 +56,37 @@ pub fn sum_of_vec(to_add: &Vec<u32>) -> u32 {
|
|||||||
}
|
}
|
||||||
working
|
working
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn merge_ranges(range_1: (u32, u32), range_2: (u32, u32)) -> Option<(u32, u32)> {
|
||||||
|
let (r1_start, r1_end) = (range_1.0.min(range_1.1), range_1.0.max(range_1.1));
|
||||||
|
let (r2_start, r2_end) = (range_2.0.min(range_2.1), range_2.0.max(range_2.1));
|
||||||
|
|
||||||
|
if r1_start <= r2_end && r2_start <= r1_end {
|
||||||
|
Some((r1_start.min(r2_start), r1_end.max(r2_end)))
|
||||||
|
} else {
|
||||||
|
None // no overlap
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn can_merge_ranges(range_1: (u32, u32), range_2: (u32, u32)) -> bool {
|
||||||
|
let (r1start, r1end) = range_1;
|
||||||
|
let (r2start, r2end) = range_2;
|
||||||
|
|
||||||
|
let (r1start, r1end) = (r1start.min(r1end), r1start.max(r1end));
|
||||||
|
let (r2start, r2end) = (r2start.min(r2end), r2start.max(r2end));
|
||||||
|
|
||||||
|
r1start <= r2end && r2start <= r1end
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn format_with_commas(n: u32) -> String {
|
||||||
|
let s = n.to_string();
|
||||||
|
let mut result = String::new();
|
||||||
|
let chars: Vec<_> = s.chars().collect();
|
||||||
|
for (i, c) in chars.iter().rev().enumerate() {
|
||||||
|
if i > 0 && i % 3 == 0 {
|
||||||
|
result.push(',');
|
||||||
|
}
|
||||||
|
result.push(*c);
|
||||||
|
}
|
||||||
|
result.chars().rev().collect()
|
||||||
|
}
|
||||||
@ -0,0 +1,170 @@
|
|||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 5
|
||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 5
|
||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 3
|
||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 2
|
||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 3
|
||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 2
|
||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 5
|
||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 5
|
||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 3
|
||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 2
|
||||||
|
rect 1x1
|
||||||
|
rotate row y=0 by 3
|
||||||
|
rect 2x1
|
||||||
|
rotate row y=0 by 2
|
||||||
|
rect 1x2
|
||||||
|
rotate row y=1 by 5
|
||||||
|
rotate row y=0 by 3
|
||||||
|
rect 1x2
|
||||||
|
rotate column x=30 by 1
|
||||||
|
rotate column x=25 by 1
|
||||||
|
rotate column x=10 by 1
|
||||||
|
rotate row y=1 by 5
|
||||||
|
rotate row y=0 by 2
|
||||||
|
rect 1x2
|
||||||
|
rotate row y=0 by 5
|
||||||
|
rotate column x=0 by 1
|
||||||
|
rect 4x1
|
||||||
|
rotate row y=2 by 18
|
||||||
|
rotate row y=0 by 5
|
||||||
|
rotate column x=0 by 1
|
||||||
|
rect 3x1
|
||||||
|
rotate row y=2 by 12
|
||||||
|
rotate row y=0 by 5
|
||||||
|
rotate column x=0 by 1
|
||||||
|
rect 4x1
|
||||||
|
rotate column x=20 by 1
|
||||||
|
rotate row y=2 by 5
|
||||||
|
rotate row y=0 by 5
|
||||||
|
rotate column x=0 by 1
|
||||||
|
rect 4x1
|
||||||
|
rotate row y=2 by 15
|
||||||
|
rotate row y=0 by 15
|
||||||
|
rotate column x=10 by 1
|
||||||
|
rotate column x=5 by 1
|
||||||
|
rotate column x=0 by 1
|
||||||
|
rect 14x1
|
||||||
|
rotate column x=37 by 1
|
||||||
|
rotate column x=23 by 1
|
||||||
|
rotate column x=7 by 2
|
||||||
|
rotate row y=3 by 20
|
||||||
|
rotate row y=0 by 5
|
||||||
|
rotate column x=0 by 1
|
||||||
|
rect 4x1
|
||||||
|
rotate row y=3 by 5
|
||||||
|
rotate row y=2 by 2
|
||||||
|
rotate row y=1 by 4
|
||||||
|
rotate row y=0 by 4
|
||||||
|
rect 1x4
|
||||||
|
rotate column x=35 by 3
|
||||||
|
rotate column x=18 by 3
|
||||||
|
rotate column x=13 by 3
|
||||||
|
rotate row y=3 by 5
|
||||||
|
rotate row y=2 by 3
|
||||||
|
rotate row y=1 by 1
|
||||||
|
rotate row y=0 by 1
|
||||||
|
rect 1x5
|
||||||
|
rotate row y=4 by 20
|
||||||
|
rotate row y=3 by 10
|
||||||
|
rotate row y=2 by 13
|
||||||
|
rotate row y=0 by 10
|
||||||
|
rotate column x=5 by 1
|
||||||
|
rotate column x=3 by 3
|
||||||
|
rotate column x=2 by 1
|
||||||
|
rotate column x=1 by 1
|
||||||
|
rotate column x=0 by 1
|
||||||
|
rect 9x1
|
||||||
|
rotate row y=4 by 10
|
||||||
|
rotate row y=3 by 10
|
||||||
|
rotate row y=1 by 10
|
||||||
|
rotate row y=0 by 10
|
||||||
|
rotate column x=7 by 2
|
||||||
|
rotate column x=5 by 1
|
||||||
|
rotate column x=2 by 1
|
||||||
|
rotate column x=1 by 1
|
||||||
|
rotate column x=0 by 1
|
||||||
|
rect 9x1
|
||||||
|
rotate row y=4 by 20
|
||||||
|
rotate row y=3 by 12
|
||||||
|
rotate row y=1 by 15
|
||||||
|
rotate row y=0 by 10
|
||||||
|
rotate column x=8 by 2
|
||||||
|
rotate column x=7 by 1
|
||||||
|
rotate column x=6 by 2
|
||||||
|
rotate column x=5 by 1
|
||||||
|
rotate column x=3 by 1
|
||||||
|
rotate column x=2 by 1
|
||||||
|
rotate column x=1 by 1
|
||||||
|
rotate column x=0 by 1
|
||||||
|
rect 9x1
|
||||||
|
rotate column x=46 by 2
|
||||||
|
rotate column x=43 by 2
|
||||||
|
rotate column x=24 by 2
|
||||||
|
rotate column x=14 by 3
|
||||||
|
rotate row y=5 by 15
|
||||||
|
rotate row y=4 by 10
|
||||||
|
rotate row y=3 by 3
|
||||||
|
rotate row y=2 by 37
|
||||||
|
rotate row y=1 by 10
|
||||||
|
rotate row y=0 by 5
|
||||||
|
rotate column x=0 by 3
|
||||||
|
rect 3x3
|
||||||
|
rotate row y=5 by 15
|
||||||
|
rotate row y=3 by 10
|
||||||
|
rotate row y=2 by 10
|
||||||
|
rotate row y=0 by 10
|
||||||
|
rotate column x=7 by 3
|
||||||
|
rotate column x=6 by 3
|
||||||
|
rotate column x=5 by 1
|
||||||
|
rotate column x=3 by 1
|
||||||
|
rotate column x=2 by 1
|
||||||
|
rotate column x=1 by 1
|
||||||
|
rotate column x=0 by 1
|
||||||
|
rect 9x1
|
||||||
|
rotate column x=19 by 1
|
||||||
|
rotate column x=10 by 3
|
||||||
|
rotate column x=5 by 4
|
||||||
|
rotate row y=5 by 5
|
||||||
|
rotate row y=4 by 5
|
||||||
|
rotate row y=3 by 40
|
||||||
|
rotate row y=2 by 35
|
||||||
|
rotate row y=1 by 15
|
||||||
|
rotate row y=0 by 30
|
||||||
|
rotate column x=48 by 4
|
||||||
|
rotate column x=47 by 3
|
||||||
|
rotate column x=46 by 3
|
||||||
|
rotate column x=45 by 1
|
||||||
|
rotate column x=43 by 1
|
||||||
|
rotate column x=42 by 5
|
||||||
|
rotate column x=41 by 5
|
||||||
|
rotate column x=40 by 1
|
||||||
|
rotate column x=33 by 2
|
||||||
|
rotate column x=32 by 3
|
||||||
|
rotate column x=31 by 2
|
||||||
|
rotate column x=28 by 1
|
||||||
|
rotate column x=27 by 5
|
||||||
|
rotate column x=26 by 5
|
||||||
|
rotate column x=25 by 1
|
||||||
|
rotate column x=23 by 5
|
||||||
|
rotate column x=22 by 5
|
||||||
|
rotate column x=21 by 5
|
||||||
|
rotate column x=18 by 5
|
||||||
|
rotate column x=17 by 5
|
||||||
|
rotate column x=16 by 5
|
||||||
|
rotate column x=13 by 5
|
||||||
|
rotate column x=12 by 5
|
||||||
|
rotate column x=11 by 5
|
||||||
|
rotate column x=3 by 1
|
||||||
|
rotate column x=2 by 5
|
||||||
|
rotate column x=1 by 5
|
||||||
|
rotate column x=0 by 1
|
||||||
231
data/2016_10_data.txt
Normal file
231
data/2016_10_data.txt
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
bot 135 gives low to bot 27 and high to bot 166
|
||||||
|
bot 57 gives low to bot 4 and high to bot 186
|
||||||
|
bot 115 gives low to output 2 and high to bot 80
|
||||||
|
bot 44 gives low to bot 175 and high to bot 88
|
||||||
|
bot 167 gives low to bot 42 and high to bot 168
|
||||||
|
bot 18 gives low to bot 32 and high to bot 89
|
||||||
|
bot 199 gives low to bot 75 and high to bot 40
|
||||||
|
bot 129 gives low to bot 178 and high to bot 147
|
||||||
|
bot 163 gives low to bot 49 and high to bot 160
|
||||||
|
value 2 goes to bot 143
|
||||||
|
bot 176 gives low to bot 139 and high to bot 117
|
||||||
|
bot 194 gives low to bot 11 and high to bot 37
|
||||||
|
bot 99 gives low to bot 163 and high to bot 138
|
||||||
|
value 53 goes to bot 9
|
||||||
|
bot 159 gives low to output 1 and high to bot 207
|
||||||
|
bot 0 gives low to bot 105 and high to bot 13
|
||||||
|
bot 6 gives low to bot 66 and high to bot 116
|
||||||
|
bot 81 gives low to bot 54 and high to bot 10
|
||||||
|
bot 27 gives low to bot 188 and high to bot 199
|
||||||
|
bot 186 gives low to bot 84 and high to bot 123
|
||||||
|
bot 154 gives low to bot 21 and high to bot 107
|
||||||
|
bot 188 gives low to bot 92 and high to bot 75
|
||||||
|
bot 164 gives low to bot 115 and high to bot 28
|
||||||
|
bot 106 gives low to bot 48 and high to bot 155
|
||||||
|
bot 193 gives low to bot 101 and high to bot 110
|
||||||
|
bot 136 gives low to bot 166 and high to bot 152
|
||||||
|
bot 7 gives low to bot 156 and high to bot 24
|
||||||
|
bot 103 gives low to bot 182 and high to bot 0
|
||||||
|
bot 101 gives low to bot 16 and high to bot 72
|
||||||
|
bot 86 gives low to bot 102 and high to bot 48
|
||||||
|
bot 78 gives low to bot 177 and high to bot 113
|
||||||
|
value 17 goes to bot 198
|
||||||
|
bot 54 gives low to bot 161 and high to bot 111
|
||||||
|
bot 46 gives low to bot 74 and high to bot 39
|
||||||
|
bot 22 gives low to bot 56 and high to bot 161
|
||||||
|
bot 5 gives low to bot 186 and high to bot 123
|
||||||
|
bot 137 gives low to bot 202 and high to bot 85
|
||||||
|
bot 202 gives low to bot 108 and high to bot 118
|
||||||
|
bot 174 gives low to bot 0 and high to bot 21
|
||||||
|
bot 119 gives low to bot 68 and high to bot 53
|
||||||
|
bot 151 gives low to bot 83 and high to bot 164
|
||||||
|
bot 160 gives low to bot 33 and high to bot 97
|
||||||
|
bot 76 gives low to bot 40 and high to bot 120
|
||||||
|
bot 60 gives low to bot 103 and high to bot 174
|
||||||
|
bot 203 gives low to bot 120 and high to bot 132
|
||||||
|
bot 157 gives low to bot 116 and high to bot 11
|
||||||
|
bot 98 gives low to bot 208 and high to bot 16
|
||||||
|
bot 142 gives low to bot 114 and high to bot 71
|
||||||
|
bot 143 gives low to bot 198 and high to bot 146
|
||||||
|
bot 30 gives low to bot 59 and high to bot 135
|
||||||
|
bot 87 gives low to bot 39 and high to bot 104
|
||||||
|
bot 161 gives low to bot 173 and high to bot 125
|
||||||
|
bot 104 gives low to bot 34 and high to bot 68
|
||||||
|
bot 70 gives low to bot 112 and high to bot 176
|
||||||
|
bot 92 gives low to bot 122 and high to bot 46
|
||||||
|
bot 148 gives low to bot 28 and high to bot 58
|
||||||
|
bot 49 gives low to output 0 and high to bot 33
|
||||||
|
bot 140 gives low to bot 136 and high to bot 134
|
||||||
|
bot 16 gives low to bot 170 and high to bot 79
|
||||||
|
bot 13 gives low to bot 204 and high to bot 22
|
||||||
|
bot 189 gives low to bot 148 and high to bot 45
|
||||||
|
bot 89 gives low to bot 73 and high to bot 86
|
||||||
|
value 31 goes to bot 50
|
||||||
|
bot 166 gives low to bot 199 and high to bot 76
|
||||||
|
bot 178 gives low to output 5 and high to bot 159
|
||||||
|
bot 58 gives low to bot 167 and high to bot 126
|
||||||
|
bot 149 gives low to bot 180 and high to bot 153
|
||||||
|
bot 131 gives low to bot 97 and high to bot 66
|
||||||
|
bot 64 gives low to bot 192 and high to bot 44
|
||||||
|
bot 117 gives low to bot 140 and high to bot 134
|
||||||
|
bot 156 gives low to bot 174 and high to bot 154
|
||||||
|
value 11 goes to bot 19
|
||||||
|
bot 1 gives low to bot 26 and high to bot 144
|
||||||
|
bot 171 gives low to output 7 and high to bot 150
|
||||||
|
bot 31 gives low to bot 110 and high to bot 127
|
||||||
|
value 5 goes to bot 162
|
||||||
|
bot 9 gives low to bot 8 and high to bot 128
|
||||||
|
bot 93 gives low to bot 109 and high to bot 188
|
||||||
|
value 47 goes to bot 184
|
||||||
|
bot 80 gives low to output 19 and high to bot 42
|
||||||
|
bot 155 gives low to bot 149 and high to bot 52
|
||||||
|
bot 108 gives low to output 14 and high to bot 47
|
||||||
|
bot 165 gives low to bot 200 and high to bot 141
|
||||||
|
bot 184 gives low to bot 162 and high to bot 20
|
||||||
|
bot 50 gives low to bot 143 and high to bot 4
|
||||||
|
bot 28 gives low to bot 80 and high to bot 167
|
||||||
|
bot 66 gives low to bot 151 and high to bot 55
|
||||||
|
bot 201 gives low to bot 124 and high to bot 41
|
||||||
|
bot 204 gives low to bot 94 and high to bot 56
|
||||||
|
bot 134 gives low to bot 152 and high to bot 203
|
||||||
|
bot 51 gives low to bot 36 and high to bot 142
|
||||||
|
bot 2 gives low to bot 52 and high to bot 201
|
||||||
|
bot 183 gives low to bot 38 and high to bot 78
|
||||||
|
bot 26 gives low to bot 142 and high to bot 69
|
||||||
|
bot 182 gives low to bot 3 and high to bot 105
|
||||||
|
bot 72 gives low to bot 79 and high to bot 209
|
||||||
|
bot 8 gives low to bot 185 and high to bot 65
|
||||||
|
bot 75 gives low to bot 46 and high to bot 87
|
||||||
|
bot 38 gives low to bot 82 and high to bot 177
|
||||||
|
bot 147 gives low to bot 159 and high to bot 207
|
||||||
|
bot 195 gives low to bot 104 and high to bot 119
|
||||||
|
bot 63 gives low to bot 126 and high to bot 172
|
||||||
|
bot 144 gives low to bot 69 and high to bot 82
|
||||||
|
bot 83 gives low to output 3 and high to bot 115
|
||||||
|
bot 43 gives low to bot 194 and high to bot 91
|
||||||
|
value 37 goes to bot 8
|
||||||
|
bot 82 gives low to bot 193 and high to bot 31
|
||||||
|
bot 150 gives low to output 18 and high to bot 49
|
||||||
|
value 23 goes to bot 182
|
||||||
|
bot 67 gives low to bot 61 and high to bot 165
|
||||||
|
bot 77 gives low to bot 107 and high to bot 122
|
||||||
|
bot 130 gives low to bot 141 and high to bot 30
|
||||||
|
value 73 goes to bot 12
|
||||||
|
bot 41 gives low to bot 99 and high to bot 208
|
||||||
|
bot 170 gives low to bot 131 and high to bot 6
|
||||||
|
bot 120 gives low to bot 195 and high to bot 132
|
||||||
|
bot 118 gives low to bot 47 and high to bot 129
|
||||||
|
bot 100 gives low to bot 150 and high to bot 163
|
||||||
|
value 67 goes to bot 185
|
||||||
|
bot 152 gives low to bot 76 and high to bot 203
|
||||||
|
bot 162 gives low to bot 67 and high to bot 205
|
||||||
|
value 7 goes to bot 32
|
||||||
|
bot 121 gives low to bot 172 and high to bot 158
|
||||||
|
bot 65 gives low to bot 57 and high to bot 5
|
||||||
|
bot 122 gives low to bot 81 and high to bot 74
|
||||||
|
bot 21 gives low to bot 13 and high to bot 17
|
||||||
|
bot 23 gives low to bot 133 and high to bot 1
|
||||||
|
bot 36 gives low to bot 201 and high to bot 114
|
||||||
|
bot 138 gives low to bot 160 and high to bot 131
|
||||||
|
bot 55 gives low to bot 164 and high to bot 148
|
||||||
|
bot 123 gives low to bot 70 and high to bot 176
|
||||||
|
value 61 goes to bot 61
|
||||||
|
bot 107 gives low to bot 17 and high to bot 81
|
||||||
|
bot 19 gives low to bot 60 and high to bot 156
|
||||||
|
value 41 goes to bot 12
|
||||||
|
value 29 goes to bot 18
|
||||||
|
value 13 goes to bot 60
|
||||||
|
bot 62 gives low to bot 20 and high to bot 64
|
||||||
|
bot 40 gives low to bot 87 and high to bot 195
|
||||||
|
bot 90 gives low to bot 64 and high to bot 112
|
||||||
|
bot 69 gives low to bot 71 and high to bot 193
|
||||||
|
bot 35 gives low to output 4 and high to bot 108
|
||||||
|
bot 177 gives low to bot 31 and high to bot 113
|
||||||
|
bot 59 gives low to bot 93 and high to bot 27
|
||||||
|
bot 187 gives low to bot 89 and high to bot 94
|
||||||
|
bot 73 gives low to output 9 and high to bot 102
|
||||||
|
bot 45 gives low to bot 58 and high to bot 63
|
||||||
|
bot 39 gives low to bot 23 and high to bot 34
|
||||||
|
bot 110 gives low to bot 72 and high to bot 190
|
||||||
|
bot 181 gives low to bot 15 and high to bot 93
|
||||||
|
bot 95 gives low to bot 7 and high to bot 15
|
||||||
|
bot 33 gives low to output 13 and high to bot 169
|
||||||
|
bot 20 gives low to bot 205 and high to bot 192
|
||||||
|
bot 158 gives low to bot 85 and high to bot 29
|
||||||
|
bot 61 gives low to bot 14 and high to bot 200
|
||||||
|
value 71 goes to bot 103
|
||||||
|
bot 192 gives low to bot 130 and high to bot 175
|
||||||
|
bot 112 gives low to bot 44 and high to bot 139
|
||||||
|
bot 96 gives low to bot 144 and high to bot 38
|
||||||
|
bot 32 gives low to output 11 and high to bot 73
|
||||||
|
bot 180 gives low to output 10 and high to bot 171
|
||||||
|
value 59 goes to bot 3
|
||||||
|
bot 208 gives low to bot 138 and high to bot 170
|
||||||
|
bot 198 gives low to bot 184 and high to bot 62
|
||||||
|
bot 207 gives low to output 16 and high to output 8
|
||||||
|
bot 196 gives low to bot 43 and high to bot 91
|
||||||
|
bot 10 gives low to bot 111 and high to bot 133
|
||||||
|
bot 168 gives low to bot 35 and high to bot 202
|
||||||
|
bot 113 gives low to bot 127 and high to bot 196
|
||||||
|
bot 169 gives low to output 20 and high to bot 83
|
||||||
|
bot 3 gives low to bot 18 and high to bot 187
|
||||||
|
bot 52 gives low to bot 153 and high to bot 124
|
||||||
|
bot 190 gives low to bot 209 and high to bot 43
|
||||||
|
bot 125 gives low to bot 2 and high to bot 36
|
||||||
|
bot 173 gives low to bot 155 and high to bot 2
|
||||||
|
bot 153 gives low to bot 171 and high to bot 100
|
||||||
|
bot 34 gives low to bot 1 and high to bot 96
|
||||||
|
bot 84 gives low to bot 90 and high to bot 70
|
||||||
|
bot 12 gives low to bot 9 and high to bot 128
|
||||||
|
bot 24 gives low to bot 154 and high to bot 77
|
||||||
|
bot 179 gives low to bot 63 and high to bot 121
|
||||||
|
bot 85 gives low to bot 118 and high to bot 29
|
||||||
|
bot 11 gives low to bot 189 and high to bot 145
|
||||||
|
bot 116 gives low to bot 55 and high to bot 189
|
||||||
|
bot 132 gives low to bot 119 and high to bot 53
|
||||||
|
bot 15 gives low to bot 24 and high to bot 109
|
||||||
|
bot 102 gives low to output 15 and high to bot 197
|
||||||
|
value 43 goes to bot 206
|
||||||
|
bot 37 gives low to bot 145 and high to bot 25
|
||||||
|
bot 53 gives low to bot 183 and high to bot 78
|
||||||
|
bot 197 gives low to output 12 and high to bot 180
|
||||||
|
bot 47 gives low to output 17 and high to bot 178
|
||||||
|
bot 17 gives low to bot 22 and high to bot 54
|
||||||
|
bot 56 gives low to bot 106 and high to bot 173
|
||||||
|
bot 191 gives low to bot 135 and high to bot 136
|
||||||
|
bot 127 gives low to bot 190 and high to bot 196
|
||||||
|
bot 172 gives low to bot 137 and high to bot 158
|
||||||
|
bot 4 gives low to bot 146 and high to bot 84
|
||||||
|
bot 42 gives low to output 6 and high to bot 35
|
||||||
|
bot 145 gives low to bot 45 and high to bot 179
|
||||||
|
bot 133 gives low to bot 51 and high to bot 26
|
||||||
|
bot 139 gives low to bot 88 and high to bot 117
|
||||||
|
bot 105 gives low to bot 187 and high to bot 204
|
||||||
|
bot 126 gives low to bot 168 and high to bot 137
|
||||||
|
bot 128 gives low to bot 65 and high to bot 5
|
||||||
|
bot 114 gives low to bot 41 and high to bot 98
|
||||||
|
bot 14 gives low to bot 206 and high to bot 95
|
||||||
|
bot 91 gives low to bot 37 and high to bot 25
|
||||||
|
bot 206 gives low to bot 19 and high to bot 7
|
||||||
|
value 19 goes to bot 14
|
||||||
|
bot 185 gives low to bot 50 and high to bot 57
|
||||||
|
bot 205 gives low to bot 165 and high to bot 130
|
||||||
|
bot 109 gives low to bot 77 and high to bot 92
|
||||||
|
bot 175 gives low to bot 30 and high to bot 191
|
||||||
|
bot 29 gives low to bot 129 and high to bot 147
|
||||||
|
bot 74 gives low to bot 10 and high to bot 23
|
||||||
|
bot 94 gives low to bot 86 and high to bot 106
|
||||||
|
bot 25 gives low to bot 179 and high to bot 121
|
||||||
|
bot 71 gives low to bot 98 and high to bot 101
|
||||||
|
bot 209 gives low to bot 157 and high to bot 194
|
||||||
|
bot 88 gives low to bot 191 and high to bot 140
|
||||||
|
bot 124 gives low to bot 100 and high to bot 99
|
||||||
|
bot 97 gives low to bot 169 and high to bot 151
|
||||||
|
bot 141 gives low to bot 181 and high to bot 59
|
||||||
|
bot 146 gives low to bot 62 and high to bot 90
|
||||||
|
bot 200 gives low to bot 95 and high to bot 181
|
||||||
|
bot 79 gives low to bot 6 and high to bot 157
|
||||||
|
bot 48 gives low to bot 197 and high to bot 149
|
||||||
|
value 3 goes to bot 67
|
||||||
|
bot 68 gives low to bot 96 and high to bot 183
|
||||||
|
bot 111 gives low to bot 125 and high to bot 51
|
||||||
1176
data/2016_20_data.txt
Normal file
1176
data/2016_20_data.txt
Normal file
File diff suppressed because it is too large
Load Diff
1003
data/2017_05_data.txt
Normal file
1003
data/2017_05_data.txt
Normal file
File diff suppressed because it is too large
Load Diff
391
data/2018_10_data.txt
Normal file
391
data/2018_10_data.txt
Normal file
@ -0,0 +1,391 @@
|
|||||||
|
position=<-50429, 40580> velocity=< 5, -4>
|
||||||
|
position=< 30528, -40359> velocity=<-3, 4>
|
||||||
|
position=< 20386, -40351> velocity=<-2, 4>
|
||||||
|
position=< -9924, 30462> velocity=< 1, -3>
|
||||||
|
position=<-30203, -50470> velocity=< 3, 5>
|
||||||
|
position=< 50746, -40351> velocity=<-5, 4>
|
||||||
|
position=< 50778, -20120> velocity=<-5, 2>
|
||||||
|
position=<-20046, 10229> velocity=< 2, -1>
|
||||||
|
position=< 40645, 30467> velocity=<-4, -3>
|
||||||
|
position=<-50419, -10005> velocity=< 5, 1>
|
||||||
|
position=<-20089, -9999> velocity=< 2, 1>
|
||||||
|
position=<-50386, -10003> velocity=< 5, 1>
|
||||||
|
position=< 40613, -20117> velocity=<-4, 2>
|
||||||
|
position=<-40272, 50699> velocity=< 4, -5>
|
||||||
|
position=< 20406, -50467> velocity=<-2, 5>
|
||||||
|
position=< -9972, -10000> velocity=< 1, 1>
|
||||||
|
position=< -9921, 10229> velocity=< 1, -1>
|
||||||
|
position=< 40635, -30240> velocity=<-4, 3>
|
||||||
|
position=<-50389, -30237> velocity=< 5, 3>
|
||||||
|
position=< 20390, 10231> velocity=<-2, -1>
|
||||||
|
position=<-40325, 50694> velocity=< 4, -5>
|
||||||
|
position=< 20382, 20350> velocity=<-2, -2>
|
||||||
|
position=< 50749, -10007> velocity=<-5, 1>
|
||||||
|
position=<-20046, 40584> velocity=< 2, -4>
|
||||||
|
position=< 40633, -20120> velocity=<-4, 2>
|
||||||
|
position=< 20416, -10005> velocity=<-2, 1>
|
||||||
|
position=< 30520, 40577> velocity=<-3, -4>
|
||||||
|
position=< 20377, -10004> velocity=<-2, 1>
|
||||||
|
position=< 40608, 20348> velocity=<-4, -2>
|
||||||
|
position=<-40309, -30237> velocity=< 4, 3>
|
||||||
|
position=< 10305, -20123> velocity=<-1, 2>
|
||||||
|
position=< 40669, 30464> velocity=<-4, -3>
|
||||||
|
position=<-30150, 50700> velocity=< 3, -5>
|
||||||
|
position=<-20090, -40359> velocity=< 2, 4>
|
||||||
|
position=< 30496, 20352> velocity=<-3, -2>
|
||||||
|
position=< 20387, 10235> velocity=<-2, -1>
|
||||||
|
position=<-50445, 40581> velocity=< 5, -4>
|
||||||
|
position=< 20398, -20119> velocity=<-2, 2>
|
||||||
|
position=< 20374, 10232> velocity=<-2, -1>
|
||||||
|
position=< 20414, -50472> velocity=<-2, 5>
|
||||||
|
position=< -9916, -9999> velocity=< 1, 1>
|
||||||
|
position=< 50765, 40585> velocity=<-5, -4>
|
||||||
|
position=<-50426, 50694> velocity=< 5, -5>
|
||||||
|
position=< -9920, 50699> velocity=< 1, -5>
|
||||||
|
position=<-50408, 30464> velocity=< 5, -3>
|
||||||
|
position=< 50781, -20123> velocity=<-5, 2>
|
||||||
|
position=<-30211, 30462> velocity=< 3, -3>
|
||||||
|
position=< 40617, -20116> velocity=<-4, 2>
|
||||||
|
position=< 50765, 10227> velocity=<-5, -1>
|
||||||
|
position=<-20066, 40585> velocity=< 2, -4>
|
||||||
|
position=<-30170, 40582> velocity=< 3, -4>
|
||||||
|
position=< 10290, 50698> velocity=<-1, -5>
|
||||||
|
position=<-40318, 10235> velocity=< 4, -1>
|
||||||
|
position=< 50785, 10227> velocity=<-5, -1>
|
||||||
|
position=< 30526, 10230> velocity=<-3, -1>
|
||||||
|
position=< -9977, -20120> velocity=< 1, 2>
|
||||||
|
position=<-40327, -20121> velocity=< 4, 2>
|
||||||
|
position=< 10299, -30236> velocity=<-1, 3>
|
||||||
|
position=< 40632, -20117> velocity=<-4, 2>
|
||||||
|
position=< -9958, 10230> velocity=< 1, -1>
|
||||||
|
position=<-50420, -50471> velocity=< 5, 5>
|
||||||
|
position=< 10281, 50699> velocity=<-1, -5>
|
||||||
|
position=< 50749, 50700> velocity=<-5, -5>
|
||||||
|
position=< 50786, 20351> velocity=<-5, -2>
|
||||||
|
position=< 50776, 20348> velocity=<-5, -2>
|
||||||
|
position=< 50733, -30238> velocity=<-5, 3>
|
||||||
|
position=< -9932, -30242> velocity=< 1, 3>
|
||||||
|
position=< 40612, 30466> velocity=<-4, -3>
|
||||||
|
position=< 30496, -20122> velocity=<-3, 2>
|
||||||
|
position=<-30174, 30461> velocity=< 3, -3>
|
||||||
|
position=< 30534, -50474> velocity=<-3, 5>
|
||||||
|
position=< 40661, -9999> velocity=<-4, 1>
|
||||||
|
position=< 30552, 50696> velocity=<-3, -5>
|
||||||
|
position=< 50775, 30464> velocity=<-5, -3>
|
||||||
|
position=<-20057, 20345> velocity=< 2, -2>
|
||||||
|
position=< 20410, 50698> velocity=<-2, -5>
|
||||||
|
position=< 10297, -50474> velocity=<-1, 5>
|
||||||
|
position=<-50429, -20118> velocity=< 5, 2>
|
||||||
|
position=<-40327, -20121> velocity=< 4, 2>
|
||||||
|
position=<-30194, -20121> velocity=< 3, 2>
|
||||||
|
position=< -9956, 40580> velocity=< 1, -4>
|
||||||
|
position=< 20427, -10008> velocity=<-2, 1>
|
||||||
|
position=< 10257, -20122> velocity=<-1, 2>
|
||||||
|
position=<-20075, -40355> velocity=< 2, 4>
|
||||||
|
position=<-20041, 10234> velocity=< 2, -1>
|
||||||
|
position=<-20033, 30468> velocity=< 2, -3>
|
||||||
|
position=<-50389, 30464> velocity=< 5, -3>
|
||||||
|
position=< 50773, -9999> velocity=<-5, 1>
|
||||||
|
position=<-30179, -50474> velocity=< 3, 5>
|
||||||
|
position=< 40659, 30465> velocity=<-4, -3>
|
||||||
|
position=< 50781, -20123> velocity=<-5, 2>
|
||||||
|
position=< 40632, -10001> velocity=<-4, 1>
|
||||||
|
position=<-30194, -30238> velocity=< 3, 3>
|
||||||
|
position=<-20073, -20117> velocity=< 2, 2>
|
||||||
|
position=< 50730, 10228> velocity=<-5, -1>
|
||||||
|
position=< 10313, 40579> velocity=<-1, -4>
|
||||||
|
position=<-50421, -10003> velocity=< 5, 1>
|
||||||
|
position=< -9924, 40581> velocity=< 1, -4>
|
||||||
|
position=<-30151, -30237> velocity=< 3, 3>
|
||||||
|
position=< -9965, 20343> velocity=< 1, -2>
|
||||||
|
position=< 50759, 50698> velocity=<-5, -5>
|
||||||
|
position=<-20036, -30237> velocity=< 2, 3>
|
||||||
|
position=<-20070, -20122> velocity=< 2, 2>
|
||||||
|
position=< 40641, -50472> velocity=<-4, 5>
|
||||||
|
position=<-40293, 50698> velocity=< 4, -5>
|
||||||
|
position=< 50736, -30233> velocity=<-5, 3>
|
||||||
|
position=<-50389, 20351> velocity=< 5, -2>
|
||||||
|
position=< 20374, -30234> velocity=<-2, 3>
|
||||||
|
position=<-20043, -20119> velocity=< 2, 2>
|
||||||
|
position=<-50445, -10005> velocity=< 5, 1>
|
||||||
|
position=< -9961, -20116> velocity=< 1, 2>
|
||||||
|
position=<-40328, 40578> velocity=< 4, -4>
|
||||||
|
position=<-50405, 10226> velocity=< 5, -1>
|
||||||
|
position=< 10305, -40359> velocity=<-1, 4>
|
||||||
|
position=< -9929, -40358> velocity=< 1, 4>
|
||||||
|
position=< 30499, -50470> velocity=<-3, 5>
|
||||||
|
position=< 50741, -30234> velocity=<-5, 3>
|
||||||
|
position=< -9965, 20348> velocity=< 1, -2>
|
||||||
|
position=<-20062, -30238> velocity=< 2, 3>
|
||||||
|
position=<-20066, -30234> velocity=< 2, 3>
|
||||||
|
position=< 50773, 10235> velocity=<-5, -1>
|
||||||
|
position=< 20430, -40353> velocity=<-2, 4>
|
||||||
|
position=<-40311, -40359> velocity=< 4, 4>
|
||||||
|
position=< 50757, -30236> velocity=<-5, 3>
|
||||||
|
position=<-30198, 20350> velocity=< 3, -2>
|
||||||
|
position=< 40632, -10006> velocity=<-4, 1>
|
||||||
|
position=<-50444, -40355> velocity=< 5, 4>
|
||||||
|
position=< 20422, 10232> velocity=<-2, -1>
|
||||||
|
position=<-50393, 50701> velocity=< 5, -5>
|
||||||
|
position=<-50429, -40350> velocity=< 5, 4>
|
||||||
|
position=<-20046, -30238> velocity=< 2, 3>
|
||||||
|
position=<-50397, -30233> velocity=< 5, 3>
|
||||||
|
position=< 40618, -10008> velocity=<-4, 1>
|
||||||
|
position=<-40271, -10007> velocity=< 4, 1>
|
||||||
|
position=<-20069, 10230> velocity=< 2, -1>
|
||||||
|
position=<-30154, 40578> velocity=< 3, -4>
|
||||||
|
position=<-20057, 50696> velocity=< 2, -5>
|
||||||
|
position=< 40634, -20119> velocity=<-4, 2>
|
||||||
|
position=< 30523, -10007> velocity=<-3, 1>
|
||||||
|
position=< 10305, 50694> velocity=<-1, -5>
|
||||||
|
position=< 30547, -10003> velocity=<-3, 1>
|
||||||
|
position=< 10257, -50468> velocity=<-1, 5>
|
||||||
|
position=< 40628, 10230> velocity=<-4, -1>
|
||||||
|
position=<-20078, -30233> velocity=< 2, 3>
|
||||||
|
position=<-40312, -50471> velocity=< 4, 5>
|
||||||
|
position=< 30500, 20343> velocity=<-3, -2>
|
||||||
|
position=< 10273, 40585> velocity=<-1, -4>
|
||||||
|
position=< 10314, -30237> velocity=<-1, 3>
|
||||||
|
position=< 20414, 40582> velocity=<-2, -4>
|
||||||
|
position=< 30531, 50701> velocity=<-3, -5>
|
||||||
|
position=<-30170, -20120> velocity=< 3, 2>
|
||||||
|
position=<-50413, -20120> velocity=< 5, 2>
|
||||||
|
position=< -9945, -40359> velocity=< 1, 4>
|
||||||
|
position=<-40275, 30465> velocity=< 4, -3>
|
||||||
|
position=<-40312, 40583> velocity=< 4, -4>
|
||||||
|
position=<-30179, 40580> velocity=< 3, -4>
|
||||||
|
position=< -9974, 30465> velocity=< 1, -3>
|
||||||
|
position=< 10284, 10228> velocity=<-1, -1>
|
||||||
|
position=< 20374, 50694> velocity=<-2, -5>
|
||||||
|
position=< -9937, 50701> velocity=< 1, -5>
|
||||||
|
position=<-50441, 50701> velocity=< 5, -5>
|
||||||
|
position=< 10270, -50468> velocity=<-1, 5>
|
||||||
|
position=< 50773, 50697> velocity=<-5, -5>
|
||||||
|
position=< 40619, -40359> velocity=<-4, 4>
|
||||||
|
position=<-40315, 40586> velocity=< 4, -4>
|
||||||
|
position=<-30179, 10232> velocity=< 3, -1>
|
||||||
|
position=<-20049, 30460> velocity=< 2, -3>
|
||||||
|
position=< 10289, -50473> velocity=<-1, 5>
|
||||||
|
position=<-20033, -20119> velocity=< 2, 2>
|
||||||
|
position=< 50766, -40355> velocity=<-5, 4>
|
||||||
|
position=<-30191, 50701> velocity=< 3, -5>
|
||||||
|
position=< 10273, 30463> velocity=<-1, -3>
|
||||||
|
position=< 50778, -9999> velocity=<-5, 1>
|
||||||
|
position=< 50730, 50695> velocity=<-5, -5>
|
||||||
|
position=< -9929, -50473> velocity=< 1, 5>
|
||||||
|
position=< 40644, -20121> velocity=<-4, 2>
|
||||||
|
position=< 50725, -40352> velocity=<-5, 4>
|
||||||
|
position=<-50388, 40582> velocity=< 5, -4>
|
||||||
|
position=< 50741, 20345> velocity=<-5, -2>
|
||||||
|
position=<-20090, 40581> velocity=< 2, -4>
|
||||||
|
position=<-30191, -10008> velocity=< 3, 1>
|
||||||
|
position=< 10273, 20348> velocity=<-1, -2>
|
||||||
|
position=< 10268, 20343> velocity=<-1, -2>
|
||||||
|
position=< 30533, 40580> velocity=<-3, -4>
|
||||||
|
position=<-20041, -40358> velocity=< 2, 4>
|
||||||
|
position=< 30531, 50703> velocity=<-3, -5>
|
||||||
|
position=< 50757, -30234> velocity=<-5, 3>
|
||||||
|
position=<-30187, -9999> velocity=< 3, 1>
|
||||||
|
position=<-50442, 40582> velocity=< 5, -4>
|
||||||
|
position=< 50749, -30242> velocity=<-5, 3>
|
||||||
|
position=<-30158, -20121> velocity=< 3, 2>
|
||||||
|
position=<-50386, -20125> velocity=< 5, 2>
|
||||||
|
position=< 40637, 10235> velocity=<-4, -1>
|
||||||
|
position=<-30203, -20117> velocity=< 3, 2>
|
||||||
|
position=<-50392, -20118> velocity=< 5, 2>
|
||||||
|
position=< 30493, 20347> velocity=<-3, -2>
|
||||||
|
position=<-30163, 40582> velocity=< 3, -4>
|
||||||
|
position=< 30499, 40580> velocity=<-3, -4>
|
||||||
|
position=<-50392, -50474> velocity=< 5, 5>
|
||||||
|
position=<-20085, 10235> velocity=< 2, -1>
|
||||||
|
position=< 10313, 20346> velocity=<-1, -2>
|
||||||
|
position=< 40636, 50695> velocity=<-4, -5>
|
||||||
|
position=<-50384, -30235> velocity=< 5, 3>
|
||||||
|
position=< -9956, -9999> velocity=< 1, 1>
|
||||||
|
position=< 30547, 50703> velocity=<-3, -5>
|
||||||
|
position=< -9957, -50472> velocity=< 1, 5>
|
||||||
|
position=<-30174, 10232> velocity=< 3, -1>
|
||||||
|
position=< 30544, 40586> velocity=<-3, -4>
|
||||||
|
position=< 30552, 40582> velocity=<-3, -4>
|
||||||
|
position=< 40611, 40577> velocity=<-4, -4>
|
||||||
|
position=< 30549, -50476> velocity=<-3, 5>
|
||||||
|
position=< -9945, -50473> velocity=< 1, 5>
|
||||||
|
position=<-40296, -40352> velocity=< 4, 4>
|
||||||
|
position=<-30163, -20117> velocity=< 3, 2>
|
||||||
|
position=<-50405, -40357> velocity=< 5, 4>
|
||||||
|
position=< 50786, -30236> velocity=<-5, 3>
|
||||||
|
position=< 50757, -20124> velocity=<-5, 2>
|
||||||
|
position=< 20392, 10230> velocity=<-2, -1>
|
||||||
|
position=< 30531, 20348> velocity=<-3, -2>
|
||||||
|
position=< 50735, 10235> velocity=<-5, -1>
|
||||||
|
position=<-30198, -30233> velocity=< 3, 3>
|
||||||
|
position=<-50397, -50469> velocity=< 5, 5>
|
||||||
|
position=<-50441, 30467> velocity=< 5, -3>
|
||||||
|
position=<-30163, -10000> velocity=< 3, 1>
|
||||||
|
position=< 50773, -40355> velocity=<-5, 4>
|
||||||
|
position=<-20086, -30234> velocity=< 2, 3>
|
||||||
|
position=< 10276, 40577> velocity=<-1, -4>
|
||||||
|
position=< 40661, 50700> velocity=<-4, -5>
|
||||||
|
position=< 50728, 50699> velocity=<-5, -5>
|
||||||
|
position=< 10313, -40353> velocity=<-1, 4>
|
||||||
|
position=<-50445, 50697> velocity=< 5, -5>
|
||||||
|
position=<-20050, 10227> velocity=< 2, -1>
|
||||||
|
position=< 10315, -40359> velocity=<-1, 4>
|
||||||
|
position=< 20379, 40579> velocity=<-2, -4>
|
||||||
|
position=< 30507, -40359> velocity=<-3, 4>
|
||||||
|
position=<-50444, -50476> velocity=< 5, 5>
|
||||||
|
position=< 40637, -40350> velocity=<-4, 4>
|
||||||
|
position=< 20427, -10005> velocity=<-2, 1>
|
||||||
|
position=< 10318, 10233> velocity=<-1, -1>
|
||||||
|
position=<-30190, 30463> velocity=< 3, -3>
|
||||||
|
position=< 10300, 20345> velocity=<-1, -2>
|
||||||
|
position=<-50408, 40578> velocity=< 5, -4>
|
||||||
|
position=< 10297, -10002> velocity=<-1, 1>
|
||||||
|
position=<-20060, 40581> velocity=< 2, -4>
|
||||||
|
position=< 40640, 20352> velocity=<-4, -2>
|
||||||
|
position=<-50437, 10231> velocity=< 5, -1>
|
||||||
|
position=<-50429, -20119> velocity=< 5, 2>
|
||||||
|
position=<-50396, -50474> velocity=< 5, 5>
|
||||||
|
position=<-20078, -40358> velocity=< 2, 4>
|
||||||
|
position=< 20376, -30242> velocity=<-2, 3>
|
||||||
|
position=< 30528, 50695> velocity=<-3, -5>
|
||||||
|
position=<-20043, -30236> velocity=< 2, 3>
|
||||||
|
position=< 40632, 10226> velocity=<-4, -1>
|
||||||
|
position=<-50413, 20344> velocity=< 5, -2>
|
||||||
|
position=< -9940, -40356> velocity=< 1, 4>
|
||||||
|
position=< 10308, 30465> velocity=<-1, -3>
|
||||||
|
position=<-30171, -20118> velocity=< 3, 2>
|
||||||
|
position=<-20066, 30461> velocity=< 2, -3>
|
||||||
|
position=<-40291, -40351> velocity=< 4, 4>
|
||||||
|
position=<-30191, 50700> velocity=< 3, -5>
|
||||||
|
position=<-20054, -10007> velocity=< 2, 1>
|
||||||
|
position=< 10270, 30461> velocity=<-1, -3>
|
||||||
|
position=< -9940, -30234> velocity=< 1, 3>
|
||||||
|
position=<-30150, 50703> velocity=< 3, -5>
|
||||||
|
position=< -9965, -50476> velocity=< 1, 5>
|
||||||
|
position=< 40664, -10002> velocity=<-4, 1>
|
||||||
|
position=<-40324, 10230> velocity=< 4, -1>
|
||||||
|
position=< -9924, -40354> velocity=< 1, 4>
|
||||||
|
position=< 20416, 20349> velocity=<-2, -2>
|
||||||
|
position=<-50397, -50471> velocity=< 5, 5>
|
||||||
|
position=< 40610, -30242> velocity=<-4, 3>
|
||||||
|
position=< -9964, -30236> velocity=< 1, 3>
|
||||||
|
position=<-20094, 30464> velocity=< 2, -3>
|
||||||
|
position=< 40660, -10000> velocity=<-4, 1>
|
||||||
|
position=<-40311, 50698> velocity=< 4, -5>
|
||||||
|
position=<-20091, -50472> velocity=< 2, 5>
|
||||||
|
position=<-30154, -20124> velocity=< 3, 2>
|
||||||
|
position=<-50389, 10229> velocity=< 5, -1>
|
||||||
|
position=<-20094, 20344> velocity=< 2, -2>
|
||||||
|
position=<-20074, -30235> velocity=< 2, 3>
|
||||||
|
position=<-50433, 30468> velocity=< 5, -3>
|
||||||
|
position=<-20054, -30238> velocity=< 2, 3>
|
||||||
|
position=< -9945, -10006> velocity=< 1, 1>
|
||||||
|
position=< -9945, 20347> velocity=< 1, -2>
|
||||||
|
position=<-30193, 30460> velocity=< 3, -3>
|
||||||
|
position=< 40632, 10227> velocity=<-4, -1>
|
||||||
|
position=<-40315, 20344> velocity=< 4, -2>
|
||||||
|
position=<-40303, 50698> velocity=< 4, -5>
|
||||||
|
position=< 30526, 40581> velocity=<-3, -4>
|
||||||
|
position=<-40300, 10234> velocity=< 4, -1>
|
||||||
|
position=< 30507, 50700> velocity=<-3, -5>
|
||||||
|
position=<-20083, -50471> velocity=< 2, 5>
|
||||||
|
position=< 50733, 20344> velocity=<-5, -2>
|
||||||
|
position=< -9969, -10006> velocity=< 1, 1>
|
||||||
|
position=<-30174, 30469> velocity=< 3, -3>
|
||||||
|
position=< 40660, 50702> velocity=<-4, -5>
|
||||||
|
position=<-50393, -50468> velocity=< 5, 5>
|
||||||
|
position=<-20054, 30462> velocity=< 2, -3>
|
||||||
|
position=<-50404, -10004> velocity=< 5, 1>
|
||||||
|
position=<-50440, 20351> velocity=< 5, -2>
|
||||||
|
position=<-20042, -20118> velocity=< 2, 2>
|
||||||
|
position=< 10289, -40350> velocity=<-1, 4>
|
||||||
|
position=<-30162, 50695> velocity=< 3, -5>
|
||||||
|
position=<-30171, 20349> velocity=< 3, -2>
|
||||||
|
position=<-50413, -20125> velocity=< 5, 2>
|
||||||
|
position=<-50424, -50467> velocity=< 5, 5>
|
||||||
|
position=<-40315, 20348> velocity=< 4, -2>
|
||||||
|
position=<-50392, -50470> velocity=< 5, 5>
|
||||||
|
position=< 10281, -50473> velocity=<-1, 5>
|
||||||
|
position=< 20395, -30240> velocity=<-2, 3>
|
||||||
|
position=< 30499, -40356> velocity=<-3, 4>
|
||||||
|
position=< 30531, 50697> velocity=<-3, -5>
|
||||||
|
position=< 50766, 10230> velocity=<-5, -1>
|
||||||
|
position=<-40291, -40355> velocity=< 4, 4>
|
||||||
|
position=<-40291, 50699> velocity=< 4, -5>
|
||||||
|
position=< 20418, 30461> velocity=<-2, -3>
|
||||||
|
position=<-50400, -50467> velocity=< 5, 5>
|
||||||
|
position=<-30202, 10226> velocity=< 3, -1>
|
||||||
|
position=< 30540, 30462> velocity=<-3, -3>
|
||||||
|
position=< 20376, -10008> velocity=<-2, 1>
|
||||||
|
position=< -9953, -50473> velocity=< 1, 5>
|
||||||
|
position=< 30512, 30468> velocity=<-3, -3>
|
||||||
|
position=<-40328, -10001> velocity=< 4, 1>
|
||||||
|
position=< -9933, -40351> velocity=< 1, 4>
|
||||||
|
position=< 40645, 30460> velocity=<-4, -3>
|
||||||
|
position=<-40316, 50699> velocity=< 4, -5>
|
||||||
|
position=< -9965, -50476> velocity=< 1, 5>
|
||||||
|
position=<-20046, -50468> velocity=< 2, 5>
|
||||||
|
position=< -9921, 40584> velocity=< 1, -4>
|
||||||
|
position=<-40275, 10232> velocity=< 4, -1>
|
||||||
|
position=< -9916, 30467> velocity=< 1, -3>
|
||||||
|
position=<-50445, 20349> velocity=< 5, -2>
|
||||||
|
position=<-30168, -20118> velocity=< 3, 2>
|
||||||
|
position=< 50773, -40354> velocity=<-5, 4>
|
||||||
|
position=<-50397, 40584> velocity=< 5, -4>
|
||||||
|
position=< 20392, -10008> velocity=<-2, 1>
|
||||||
|
position=<-40272, -20116> velocity=< 4, 2>
|
||||||
|
position=<-20078, 30468> velocity=< 2, -3>
|
||||||
|
position=< 10299, 20346> velocity=<-1, -2>
|
||||||
|
position=<-40328, -50469> velocity=< 4, 5>
|
||||||
|
position=< 20395, 50695> velocity=<-2, -5>
|
||||||
|
position=<-20086, -30236> velocity=< 2, 3>
|
||||||
|
position=<-30169, 10232> velocity=< 3, -1>
|
||||||
|
position=<-50396, 10227> velocity=< 5, -1>
|
||||||
|
position=<-20081, 10232> velocity=< 2, -1>
|
||||||
|
position=< 20430, 50701> velocity=<-2, -5>
|
||||||
|
position=< 50775, -10005> velocity=<-5, 1>
|
||||||
|
position=< 40648, -20125> velocity=<-4, 2>
|
||||||
|
position=<-30191, 10230> velocity=< 3, -1>
|
||||||
|
position=<-20062, -10002> velocity=< 2, 1>
|
||||||
|
position=< 50745, 40577> velocity=<-5, -4>
|
||||||
|
position=<-30179, -30237> velocity=< 3, 3>
|
||||||
|
position=< 30544, -20125> velocity=<-3, 2>
|
||||||
|
position=<-30187, 20347> velocity=< 3, -2>
|
||||||
|
position=< 50773, 20343> velocity=<-5, -2>
|
||||||
|
position=<-40267, 40580> velocity=< 4, -4>
|
||||||
|
position=< 20406, -10000> velocity=<-2, 1>
|
||||||
|
position=<-40291, 30465> velocity=< 4, -3>
|
||||||
|
position=<-20084, 50694> velocity=< 2, -5>
|
||||||
|
position=< 50725, -20124> velocity=<-5, 2>
|
||||||
|
position=<-20078, 10230> velocity=< 2, -1>
|
||||||
|
position=< 30528, -20119> velocity=<-3, 2>
|
||||||
|
position=< 10273, 10227> velocity=<-1, -1>
|
||||||
|
position=< -9964, 40584> velocity=< 1, -4>
|
||||||
|
position=<-50445, 10235> velocity=< 5, -1>
|
||||||
|
position=< 50729, -30236> velocity=<-5, 3>
|
||||||
|
position=< -9916, 30468> velocity=< 1, -3>
|
||||||
|
position=<-30167, -20124> velocity=< 3, 2>
|
||||||
|
position=< 10270, -20117> velocity=<-1, 2>
|
||||||
|
position=<-50405, 30465> velocity=< 5, -3>
|
||||||
|
position=<-30184, -50469> velocity=< 3, 5>
|
||||||
|
position=<-40312, 40584> velocity=< 4, -4>
|
||||||
|
position=<-20065, 10226> velocity=< 2, -1>
|
||||||
|
position=< 50762, -9999> velocity=<-5, 1>
|
||||||
|
position=< 40648, -50475> velocity=<-4, 5>
|
||||||
|
position=< 20401, 30467> velocity=<-2, -3>
|
||||||
|
position=<-20081, -10000> velocity=< 2, 1>
|
||||||
|
position=<-30190, 10229> velocity=< 3, -1>
|
||||||
|
position=<-50389, 20350> velocity=< 5, -2>
|
||||||
|
position=< 30520, 10235> velocity=<-3, -1>
|
||||||
|
position=< -9951, -40356> velocity=< 1, 4>
|
||||||
|
position=< 40659, -30236> velocity=<-4, 3>
|
||||||
|
position=< 50762, 30467> velocity=<-5, -3>
|
||||||
|
position=<-50402, -50469> velocity=< 5, 5>
|
||||||
|
position=< 40624, -30235> velocity=<-4, 3>
|
||||||
|
position=< 40629, -30233> velocity=<-4, 3>
|
||||||
|
position=< -9918, 20348> velocity=< 1, -2>
|
||||||
|
position=<-30203, -30239> velocity=< 3, 3>
|
||||||
|
position=<-50387, 20348> velocity=< 5, -2>
|
||||||
|
position=< 30528, -20125> velocity=<-3, 2>
|
||||||
|
position=< 20384, -20125> velocity=<-2, 2>
|
||||||
31
data/2018_10_data_SAMPLE.txt
Normal file
31
data/2018_10_data_SAMPLE.txt
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
position=< 9, 1> velocity=< 0, 2>
|
||||||
|
position=< 7, 0> velocity=<-1, 0>
|
||||||
|
position=< 3, -2> velocity=<-1, 1>
|
||||||
|
position=< 6, 10> velocity=<-2, -1>
|
||||||
|
position=< 2, -4> velocity=< 2, 2>
|
||||||
|
position=<-6, 10> velocity=< 2, -2>
|
||||||
|
position=< 1, 8> velocity=< 1, -1>
|
||||||
|
position=< 1, 7> velocity=< 1, 0>
|
||||||
|
position=<-3, 11> velocity=< 1, -2>
|
||||||
|
position=< 7, 6> velocity=<-1, -1>
|
||||||
|
position=<-2, 3> velocity=< 1, 0>
|
||||||
|
position=<-4, 3> velocity=< 2, 0>
|
||||||
|
position=<10, -3> velocity=<-1, 1>
|
||||||
|
position=< 5, 11> velocity=< 1, -2>
|
||||||
|
position=< 4, 7> velocity=< 0, -1>
|
||||||
|
position=< 8, -2> velocity=< 0, 1>
|
||||||
|
position=<15, 0> velocity=<-2, 0>
|
||||||
|
position=< 1, 6> velocity=< 1, 0>
|
||||||
|
position=< 8, 9> velocity=< 0, -1>
|
||||||
|
position=< 3, 3> velocity=<-1, 1>
|
||||||
|
position=< 0, 5> velocity=< 0, -1>
|
||||||
|
position=<-2, 2> velocity=< 2, 0>
|
||||||
|
position=< 5, -2> velocity=< 1, 2>
|
||||||
|
position=< 1, 4> velocity=< 2, 1>
|
||||||
|
position=<-2, 7> velocity=< 2, -2>
|
||||||
|
position=< 3, 6> velocity=<-1, -1>
|
||||||
|
position=< 5, 0> velocity=< 1, 0>
|
||||||
|
position=<-6, 0> velocity=< 2, 0>
|
||||||
|
position=< 5, 9> velocity=< 1, -2>
|
||||||
|
position=<14, 7> velocity=<-2, 0>
|
||||||
|
position=<-3, 6> velocity=< 2, -1>
|
||||||
1
data/2024_09_data.txt
Normal file
1
data/2024_09_data.txt
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user