diff --git a/crates/core/src/year2024/day05.rs b/crates/core/src/year2024/day05.rs index c2ba4e14..49776ba6 100644 --- a/crates/core/src/year2024/day05.rs +++ b/crates/core/src/year2024/day05.rs @@ -1,18 +1,90 @@ -use crate::input::Input; +use crate::common::array_stack::ArrayStack; +use crate::input::{on_error, Input}; -pub const fn solve(_input: &Input) -> Result { - Ok(0) +pub fn solve(input: &Input) -> Result { + let mut page_ordering = [0_u128; 100]; + let mut sum = 0; + + for line in input.text.lines() { + if let Some((before, after)) = line.split_once('|') { + let before = parse_page(before)?; + let after = parse_page(after)?; + page_ordering[before as usize] |= 1 << (after as u128); + } else if !line.is_empty() { + let mut parts = ArrayStack::<100, u8>::new(); + for part in line.split(',') { + let part = part.parse::().map_err(|_| on_error())?; + parts.push(part)?; + } + let mut valid = true; + for (idx, &before) in parts.slice().iter().enumerate() { + for &after in parts.slice().iter().skip(idx + 1) { + if page_ordering[before as usize] & (1 << (after as u128)) == 0 { + valid = false; + } + } + } + sum += match (input.is_part_one(), valid) { + (true, true) => parts.elements[parts.len() / 2] as u32, + (false, false) => { + let l = parts.slice_mut(); + l.sort_unstable_by(|&a, &b| { + 0.cmp(&(page_ordering[a as usize] & (1 << (b as u128)))) + }); + l[l.len() / 2] as u32 + } + _ => 0, + }; + } + } + + Ok(sum) +} + +fn parse_page(s: &str) -> Result { + let n = s.parse::().map_err(|_| on_error())?; + if n >= 100 { + return Err(format!("Too big page number: {n}")); + } + Ok(n) } #[test] pub fn tests() { use crate::input::{test_part_one_no_allocations, test_part_two_no_allocations}; - let test_input = ""; - test_part_one_no_allocations!(test_input => 0); - test_part_two_no_allocations!(test_input => 0); + let test_input = "47|53 +97|13 +97|61 +97|47 +75|29 +61|13 +75|53 +29|13 +97|29 +53|29 +61|53 +97|53 +61|29 +47|13 +75|47 +97|75 +47|61 +75|61 +47|29 +75|13 +53|13 + +75,47,61,53,29 +97,61,53,29,13 +75,29,13 +75,97,47,61,53 +61,13,29 +97,13,75,29,47"; + test_part_one_no_allocations!(test_input => 143); + test_part_two_no_allocations!(test_input => 123); let real_input = include_str!("day05_input.txt"); - test_part_one_no_allocations!(real_input => 0); - test_part_two_no_allocations!(real_input => 0); + test_part_one_no_allocations!(real_input => 6612); + test_part_two_no_allocations!(real_input => 4944); } diff --git a/crates/core/src/year2024/day05_input.txt b/crates/core/src/year2024/day05_input.txt index e69de29b..e35034cc 100644 --- a/crates/core/src/year2024/day05_input.txt +++ b/crates/core/src/year2024/day05_input.txt @@ -0,0 +1,1388 @@ +91|89 +46|43 +46|19 +98|64 +98|18 +98|66 +67|54 +67|86 +67|57 +67|42 +65|61 +65|27 +65|37 +65|79 +65|28 +78|33 +78|75 +78|65 +78|32 +78|24 +78|39 +53|89 +53|65 +53|34 +53|15 +53|47 +53|44 +53|86 +33|13 +33|24 +33|91 +33|92 +33|79 +33|46 +33|32 +33|97 +35|48 +35|18 +35|98 +35|39 +35|53 +35|86 +35|81 +35|47 +35|73 +93|44 +93|95 +93|92 +93|28 +93|26 +93|94 +93|19 +93|67 +93|89 +93|73 +48|55 +48|46 +48|86 +48|41 +48|54 +48|32 +48|24 +48|16 +48|79 +48|65 +48|13 +34|54 +34|78 +34|42 +34|95 +34|73 +34|26 +34|64 +34|12 +34|67 +34|44 +34|75 +34|18 +24|34 +24|57 +24|82 +24|86 +24|79 +24|41 +24|31 +24|65 +24|15 +24|97 +24|71 +24|27 +24|44 +15|92 +15|44 +15|47 +15|46 +15|93 +15|26 +15|97 +15|55 +15|27 +15|28 +15|12 +15|89 +15|19 +15|13 +61|81 +61|16 +61|94 +61|42 +61|19 +61|53 +61|64 +61|82 +61|78 +61|33 +61|48 +61|57 +61|67 +61|24 +61|98 +73|64 +73|66 +73|78 +73|57 +73|47 +73|39 +73|55 +73|18 +73|33 +73|15 +73|86 +73|16 +73|42 +73|75 +73|54 +73|53 +94|42 +94|54 +94|86 +94|48 +94|53 +94|82 +94|18 +94|47 +94|24 +94|33 +94|78 +94|57 +94|75 +94|66 +94|64 +94|16 +94|73 +54|92 +54|66 +54|91 +54|65 +54|93 +54|27 +54|39 +54|15 +54|28 +54|47 +54|79 +54|57 +54|55 +54|33 +54|13 +54|86 +54|82 +54|46 +47|37 +47|31 +47|46 +47|95 +47|19 +47|28 +47|44 +47|92 +47|43 +47|91 +47|26 +47|97 +47|89 +47|13 +47|61 +47|65 +47|71 +47|55 +47|79 +57|86 +57|66 +57|47 +57|13 +57|34 +57|31 +57|46 +57|65 +57|79 +57|97 +57|27 +57|26 +57|15 +57|28 +57|92 +57|89 +57|43 +57|71 +57|44 +57|93 +75|42 +75|79 +75|93 +75|57 +75|81 +75|41 +75|53 +75|55 +75|32 +75|66 +75|39 +75|64 +75|47 +75|54 +75|48 +75|15 +75|24 +75|82 +75|33 +75|16 +75|97 +37|12 +37|75 +37|43 +37|95 +37|42 +37|98 +37|61 +37|67 +37|94 +37|39 +37|18 +37|32 +37|16 +37|33 +37|64 +37|78 +37|19 +37|54 +37|48 +37|81 +37|35 +37|73 +81|46 +81|57 +81|16 +81|53 +81|82 +81|24 +81|39 +81|92 +81|48 +81|41 +81|86 +81|47 +81|13 +81|66 +81|15 +81|32 +81|54 +81|93 +81|65 +81|55 +81|91 +81|33 +81|97 +89|64 +89|33 +89|98 +89|43 +89|24 +89|67 +89|39 +89|75 +89|32 +89|78 +89|16 +89|61 +89|35 +89|94 +89|95 +89|12 +89|48 +89|54 +89|42 +89|82 +89|18 +89|81 +89|19 +89|73 +66|28 +66|26 +66|93 +66|91 +66|34 +66|37 +66|15 +66|43 +66|27 +66|97 +66|55 +66|92 +66|61 +66|79 +66|89 +66|12 +66|31 +66|13 +66|47 +66|46 +66|65 +66|71 +66|95 +66|44 +39|28 +39|15 +39|65 +39|24 +39|34 +39|86 +39|47 +39|91 +39|79 +39|44 +39|46 +39|92 +39|32 +39|41 +39|57 +39|82 +39|97 +39|66 +39|27 +39|71 +39|13 +39|93 +39|55 +39|53 +71|95 +71|61 +71|35 +71|37 +71|34 +71|19 +71|98 +71|81 +71|26 +71|31 +71|12 +71|78 +71|89 +71|73 +71|67 +71|43 +71|42 +71|64 +71|75 +71|48 +71|18 +71|94 +71|27 +71|44 +86|34 +86|28 +86|15 +86|47 +86|26 +86|71 +86|91 +86|61 +86|89 +86|66 +86|65 +86|97 +86|55 +86|93 +86|27 +86|79 +86|92 +86|46 +86|95 +86|43 +86|37 +86|44 +86|31 +86|13 +13|26 +13|89 +13|71 +13|12 +13|55 +13|34 +13|46 +13|61 +13|31 +13|28 +13|19 +13|93 +13|67 +13|79 +13|37 +13|43 +13|65 +13|91 +13|94 +13|27 +13|92 +13|97 +13|95 +13|44 +16|66 +16|13 +16|15 +16|24 +16|97 +16|33 +16|92 +16|86 +16|82 +16|53 +16|91 +16|39 +16|28 +16|57 +16|55 +16|32 +16|65 +16|41 +16|71 +16|79 +16|54 +16|93 +16|47 +16|46 +31|35 +31|37 +31|81 +31|43 +31|26 +31|48 +31|33 +31|18 +31|64 +31|75 +31|42 +31|95 +31|39 +31|16 +31|67 +31|78 +31|89 +31|19 +31|61 +31|94 +31|98 +31|12 +31|73 +31|54 +92|35 +92|12 +92|19 +92|89 +92|73 +92|44 +92|43 +92|37 +92|46 +92|98 +92|18 +92|67 +92|75 +92|28 +92|27 +92|94 +92|91 +92|31 +92|26 +92|78 +92|34 +92|95 +92|61 +92|71 +19|54 +19|41 +19|82 +19|86 +19|57 +19|32 +19|94 +19|39 +19|53 +19|78 +19|75 +19|67 +19|35 +19|24 +19|48 +19|81 +19|16 +19|73 +19|33 +19|64 +19|18 +19|42 +19|66 +19|98 +18|42 +18|86 +18|75 +18|24 +18|93 +18|41 +18|65 +18|64 +18|33 +18|57 +18|55 +18|54 +18|32 +18|13 +18|79 +18|39 +18|82 +18|48 +18|15 +18|16 +18|81 +18|66 +18|47 +18|53 +95|18 +95|81 +95|35 +95|73 +95|42 +95|67 +95|54 +95|82 +95|78 +95|32 +95|98 +95|61 +95|24 +95|16 +95|48 +95|53 +95|12 +95|64 +95|75 +95|33 +95|19 +95|39 +95|41 +95|94 +43|82 +43|54 +43|18 +43|73 +43|42 +43|33 +43|94 +43|67 +43|12 +43|35 +43|16 +43|24 +43|78 +43|19 +43|64 +43|48 +43|75 +43|81 +43|98 +43|61 +43|39 +43|41 +43|32 +43|95 +28|95 +28|98 +28|73 +28|27 +28|26 +28|89 +28|78 +28|34 +28|18 +28|43 +28|42 +28|12 +28|94 +28|64 +28|67 +28|44 +28|61 +28|71 +28|31 +28|75 +28|37 +28|81 +28|19 +28|35 +42|54 +42|86 +42|82 +42|55 +42|47 +42|57 +42|93 +42|92 +42|81 +42|41 +42|97 +42|48 +42|32 +42|91 +42|16 +42|65 +42|13 +42|15 +42|53 +42|66 +42|24 +42|79 +42|39 +42|33 +55|31 +55|89 +55|46 +55|26 +55|12 +55|91 +55|71 +55|94 +55|92 +55|37 +55|67 +55|43 +55|65 +55|28 +55|34 +55|44 +55|79 +55|19 +55|93 +55|35 +55|61 +55|95 +55|27 +55|97 +27|16 +27|35 +27|94 +27|12 +27|37 +27|26 +27|61 +27|44 +27|48 +27|31 +27|98 +27|89 +27|42 +27|95 +27|43 +27|81 +27|75 +27|18 +27|34 +27|67 +27|19 +27|64 +27|73 +27|78 +97|43 +97|92 +97|78 +97|46 +97|89 +97|26 +97|37 +97|91 +97|73 +97|95 +97|94 +97|98 +97|35 +97|34 +97|12 +97|28 +97|61 +97|27 +97|71 +97|67 +97|31 +97|44 +97|18 +97|19 +79|95 +79|12 +79|61 +79|73 +79|37 +79|92 +79|19 +79|94 +79|28 +79|46 +79|67 +79|43 +79|89 +79|71 +79|27 +79|34 +79|97 +79|91 +79|35 +79|98 +79|93 +79|31 +79|26 +79|44 +82|34 +82|26 +82|55 +82|66 +82|44 +82|86 +82|47 +82|92 +82|41 +82|27 +82|13 +82|97 +82|57 +82|79 +82|15 +82|71 +82|46 +82|53 +82|91 +82|65 +82|37 +82|28 +82|93 +82|31 +26|24 +26|39 +26|19 +26|35 +26|73 +26|16 +26|67 +26|95 +26|42 +26|54 +26|78 +26|48 +26|94 +26|64 +26|89 +26|75 +26|81 +26|98 +26|37 +26|12 +26|43 +26|61 +26|18 +26|33 +44|48 +44|61 +44|33 +44|12 +44|54 +44|75 +44|42 +44|43 +44|95 +44|26 +44|35 +44|98 +44|16 +44|78 +44|89 +44|94 +44|73 +44|37 +44|67 +44|31 +44|81 +44|19 +44|18 +44|64 +32|65 +32|34 +32|97 +32|92 +32|66 +32|44 +32|71 +32|26 +32|57 +32|27 +32|13 +32|41 +32|31 +32|91 +32|47 +32|93 +32|79 +32|46 +32|82 +32|53 +32|55 +32|28 +32|86 +32|15 +41|93 +41|46 +41|27 +41|66 +41|37 +41|89 +41|57 +41|31 +41|97 +41|26 +41|71 +41|53 +41|47 +41|44 +41|92 +41|91 +41|79 +41|86 +41|28 +41|65 +41|15 +41|34 +41|55 +41|13 +12|73 +12|64 +12|19 +12|82 +12|78 +12|41 +12|18 +12|86 +12|98 +12|39 +12|42 +12|67 +12|94 +12|24 +12|54 +12|81 +12|33 +12|57 +12|48 +12|16 +12|32 +12|75 +12|35 +12|53 +64|54 +64|33 +64|39 +64|48 +64|13 +64|42 +64|65 +64|82 +64|79 +64|97 +64|92 +64|47 +64|41 +64|55 +64|15 +64|24 +64|53 +64|86 +64|16 +64|81 +64|93 +64|57 +64|32 +64|66 +91|67 +91|61 +91|35 +91|27 +91|12 +91|44 +91|28 +91|98 +91|71 +91|73 +91|34 +91|75 +91|95 +91|26 +91|64 +91|94 +91|78 +91|31 +91|46 +91|37 +91|43 +91|19 +91|18 +46|34 +46|89 +46|75 +46|67 +46|94 +46|35 +46|71 +46|28 +46|61 +46|12 +46|42 +46|98 +46|27 +46|73 +46|64 +46|26 +46|31 +46|37 +46|78 +46|44 +46|95 +46|18 +98|82 +98|53 +98|15 +98|48 +98|32 +98|86 +98|81 +98|47 +98|16 +98|57 +98|54 +98|41 +98|33 +98|78 +98|13 +98|75 +98|42 +98|39 +98|55 +98|73 +98|24 +67|78 +67|94 +67|41 +67|73 +67|64 +67|75 +67|48 +67|81 +67|66 +67|24 +67|35 +67|39 +67|16 +67|18 +67|32 +67|53 +67|82 +67|98 +67|15 +67|33 +65|89 +65|12 +65|93 +65|43 +65|35 +65|91 +65|92 +65|26 +65|31 +65|46 +65|97 +65|71 +65|44 +65|19 +65|95 +65|67 +65|34 +65|94 +65|98 +78|54 +78|47 +78|42 +78|53 +78|82 +78|57 +78|16 +78|13 +78|79 +78|55 +78|48 +78|18 +78|86 +78|41 +78|81 +78|64 +78|15 +78|66 +53|71 +53|97 +53|92 +53|46 +53|66 +53|27 +53|57 +53|28 +53|91 +53|31 +53|13 +53|79 +53|26 +53|55 +53|37 +53|93 +53|43 +33|34 +33|66 +33|27 +33|71 +33|86 +33|28 +33|47 +33|55 +33|93 +33|82 +33|65 +33|57 +33|41 +33|39 +33|53 +33|15 +35|66 +35|16 +35|13 +35|57 +35|42 +35|24 +35|78 +35|15 +35|33 +35|82 +35|75 +35|64 +35|41 +35|54 +35|32 +93|46 +93|27 +93|37 +93|97 +93|35 +93|78 +93|71 +93|61 +93|98 +93|31 +93|91 +93|12 +93|34 +93|43 +48|66 +48|97 +48|15 +48|91 +48|82 +48|33 +48|39 +48|93 +48|47 +48|28 +48|57 +48|53 +48|92 +34|35 +34|37 +34|94 +34|48 +34|98 +34|16 +34|81 +34|43 +34|61 +34|19 +34|89 +34|31 +24|91 +24|32 +24|46 +24|28 +24|93 +24|53 +24|92 +24|66 +24|55 +24|13 +24|47 +15|43 +15|65 +15|91 +15|37 +15|79 +15|71 +15|34 +15|61 +15|31 +15|95 +61|35 +61|32 +61|54 +61|18 +61|41 +61|73 +61|12 +61|39 +61|75 +73|65 +73|32 +73|41 +73|24 +73|82 +73|81 +73|13 +73|48 +94|15 +94|81 +94|35 +94|32 +94|41 +94|39 +94|98 +54|53 +54|32 +54|41 +54|24 +54|97 +54|71 +47|27 +47|34 +47|67 +47|93 +47|12 +57|91 +57|55 +57|95 +57|37 +75|86 +75|13 +75|65 +37|89 +37|24 +81|79 + +28,27,31,89,43,95,61,67,35,98,42 +57,15,47,13,55,97,92,27,44,31,37,89,43 +35,73,64,81,82,86,47 +12,98,95,54,94,24,37,39,43 +48,33,39,32,66,15,47,13,93,91,46 +32,53,15,47,13,55,46,71,31 +39,24,32,82,41,53,86,66,15,47,13,79,93,97,92,91,71,27,34 +81,48,16,54,33,39,24,32,82,41,57,86,66,15,47,13,55,65,79,93,97,92,91 +16,94,78,53,98,41,66,33,15,24,73,35,86,75,64,57,42,54,18,82,48 +93,97,44,94,35,98,73 +95,61,12,19,67,94,98,73,78,18,75,64,42,81,48,16,54,33,39,24,32,82,41 +71,32,53,46,41,93,28,47,13,65,55,34,92,66,97,79,39,86,15 +43,54,78,16,82,39,98,48,75,33,12,95,61,35,64,81,94,32,18,67,73,42,19 +33,39,32,82,41,53,86,47,55,65,79,97,92,91,46,28,27 +13,79,93,97,91,28,71,44,31,26,37,89,43,12,67 +81,78,24,32,53,13,66,98,15,57,75,82,41,33,54 +93,97,92,91,34,31,26,37,95,61,12,19,94,35,73 +28,92,97,16,55,66,86,53,57,79,39,32,91,65,47,93,33,41,24,46,15 +13,79,92,46,28,34,31,26,89,43,12 +31,61,95,35,94,46,75,37,71,64,26,67,34,19,44,18,12 +97,82,32,65,47 +66,15,13,44,79,27,71,86,32,57,53,28,82,91,41,46,24,65,34 +65,79,93,46,71,95,67,94,35 +94,35,98,73,78,18,75,64,81,48,16,54,24,32,82,41,86,66,15 +93,97,92,91,71,27,34,44,31,26,37,89,43,95,61,35,98 +15,47,13,55,65,79,93,97,92,46,28,71,27,44,31,26,89,43,95,61,12 +28,71,27,34,44,31,37,19,67,98,78,18,75,64,42 +81,48,16,54,33,39,32,82,41,57,86,66,47,13,55,65,79,93,97,92,91 +78,18,75,64,42,81,48,16,33,39,24,32,82,41,53,57,86,66,15,47,13,55,65 +44,73,46,12,19,43,93,94,34,35,27 +67,94,48,33,82,41,57,86,66 +94,35,16,61,24,42,12,73,19,95,37,18,43,33,89,39,78,98,54,64,81,67,48 +15,13,55,65,79,93,91,46,28,71,27,34,44,31,26,89,43 +66,55,92,28,34,31,89 +24,32,41,53,66,15,47,55,79,93,97,91,46,28,71,27,34 +15,47,13,55,65,79,97,92,46,28,71,34,31,26,37,89,43,61,12 +89,43,95,61,12,19,67,94,35,98,73,78,18,75,64,42,81,16,54,33,39,24,32 +33,39,24,32,82,41,53,57,86,66,15,47,13,55,79,93,97,92,91,46,28,71,27 +24,32,82,41,53,57,86,66,15,13,55,65,79,93,97,92,91,46,28,71,27,34,44 +18,75,64,48,16,24,15,47,79 +44,31,26,37,43,95,61,12,67,35,73,78,18,75,64,42,48,16,54 +43,95,61,12,67,98,18,75,64,42,81,54,33,39,82 +97,79,32,91,65,92,13,33,57,15,24,93,41,71,46,27,53 +54,39,24,32,82,53,66,47,13,55,97,92,46,28,71 +47,13,55,65,79,93,97,92,91,46,28,71,27,34,44,31,89,43,95,12,19 +35,18,86,98,53,57,64,32,66,42,81,16,67 +95,27,13,26,34,89,55,79,61,47,31,12,93,43,15 +27,92,71,28,31,82,53,32,47 +47,65,79,93,97,91,46,28,71,27,34,44,31,26,37,89,43,95,61,12,19 +89,19,48,33,64,67,98,94,73 +13,41,78,55,82,39,48,16,24,54,15,73,66,75,32 +34,44,89,43,95,61,12,19,67,94,35,98,73,78,18,75,64,42,81,48,16 +12,67,94,35,73,78,18,75,64,42,81,48,16,54,24,41,57 +97,92,91,46,28,71,27,34,44,26,37,89,43,95,61,12,19,67,94,35,98,73,78 +27,34,98,78,75,81,48 +27,89,43,95,94,73,78,64,42,81,48 +65,92,91,46,34,95,12,19,67,94,35 +75,65,93,15,54,32,79 +57,78,32,33,65,24,75,81,15,41,47,53,42,66,86,64,39 +19,73,78,18,64,81,54,24,82,57,86 +66,91,79,47,82,34,65,86,28,44,13,53,46,27,57 +34,44,31,26,37,89,43,61,94,35,78,18,64,42,16 +26,37,67,98,73,78,18,75,48,54,39 +75,64,42,48,16,54,33,39,24,32,82,41,53,57,86,66,15,47,13,55,65,79,93 +92,34,31,37,89,43,95,12,67,98,18 +65,97,46,28,37,95,19,94,35 +66,13,55,79,92,34,44,37,61 +82,86,13,91,46,71,26 +37,89,43,61,12,19,67,35,78,75,64,81,48,16,54,33,24 +57,86,66,15,13,55,65,79,93,97,91,46,71,27,34,44,31,26,37,89,43 +54,65,41,48,86,16,57,55,39,79,93,42,24,13,33,53,66,32,64 +98,73,18,75,42,81,54,33,39,32,41,57,66 +48,98,78,18,57,16,54,86,35,42,75 +39,24,66,13,65,79,93 +18,75,42,81,48,16,54,33,39,24,32,82,41,53,57,86,47,13,55,65,79 +79,93,97,92,28,27,34,44,31,37,43,61,12,67,98 +42,81,48,16,54,82,41,53,86,79,92 +54,33,57,47,55,97,71 +89,35,73,78,75,16,54,33,24 +54,39,66,71,47,57,32,91,28,53,97,79,86,24,46,65,92,41,15 +92,91,46,28,71,27,34,44,31,37,89,43,95,61,12,19,67,94,35,98,73,78,18 +71,26,35,89,64,44,75,98,67 +98,64,42,32,57,47,13 +35,28,61,34,65,71,89,92,97,12,31 +19,42,48,67,18,98,32,53,12,16,33 +93,24,79,97,65,33,47,64,81,16,86,41,32,57,15 +81,16,24,86,13,55,65,79,93,92,91 +46,71,27,34,44,26,37,89,61,19,67,94,35,98,73,78,18,75,64 +86,66,13,55,65,93,97,92,91,46,27,44,31,26,37,89,95 +46,89,71,34,67,61,91,28,12,27,94,26,18,44,43,31,73,98,78 +24,73,43,18,54,82,16,64,81,33,61,12,39 +31,26,37,89,43,95,61,12,19,67,94,35,98,73,78,18,75,64,42,81,48,54,33 +33,64,24,61,95,35,41 +54,39,24,82,41,86,15,55,93,92,46,28,71 +93,97,91,46,71,27,34,44,31,26,43,95,61,19,35,98,73 +65,79,93,91,28,71,27,34,44,31,26,37,89,19,67,94,35 +47,55,65,79,28,27,34,31,43,12,19 +39,24,32,82,41,53,86,15,47,13,55,65,79,93,97,92,91,46,34 +12,81,26,19,37,75,61,18,73,39,89,94,98,16,54,95,48,67,33,64,78,42,35 +55,92,47,86,48,82,24,66,79,57,46 +16,42,81,32,35,57,48,94,18,12,98,75,39,24,53 +47,15,64,33,81,13,57,16,41,75,18 +16,13,73,78,24,48,75,33,82,81,57,15,32,98,42,53,18 +98,18,16,54,39,82,41,53,57,86,66,47,13 +33,35,98,39,48,24,94,73,81,61,54,41,64,12,78 +78,18,12,26,16,34,31,81,43,64,19,98,44,89,67,37,75,73,94,48,35,42,95 +55,86,47,54,32,75,48,53,24,65,78 +94,35,73,78,18,75,64,42,81,48,16,54,33,39,24,32,82,41,53,57,86,66,15 +57,86,93,92,46,34,31 +19,94,98,78,42,81,48,39,82,41,53 +24,32,82,41,53,57,86,66,15,47,55,65,79,93,91,46,28,71,27,34,44 +28,27,34,31,43,19,94,35,98,75,42 +47,13,46,27,43,95,12 +34,89,61,67,94,98,78,75,64,81,48 +73,89,44,91,28,18,78,75,31 +61,71,55,28,97 +31,43,95,19,94,98,73,64,48,54,33 +27,44,26,37,89,95,12,19,67,35,98,18,75,64,42,81,48 +39,16,48,92,46,24,53 +71,27,34,44,31,26,89,43,95,61,12,19,67,94,35,98,78,75,64,42,81 +37,91,67,89,18,73,92 +26,44,79,86,15,93,41,55,27,47,91,57,97,66,37 +86,66,13,55,79,93,97,92,46,28,27,34,44,31,26,37,89,43,95 +66,47,13,55,79,93,46,28,71,27,44,31,26,89,61 +61,12,19,67,94,35,98,73,78,18,75,64,81,48,16,54,39,32,82,41,53 +39,82,86,15,79,97,71,27,34 +67,97,46,73,61,78,27 +37,97,92,71,12,44,26,34,78,43,94 +66,53,57,33,46,47,71,54,41,86,55 +75,64,81,54,39,24,82,86,93 +92,46,28,71,89,19,35,73,78 +86,47,55,27,26,37,95 +27,44,31,26,95,12,19,67,94,73,18,75,42,81,48 +75,67,64,19,12,42,37,28,35,98,34,61,27,94,89 +31,92,97,93,65,47,19,44,71,46,27,91,61,26,37,34,12,13,89 +97,28,61,26,91,37,34,95,71,19,46,67,92,94,27,89,43,73,93,44,12 +46,28,71,34,31,26,61,12,19,67,94,98,73,78,64 +97,92,91,28,71,27,34,31,26,37,89,43,95,94,35,73,78 +18,75,64,48,16,54,33,39,24,32,82,41,53,57,86,66,15,47,13,65,79 +73,75,18,95,48,61,78,94,54,16,81,19,42,41,67,98,82,39,64 +44,28,65,79,93,97,66,26,55,82,34,27,71,13,31 +41,86,66,15,47,13,55,79,92,91,46,28,27,34,44,26,37 +66,15,47,13,65,79,93,46,71,27,44,31,26,89,43 +28,39,32,54,82,47,93,16,41,33,79 +91,82,79,28,26,65,57,86,66,46,41,31,93,15,27,13,47 +13,55,65,92,28,71,44,89,43 +28,91,65,67,19,89,93,43,55,92,34,12,31,71,37 +24,75,18,67,35,53,16,82,39,73,54,57,86,94,64,98,66 +86,91,13,65,43,66,15,34,46,92,55,37,79,44,31 +93,79,71,12,91,31,92,27,19,44,89,97,37,67,55,94,95,28,43,61,46 +16,39,24,41,53,86,47,55,65,97,28 +34,26,43,94,35,73,42,81,16 +89,43,94,73,18 +79,97,92,91,46,28,71,27,34,44,26,37,89,61,94,35,98 +13,54,42,79,32,47,15,93,48,24,55,41,66,33,16,64,97 +42,81,48,32,82,57,66,79,93,97,92 +78,18,75,64,48,16,82,41,86,15,13,55,65 +97,15,41,53,66,47,33,46,57,86,65,91,39,82,24,13,32,16,55 +55,65,46,44,31,37,95,61,94 +32,92,81,54,24,41,86,91,55,97,39 +61,98,18,73,75,48,19,42,94,64,43,12,81,24,78,35,95 +61,12,94,98,73,78,18,75,64,16,54,33,24,41,53 +73,78,18,75,64,42,81,48,16,54,33,39,24,32,82,41,53,86,66,15,47,13,55 +81,66,33,16,53,57,18,79,15,42,54,65,86,48,13,82,47,24,41,75,55 +64,42,95,54,16,43,24 +81,98,94,33,18,95,75,35,12,48,19,42,43,16,73 +48,16,54,33,24,32,82,41,53,57,47,55,65,79,97,92,91 +48,16,41,32,82 +86,71,89,34,37,92,65,26,43,15,95,47,97,55,93,31,13 +18,41,67,35,61,64,54,73,81,33,24,19,12,78,39,16,98,75,82,94,42,53,32 +33,54,57,66,65,75,55,24,39,81,32,41,42,82,47,48,86,13,16,79,53,18,15 +35,71,44,37,46,27,12,67,19,34,89,91,94,43,97,95,26,93,92 +97,13,81,48,66,47,55,32,39,53,82,33,65,57,64,16,42 +89,19,67,73,92,37,27,44,43 +32,47,13,79,92,27,31 +42,33,31,98,35,43,81 +28,39,34,24,66,46,91,79,47 +89,43,61,12,19,94,35,98,73,18,75,64,42,48,16,54,33,39,32 +67,78,39,24,82,53,66 +79,19,12,91,43,95,92,55,28,61,65,34,46,94,71,97,93,44,31,37,26 +16,33,57,86,79,97,91 +19,67,94,35,98,73,78,18,75,64,42,48,16,54,39,24,82,41,53,57,86 +71,27,67,46,94,43,44,34,55,28,26,92,61 +93,57,91,41,37,53,31 +98,12,16,39,35,61,48,54,78,94,73,81,42,32,64,89,24 +95,61,12,19,67,94,35,73,78,18,75,64,42,81,48,16,54,33,32,82,41 +34,94,26,46,97,19,35,98,44,91,43,92,79,27,67,28,71 +32,13,39,66,78,65,33,24,48,75,82,57,54,81,47,53,41 +54,33,24,82,41,57,47,13,55,65,79,97,92,46,71 +91,28,71,44,43,95,94,78,75 +33,39,86,66,15,91,27 +35,98,73,78,18,75,81,16,24,32,82,41,53,15,47 +75,57,32,15,81,86,82,66,54,18,41,13,79,39,24 +31,37,43,61,12,94,98,73,18,64,42,81,16 +13,55,65,79,93,92,91,46,28,71,27,34,44,31,26,37,89,43,95,61,12,19,67 +32,82,78,24,64,48,94,42,75,41,12,18,81,95,16 +41,82,53,46,13,93,79,47,92,71,55,65,91,27,24,39,33 +41,53,57,86,66,15,47,13,55,65,79,93,97,92,91,46,28,71,27,34,44,31,37 +12,89,71,95,67,81,19,61,18,34,44,75,78,98,31 +53,57,86,15,13,55,97,92,91,46,28,71,34,44,26,37,89 +35,98,73,78,18,75,42,81,48,16,54,33,39,24,32,82,53,57,86,66,15 +75,33,39,32,82,66,93 +61,31,26,95,97,92,34,37,66,71,91,79,43,46,27,28,93 +26,89,61,94,81 +73,19,27,44,71,89,28,37,97,67,91,46,92,61,78,34,43,95,98 +43,95,61,12,19,67,94,35,78,18,75,64,81,48,16,54,33,39,24,32,82 +46,28,71,34,44,31,26,37,89,43,95,12,19,67,94,35,98,73,64 +39,42,75,54,13,65,86,93,16,48,66,55,47 +91,28,89,95,19,78,67,75,94,27,31,98,44,12,71,37,46,26,35,18,61 +95,65,79,89,46,31,19,97,47,55,34,43,12,44,13,93,61,27,37 +42,98,24,32,75,12,67,39,89 \ No newline at end of file