diff options
-rw-r--r-- | day13/day13.hs | 57 | ||||
-rw-r--r-- | day13/day13.input | 1280 | ||||
-rw-r--r-- | day14/day14.hs | 73 | ||||
-rw-r--r-- | day14/day14.input | 500 |
4 files changed, 1910 insertions, 0 deletions
diff --git a/day13/day13.hs b/day13/day13.hs new file mode 100644 index 0000000..4ca7b65 --- /dev/null +++ b/day13/day13.hs @@ -0,0 +1,57 @@ +import Data.List +import Data.List.Split +import Data.Maybe +import Text.Read + +type Cost = Int +type Vec = (Int, Int) +type Machine = (Vec, Vec, Vec) + +mul :: Int -> Vec -> Vec +mul s (x, y) = (s*x, s*y) +add :: Vec -> Vec -> Vec +add (x, y) (z, w) = (x+z, y+w) + +consume1 :: [String] -> Machine +consume1 (a:b:p:_) = + (parseVec "+," a, parseVec "+," b, parseVec "=," p) + where + toVec [x, y] = (x,y) + parseVec spl str = toVec $ catMaybes $ map (readMaybe::String->Maybe Int) $ splitOneOf spl str + +consume :: String -> [Machine] +consume file = + map consume1 macs + where + macs = chunksOf 4 $ lines file + +winnable :: Machine -> [Vec] +winnable (a, b, p) = + filter winner opts + where + winner (x, y) = (x `mul` a) `add` (y `mul` b) == p + opts = [(na, nb) | na <- [0..100], nb <- [0..100]] + +cost :: Vec -> Cost +cost (a, b) = 3*a + b + +cheapest1 :: Cost -> [Vec] -> Cost +cheapest1 cst [] = cst +cheapest1 cst (h:t) + | hcst < cst = cheapest1 hcst t + | otherwise = cheapest1 cst t + where + hcst = cost h + +cheapest :: [Vec] -> Cost +cheapest [] = 0 +cheapest v = cheapest1 (maxBound :: Int) v + +part1 :: [Machine] -> Cost +part1 = sum . map cheapest . map winnable + +main = do + file <- readFile "day13.input" + let machines = consume file + putStrLn ("Part 1: " ++ (show $ part1 machines)) + --putStrLn ("Part 2: " ++ (show $ part2 machines)) diff --git a/day13/day13.input b/day13/day13.input new file mode 100644 index 0000000..b6e8b97 --- /dev/null +++ b/day13/day13.input @@ -0,0 +1,1280 @@ +Button A: X+16, Y+32 +Button B: X+53, Y+11 +Prize: X=6788, Y=4716 + +Button A: X+12, Y+23 +Button B: X+58, Y+33 +Prize: X=17048, Y=3330 + +Button A: X+11, Y+85 +Button B: X+79, Y+25 +Prize: X=1025, Y=895 + +Button A: X+98, Y+41 +Button B: X+59, Y+88 +Prize: X=6029, Y=6258 + +Button A: X+31, Y+88 +Button B: X+75, Y+36 +Prize: X=8434, Y=8728 + +Button A: X+68, Y+17 +Button B: X+14, Y+76 +Prize: X=5034, Y=2051 + +Button A: X+19, Y+79 +Button B: X+61, Y+11 +Prize: X=5836, Y=6796 + +Button A: X+17, Y+90 +Button B: X+34, Y+11 +Prize: X=1496, Y=5047 + +Button A: X+74, Y+27 +Button B: X+45, Y+57 +Prize: X=7128, Y=4224 + +Button A: X+38, Y+17 +Button B: X+46, Y+71 +Prize: X=15880, Y=17830 + +Button A: X+90, Y+70 +Button B: X+28, Y+95 +Prize: X=7624, Y=7980 + +Button A: X+12, Y+35 +Button B: X+59, Y+35 +Prize: X=4954, Y=13535 + +Button A: X+69, Y+35 +Button B: X+12, Y+35 +Prize: X=6164, Y=18540 + +Button A: X+37, Y+91 +Button B: X+59, Y+12 +Prize: X=2593, Y=3449 + +Button A: X+30, Y+17 +Button B: X+32, Y+55 +Prize: X=16556, Y=7983 + +Button A: X+52, Y+99 +Button B: X+47, Y+15 +Prize: X=8241, Y=8316 + +Button A: X+85, Y+24 +Button B: X+80, Y+96 +Prize: X=8970, Y=3120 + +Button A: X+11, Y+62 +Button B: X+78, Y+31 +Prize: X=14969, Y=2068 + +Button A: X+11, Y+44 +Button B: X+69, Y+16 +Prize: X=17891, Y=8804 + +Button A: X+85, Y+32 +Button B: X+80, Y+99 +Prize: X=6230, Y=3172 + +Button A: X+36, Y+58 +Button B: X+41, Y+12 +Prize: X=15762, Y=12242 + +Button A: X+75, Y+37 +Button B: X+15, Y+52 +Prize: X=16820, Y=10024 + +Button A: X+18, Y+40 +Button B: X+64, Y+45 +Prize: X=14436, Y=3330 + +Button A: X+80, Y+39 +Button B: X+18, Y+57 +Prize: X=9792, Y=4718 + +Button A: X+61, Y+32 +Button B: X+33, Y+64 +Prize: X=13380, Y=14880 + +Button A: X+34, Y+14 +Button B: X+12, Y+30 +Prize: X=9922, Y=5550 + +Button A: X+50, Y+11 +Button B: X+41, Y+85 +Prize: X=5724, Y=12433 + +Button A: X+12, Y+28 +Button B: X+65, Y+23 +Prize: X=14265, Y=12207 + +Button A: X+18, Y+40 +Button B: X+43, Y+28 +Prize: X=3912, Y=14880 + +Button A: X+34, Y+35 +Button B: X+12, Y+96 +Prize: X=3226, Y=7085 + +Button A: X+13, Y+93 +Button B: X+46, Y+26 +Prize: X=1719, Y=6539 + +Button A: X+17, Y+34 +Button B: X+95, Y+55 +Prize: X=5475, Y=4740 + +Button A: X+50, Y+14 +Button B: X+12, Y+29 +Prize: X=10234, Y=1781 + +Button A: X+49, Y+13 +Button B: X+13, Y+23 +Prize: X=13698, Y=14190 + +Button A: X+11, Y+46 +Button B: X+70, Y+17 +Prize: X=2881, Y=3776 + +Button A: X+23, Y+56 +Button B: X+39, Y+12 +Prize: X=6533, Y=4688 + +Button A: X+59, Y+35 +Button B: X+16, Y+48 +Prize: X=16345, Y=9777 + +Button A: X+25, Y+97 +Button B: X+75, Y+18 +Prize: X=3550, Y=3127 + +Button A: X+98, Y+44 +Button B: X+51, Y+74 +Prize: X=7348, Y=5752 + +Button A: X+17, Y+65 +Button B: X+80, Y+26 +Prize: X=4858, Y=6412 + +Button A: X+57, Y+15 +Button B: X+53, Y+69 +Prize: X=5107, Y=5583 + +Button A: X+44, Y+25 +Button B: X+24, Y+42 +Prize: X=4088, Y=2306 + +Button A: X+15, Y+89 +Button B: X+83, Y+33 +Prize: X=4908, Y=5688 + +Button A: X+11, Y+40 +Button B: X+56, Y+36 +Prize: X=18170, Y=17932 + +Button A: X+58, Y+49 +Button B: X+32, Y+90 +Prize: X=3938, Y=6853 + +Button A: X+72, Y+23 +Button B: X+11, Y+44 +Prize: X=17579, Y=15676 + +Button A: X+76, Y+20 +Button B: X+48, Y+81 +Prize: X=5692, Y=6899 + +Button A: X+65, Y+22 +Button B: X+22, Y+51 +Prize: X=8056, Y=2070 + +Button A: X+27, Y+17 +Button B: X+20, Y+89 +Prize: X=3108, Y=7229 + +Button A: X+73, Y+22 +Button B: X+16, Y+52 +Prize: X=13532, Y=7976 + +Button A: X+56, Y+43 +Button B: X+11, Y+46 +Prize: X=5310, Y=5955 + +Button A: X+31, Y+17 +Button B: X+26, Y+55 +Prize: X=4521, Y=16495 + +Button A: X+57, Y+39 +Button B: X+46, Y+99 +Prize: X=3391, Y=7047 + +Button A: X+44, Y+93 +Button B: X+82, Y+23 +Prize: X=5692, Y=3613 + +Button A: X+93, Y+17 +Button B: X+40, Y+67 +Prize: X=3655, Y=1265 + +Button A: X+73, Y+44 +Button B: X+11, Y+37 +Prize: X=535, Y=4518 + +Button A: X+98, Y+56 +Button B: X+37, Y+66 +Prize: X=4967, Y=3870 + +Button A: X+44, Y+16 +Button B: X+36, Y+63 +Prize: X=8912, Y=2489 + +Button A: X+44, Y+20 +Button B: X+37, Y+59 +Prize: X=4830, Y=4322 + +Button A: X+44, Y+11 +Button B: X+17, Y+78 +Prize: X=6360, Y=16470 + +Button A: X+17, Y+64 +Button B: X+59, Y+48 +Prize: X=4190, Y=6720 + +Button A: X+20, Y+56 +Button B: X+68, Y+12 +Prize: X=6744, Y=2292 + +Button A: X+19, Y+53 +Button B: X+37, Y+20 +Prize: X=9527, Y=602 + +Button A: X+12, Y+71 +Button B: X+82, Y+16 +Prize: X=4452, Y=16281 + +Button A: X+33, Y+59 +Button B: X+46, Y+24 +Prize: X=16958, Y=19630 + +Button A: X+64, Y+14 +Button B: X+26, Y+69 +Prize: X=19736, Y=1322 + +Button A: X+46, Y+22 +Button B: X+16, Y+54 +Prize: X=1600, Y=18804 + +Button A: X+17, Y+68 +Button B: X+54, Y+24 +Prize: X=4629, Y=6228 + +Button A: X+54, Y+15 +Button B: X+15, Y+74 +Prize: X=13550, Y=9934 + +Button A: X+73, Y+12 +Button B: X+38, Y+48 +Prize: X=8303, Y=2868 + +Button A: X+24, Y+14 +Button B: X+25, Y+47 +Prize: X=17489, Y=1087 + +Button A: X+14, Y+45 +Button B: X+51, Y+18 +Prize: X=6536, Y=1808 + +Button A: X+63, Y+30 +Button B: X+17, Y+58 +Prize: X=4172, Y=6824 + +Button A: X+44, Y+19 +Button B: X+15, Y+31 +Prize: X=17131, Y=1327 + +Button A: X+38, Y+12 +Button B: X+23, Y+55 +Prize: X=3692, Y=2598 + +Button A: X+26, Y+53 +Button B: X+36, Y+22 +Prize: X=4840, Y=7052 + +Button A: X+36, Y+55 +Button B: X+63, Y+12 +Prize: X=2988, Y=4228 + +Button A: X+71, Y+30 +Button B: X+20, Y+59 +Prize: X=1561, Y=16507 + +Button A: X+42, Y+15 +Button B: X+17, Y+34 +Prize: X=2543, Y=12806 + +Button A: X+72, Y+48 +Button B: X+20, Y+57 +Prize: X=3380, Y=6489 + +Button A: X+19, Y+44 +Button B: X+71, Y+47 +Prize: X=10116, Y=3015 + +Button A: X+68, Y+16 +Button B: X+22, Y+71 +Prize: X=5228, Y=2020 + +Button A: X+34, Y+12 +Button B: X+23, Y+59 +Prize: X=2871, Y=1583 + +Button A: X+20, Y+53 +Button B: X+34, Y+12 +Prize: X=11966, Y=7093 + +Button A: X+11, Y+31 +Button B: X+50, Y+12 +Prize: X=15300, Y=14926 + +Button A: X+24, Y+48 +Button B: X+62, Y+39 +Prize: X=14476, Y=16502 + +Button A: X+15, Y+57 +Button B: X+20, Y+12 +Prize: X=925, Y=1275 + +Button A: X+71, Y+34 +Button B: X+14, Y+54 +Prize: X=17647, Y=15614 + +Button A: X+50, Y+15 +Button B: X+16, Y+58 +Prize: X=3404, Y=15682 + +Button A: X+23, Y+59 +Button B: X+70, Y+34 +Prize: X=1845, Y=11637 + +Button A: X+39, Y+13 +Button B: X+14, Y+44 +Prize: X=3710, Y=19734 + +Button A: X+28, Y+48 +Button B: X+32, Y+15 +Prize: X=3284, Y=9737 + +Button A: X+87, Y+17 +Button B: X+28, Y+54 +Prize: X=8764, Y=4236 + +Button A: X+23, Y+12 +Button B: X+11, Y+50 +Prize: X=12590, Y=3064 + +Button A: X+46, Y+50 +Button B: X+82, Y+11 +Prize: X=9718, Y=4547 + +Button A: X+52, Y+25 +Button B: X+19, Y+55 +Prize: X=3670, Y=16450 + +Button A: X+50, Y+29 +Button B: X+24, Y+47 +Prize: X=19334, Y=4480 + +Button A: X+29, Y+12 +Button B: X+34, Y+67 +Prize: X=17630, Y=19800 + +Button A: X+20, Y+45 +Button B: X+48, Y+23 +Prize: X=13688, Y=13663 + +Button A: X+42, Y+84 +Button B: X+75, Y+35 +Prize: X=7386, Y=7182 + +Button A: X+28, Y+57 +Button B: X+33, Y+18 +Prize: X=16486, Y=9383 + +Button A: X+16, Y+56 +Button B: X+79, Y+40 +Prize: X=12085, Y=4488 + +Button A: X+32, Y+11 +Button B: X+30, Y+43 +Prize: X=11076, Y=3623 + +Button A: X+43, Y+45 +Button B: X+69, Y+17 +Prize: X=4224, Y=1660 + +Button A: X+31, Y+13 +Button B: X+44, Y+71 +Prize: X=5441, Y=2804 + +Button A: X+95, Y+33 +Button B: X+20, Y+42 +Prize: X=6340, Y=4656 + +Button A: X+15, Y+50 +Button B: X+66, Y+17 +Prize: X=13103, Y=6656 + +Button A: X+55, Y+28 +Button B: X+38, Y+64 +Prize: X=6727, Y=12972 + +Button A: X+44, Y+11 +Button B: X+14, Y+27 +Prize: X=9660, Y=483 + +Button A: X+19, Y+79 +Button B: X+82, Y+37 +Prize: X=5154, Y=8664 + +Button A: X+40, Y+98 +Button B: X+60, Y+25 +Prize: X=3740, Y=5625 + +Button A: X+45, Y+11 +Button B: X+17, Y+78 +Prize: X=17054, Y=7039 + +Button A: X+60, Y+19 +Button B: X+13, Y+27 +Prize: X=12610, Y=4381 + +Button A: X+27, Y+53 +Button B: X+50, Y+31 +Prize: X=7285, Y=5523 + +Button A: X+83, Y+25 +Button B: X+29, Y+98 +Prize: X=9774, Y=9014 + +Button A: X+15, Y+67 +Button B: X+75, Y+19 +Prize: X=12275, Y=2439 + +Button A: X+27, Y+66 +Button B: X+53, Y+29 +Prize: X=4020, Y=4095 + +Button A: X+67, Y+34 +Button B: X+19, Y+52 +Prize: X=2642, Y=12674 + +Button A: X+39, Y+11 +Button B: X+12, Y+67 +Prize: X=12602, Y=7573 + +Button A: X+48, Y+80 +Button B: X+98, Y+38 +Prize: X=10176, Y=4928 + +Button A: X+86, Y+63 +Button B: X+18, Y+87 +Prize: X=4980, Y=6084 + +Button A: X+47, Y+12 +Button B: X+38, Y+72 +Prize: X=17665, Y=14996 + +Button A: X+38, Y+70 +Button B: X+50, Y+24 +Prize: X=17126, Y=11366 + +Button A: X+26, Y+49 +Button B: X+46, Y+21 +Prize: X=8006, Y=3833 + +Button A: X+13, Y+59 +Button B: X+84, Y+35 +Prize: X=5229, Y=14982 + +Button A: X+14, Y+84 +Button B: X+83, Y+15 +Prize: X=767, Y=12359 + +Button A: X+52, Y+15 +Button B: X+23, Y+51 +Prize: X=2423, Y=4130 + +Button A: X+80, Y+86 +Button B: X+18, Y+94 +Prize: X=4434, Y=7230 + +Button A: X+46, Y+13 +Button B: X+13, Y+45 +Prize: X=15345, Y=12288 + +Button A: X+54, Y+17 +Button B: X+21, Y+65 +Prize: X=12962, Y=7239 + +Button A: X+38, Y+12 +Button B: X+36, Y+70 +Prize: X=19066, Y=13236 + +Button A: X+67, Y+97 +Button B: X+42, Y+16 +Prize: X=6900, Y=7346 + +Button A: X+48, Y+17 +Button B: X+28, Y+66 +Prize: X=12428, Y=6779 + +Button A: X+51, Y+22 +Button B: X+29, Y+61 +Prize: X=2681, Y=3727 + +Button A: X+78, Y+67 +Button B: X+16, Y+65 +Prize: X=6426, Y=7365 + +Button A: X+39, Y+60 +Button B: X+48, Y+21 +Prize: X=14303, Y=13676 + +Button A: X+48, Y+23 +Button B: X+27, Y+50 +Prize: X=3065, Y=15585 + +Button A: X+72, Y+41 +Button B: X+48, Y+94 +Prize: X=7608, Y=5799 + +Button A: X+53, Y+82 +Button B: X+33, Y+12 +Prize: X=7943, Y=12152 + +Button A: X+58, Y+31 +Button B: X+25, Y+56 +Prize: X=978, Y=12450 + +Button A: X+28, Y+54 +Button B: X+31, Y+16 +Prize: X=9052, Y=1182 + +Button A: X+19, Y+25 +Button B: X+78, Y+16 +Prize: X=6042, Y=3012 + +Button A: X+68, Y+22 +Button B: X+11, Y+70 +Prize: X=6952, Y=5124 + +Button A: X+36, Y+12 +Button B: X+41, Y+77 +Prize: X=17252, Y=3044 + +Button A: X+56, Y+87 +Button B: X+71, Y+18 +Prize: X=12218, Y=10305 + +Button A: X+73, Y+88 +Button B: X+61, Y+20 +Prize: X=7058, Y=8080 + +Button A: X+99, Y+63 +Button B: X+16, Y+49 +Prize: X=9732, Y=7707 + +Button A: X+34, Y+71 +Button B: X+41, Y+26 +Prize: X=3912, Y=5546 + +Button A: X+75, Y+11 +Button B: X+29, Y+57 +Prize: X=4779, Y=3391 + +Button A: X+16, Y+36 +Button B: X+41, Y+29 +Prize: X=2328, Y=6884 + +Button A: X+57, Y+15 +Button B: X+59, Y+92 +Prize: X=4620, Y=3510 + +Button A: X+19, Y+72 +Button B: X+65, Y+61 +Prize: X=2406, Y=7079 + +Button A: X+25, Y+60 +Button B: X+48, Y+11 +Prize: X=11531, Y=10602 + +Button A: X+48, Y+12 +Button B: X+21, Y+52 +Prize: X=12905, Y=10256 + +Button A: X+55, Y+14 +Button B: X+16, Y+39 +Prize: X=3639, Y=3499 + +Button A: X+18, Y+69 +Button B: X+57, Y+13 +Prize: X=1841, Y=3718 + +Button A: X+82, Y+49 +Button B: X+16, Y+47 +Prize: X=11154, Y=15893 + +Button A: X+41, Y+12 +Button B: X+37, Y+69 +Prize: X=8225, Y=11330 + +Button A: X+54, Y+17 +Button B: X+14, Y+63 +Prize: X=394, Y=11529 + +Button A: X+75, Y+26 +Button B: X+18, Y+58 +Prize: X=7085, Y=18528 + +Button A: X+61, Y+35 +Button B: X+14, Y+39 +Prize: X=7585, Y=13612 + +Button A: X+30, Y+67 +Button B: X+47, Y+13 +Prize: X=15083, Y=14276 + +Button A: X+89, Y+11 +Button B: X+20, Y+16 +Prize: X=3756, Y=1560 + +Button A: X+26, Y+53 +Button B: X+57, Y+34 +Prize: X=18986, Y=14053 + +Button A: X+42, Y+66 +Button B: X+44, Y+20 +Prize: X=2120, Y=2960 + +Button A: X+12, Y+40 +Button B: X+74, Y+40 +Prize: X=4890, Y=3280 + +Button A: X+22, Y+12 +Button B: X+30, Y+56 +Prize: X=14898, Y=12424 + +Button A: X+34, Y+17 +Button B: X+33, Y+94 +Prize: X=3615, Y=6225 + +Button A: X+25, Y+28 +Button B: X+70, Y+12 +Prize: X=1785, Y=472 + +Button A: X+39, Y+96 +Button B: X+50, Y+21 +Prize: X=8438, Y=10869 + +Button A: X+45, Y+97 +Button B: X+82, Y+56 +Prize: X=11546, Y=13054 + +Button A: X+72, Y+71 +Button B: X+20, Y+82 +Prize: X=3404, Y=9024 + +Button A: X+15, Y+62 +Button B: X+89, Y+29 +Prize: X=2187, Y=2940 + +Button A: X+56, Y+26 +Button B: X+31, Y+67 +Prize: X=7560, Y=8454 + +Button A: X+40, Y+20 +Button B: X+25, Y+61 +Prize: X=6915, Y=17515 + +Button A: X+18, Y+76 +Button B: X+75, Y+11 +Prize: X=7427, Y=13459 + +Button A: X+65, Y+41 +Button B: X+42, Y+91 +Prize: X=7655, Y=8699 + +Button A: X+54, Y+46 +Button B: X+26, Y+74 +Prize: X=3206, Y=3094 + +Button A: X+38, Y+40 +Button B: X+11, Y+78 +Prize: X=3552, Y=9584 + +Button A: X+84, Y+31 +Button B: X+36, Y+50 +Prize: X=3492, Y=2794 + +Button A: X+55, Y+24 +Button B: X+20, Y+63 +Prize: X=5845, Y=3641 + +Button A: X+15, Y+50 +Button B: X+71, Y+31 +Prize: X=1608, Y=4743 + +Button A: X+13, Y+51 +Button B: X+33, Y+13 +Prize: X=2343, Y=18073 + +Button A: X+12, Y+31 +Button B: X+69, Y+55 +Prize: X=6159, Y=5188 + +Button A: X+71, Y+25 +Button B: X+17, Y+66 +Prize: X=15409, Y=2325 + +Button A: X+70, Y+31 +Button B: X+13, Y+44 +Prize: X=6851, Y=9483 + +Button A: X+23, Y+16 +Button B: X+11, Y+30 +Prize: X=12549, Y=14808 + +Button A: X+42, Y+13 +Button B: X+36, Y+55 +Prize: X=6488, Y=12226 + +Button A: X+13, Y+63 +Button B: X+96, Y+23 +Prize: X=1746, Y=5808 + +Button A: X+13, Y+42 +Button B: X+60, Y+26 +Prize: X=2820, Y=17794 + +Button A: X+30, Y+47 +Button B: X+34, Y+16 +Prize: X=10048, Y=17922 + +Button A: X+39, Y+14 +Button B: X+24, Y+44 +Prize: X=14195, Y=9630 + +Button A: X+30, Y+74 +Button B: X+40, Y+12 +Prize: X=13600, Y=9780 + +Button A: X+45, Y+14 +Button B: X+60, Y+73 +Prize: X=6495, Y=6150 + +Button A: X+81, Y+40 +Button B: X+15, Y+92 +Prize: X=3600, Y=3808 + +Button A: X+50, Y+17 +Button B: X+16, Y+43 +Prize: X=12846, Y=3081 + +Button A: X+11, Y+56 +Button B: X+56, Y+11 +Prize: X=15722, Y=13787 + +Button A: X+16, Y+88 +Button B: X+97, Y+57 +Prize: X=1582, Y=2030 + +Button A: X+37, Y+81 +Button B: X+82, Y+11 +Prize: X=2338, Y=1074 + +Button A: X+36, Y+67 +Button B: X+32, Y+15 +Prize: X=8128, Y=3084 + +Button A: X+92, Y+33 +Button B: X+25, Y+95 +Prize: X=7881, Y=8419 + +Button A: X+51, Y+30 +Button B: X+30, Y+99 +Prize: X=4803, Y=4371 + +Button A: X+66, Y+15 +Button B: X+13, Y+58 +Prize: X=5755, Y=9922 + +Button A: X+75, Y+21 +Button B: X+15, Y+60 +Prize: X=8390, Y=11918 + +Button A: X+56, Y+25 +Button B: X+19, Y+48 +Prize: X=7523, Y=16722 + +Button A: X+18, Y+50 +Button B: X+53, Y+23 +Prize: X=17022, Y=16754 + +Button A: X+16, Y+35 +Button B: X+34, Y+20 +Prize: X=16244, Y=18770 + +Button A: X+24, Y+66 +Button B: X+26, Y+11 +Prize: X=17954, Y=12959 + +Button A: X+49, Y+16 +Button B: X+40, Y+77 +Prize: X=17697, Y=3668 + +Button A: X+65, Y+12 +Button B: X+45, Y+61 +Prize: X=4180, Y=4829 + +Button A: X+58, Y+23 +Button B: X+13, Y+65 +Prize: X=19471, Y=3477 + +Button A: X+84, Y+49 +Button B: X+17, Y+83 +Prize: X=9493, Y=12042 + +Button A: X+26, Y+67 +Button B: X+69, Y+26 +Prize: X=3762, Y=247 + +Button A: X+35, Y+23 +Button B: X+19, Y+41 +Prize: X=2950, Y=3792 + +Button A: X+55, Y+26 +Button B: X+27, Y+76 +Prize: X=1346, Y=826 + +Button A: X+53, Y+65 +Button B: X+58, Y+11 +Prize: X=5917, Y=5573 + +Button A: X+95, Y+15 +Button B: X+36, Y+99 +Prize: X=9206, Y=8079 + +Button A: X+80, Y+40 +Button B: X+35, Y+67 +Prize: X=4420, Y=2804 + +Button A: X+39, Y+45 +Button B: X+66, Y+14 +Prize: X=5136, Y=3440 + +Button A: X+81, Y+65 +Button B: X+24, Y+81 +Prize: X=1332, Y=1995 + +Button A: X+92, Y+62 +Button B: X+22, Y+54 +Prize: X=5740, Y=6062 + +Button A: X+59, Y+52 +Button B: X+26, Y+93 +Prize: X=2668, Y=4454 + +Button A: X+57, Y+13 +Button B: X+24, Y+50 +Prize: X=18335, Y=16341 + +Button A: X+22, Y+76 +Button B: X+82, Y+26 +Prize: X=2416, Y=3458 + +Button A: X+30, Y+73 +Button B: X+19, Y+11 +Prize: X=3561, Y=7291 + +Button A: X+11, Y+81 +Button B: X+24, Y+12 +Prize: X=2602, Y=7794 + +Button A: X+51, Y+79 +Button B: X+95, Y+24 +Prize: X=6873, Y=3257 + +Button A: X+23, Y+48 +Button B: X+70, Y+44 +Prize: X=3045, Y=19172 + +Button A: X+19, Y+92 +Button B: X+86, Y+18 +Prize: X=2339, Y=2162 + +Button A: X+13, Y+60 +Button B: X+35, Y+15 +Prize: X=7096, Y=16190 + +Button A: X+51, Y+22 +Button B: X+12, Y+35 +Prize: X=12254, Y=3351 + +Button A: X+60, Y+31 +Button B: X+44, Y+78 +Prize: X=4668, Y=6391 + +Button A: X+17, Y+43 +Button B: X+42, Y+19 +Prize: X=3734, Y=7603 + +Button A: X+78, Y+32 +Button B: X+14, Y+25 +Prize: X=3828, Y=2437 + +Button A: X+44, Y+17 +Button B: X+37, Y+60 +Prize: X=3131, Y=11574 + +Button A: X+66, Y+89 +Button B: X+53, Y+15 +Prize: X=5112, Y=5877 + +Button A: X+15, Y+59 +Button B: X+75, Y+27 +Prize: X=12545, Y=6573 + +Button A: X+54, Y+16 +Button B: X+25, Y+61 +Prize: X=5353, Y=325 + +Button A: X+28, Y+19 +Button B: X+29, Y+88 +Prize: X=4372, Y=8979 + +Button A: X+59, Y+99 +Button B: X+64, Y+12 +Prize: X=2829, Y=2553 + +Button A: X+24, Y+80 +Button B: X+95, Y+67 +Prize: X=5683, Y=5711 + +Button A: X+13, Y+42 +Button B: X+44, Y+22 +Prize: X=13586, Y=11034 + +Button A: X+13, Y+27 +Button B: X+27, Y+11 +Prize: X=1714, Y=19578 + +Button A: X+78, Y+40 +Button B: X+15, Y+25 +Prize: X=7623, Y=4965 + +Button A: X+13, Y+38 +Button B: X+34, Y+19 +Prize: X=13897, Y=19462 + +Button A: X+16, Y+86 +Button B: X+90, Y+97 +Prize: X=7454, Y=11059 + +Button A: X+16, Y+74 +Button B: X+48, Y+14 +Prize: X=672, Y=15348 + +Button A: X+19, Y+56 +Button B: X+92, Y+49 +Prize: X=3224, Y=4837 + +Button A: X+65, Y+11 +Button B: X+24, Y+84 +Prize: X=19354, Y=16330 + +Button A: X+62, Y+14 +Button B: X+18, Y+55 +Prize: X=9152, Y=14331 + +Button A: X+45, Y+89 +Button B: X+46, Y+14 +Prize: X=6885, Y=6689 + +Button A: X+53, Y+21 +Button B: X+28, Y+67 +Prize: X=7769, Y=9179 + +Button A: X+57, Y+83 +Button B: X+69, Y+18 +Prize: X=10614, Y=9105 + +Button A: X+47, Y+14 +Button B: X+13, Y+37 +Prize: X=6583, Y=4633 + +Button A: X+11, Y+59 +Button B: X+39, Y+15 +Prize: X=11414, Y=3470 + +Button A: X+30, Y+11 +Button B: X+19, Y+65 +Prize: X=2311, Y=16664 + +Button A: X+38, Y+21 +Button B: X+35, Y+61 +Prize: X=18354, Y=4375 + +Button A: X+28, Y+57 +Button B: X+54, Y+19 +Prize: X=16000, Y=12527 + +Button A: X+46, Y+21 +Button B: X+11, Y+56 +Prize: X=3961, Y=3371 + +Button A: X+21, Y+69 +Button B: X+99, Y+57 +Prize: X=1212, Y=1836 + +Button A: X+17, Y+71 +Button B: X+50, Y+11 +Prize: X=5903, Y=10901 + +Button A: X+18, Y+36 +Button B: X+47, Y+23 +Prize: X=3326, Y=14216 + +Button A: X+40, Y+99 +Button B: X+60, Y+45 +Prize: X=7360, Y=9936 + +Button A: X+13, Y+50 +Button B: X+17, Y+11 +Prize: X=2723, Y=5089 + +Button A: X+18, Y+61 +Button B: X+84, Y+14 +Prize: X=8412, Y=4418 + +Button A: X+26, Y+13 +Button B: X+16, Y+31 +Prize: X=7920, Y=4033 + +Button A: X+78, Y+32 +Button B: X+13, Y+48 +Prize: X=7956, Y=6592 + +Button A: X+64, Y+19 +Button B: X+15, Y+45 +Prize: X=15736, Y=14716 + +Button A: X+84, Y+36 +Button B: X+11, Y+49 +Prize: X=9518, Y=19202 + +Button A: X+19, Y+50 +Button B: X+53, Y+21 +Prize: X=11936, Y=5601 + +Button A: X+78, Y+13 +Button B: X+12, Y+49 +Prize: X=8930, Y=5295 + +Button A: X+15, Y+37 +Button B: X+78, Y+57 +Prize: X=4097, Y=17153 + +Button A: X+67, Y+25 +Button B: X+51, Y+85 +Prize: X=6603, Y=4245 + +Button A: X+93, Y+21 +Button B: X+59, Y+89 +Prize: X=9830, Y=6836 + +Button A: X+44, Y+17 +Button B: X+16, Y+41 +Prize: X=1928, Y=2068 + +Button A: X+43, Y+90 +Button B: X+66, Y+45 +Prize: X=8152, Y=10170 + +Button A: X+14, Y+41 +Button B: X+99, Y+34 +Prize: X=7975, Y=3137 + +Button A: X+65, Y+24 +Button B: X+28, Y+62 +Prize: X=13424, Y=14226 + +Button A: X+67, Y+12 +Button B: X+17, Y+74 +Prize: X=7807, Y=2320 + +Button A: X+50, Y+80 +Button B: X+83, Y+14 +Prize: X=8199, Y=6822 + +Button A: X+78, Y+92 +Button B: X+15, Y+86 +Prize: X=7422, Y=14492 + +Button A: X+23, Y+56 +Button B: X+64, Y+31 +Prize: X=16640, Y=9512 + +Button A: X+20, Y+99 +Button B: X+36, Y+15 +Prize: X=2828, Y=6981 + +Button A: X+65, Y+33 +Button B: X+18, Y+42 +Prize: X=14469, Y=11309 + +Button A: X+54, Y+74 +Button B: X+87, Y+14 +Prize: X=10155, Y=5814 + +Button A: X+49, Y+25 +Button B: X+30, Y+64 +Prize: X=2549, Y=1587 + +Button A: X+65, Y+41 +Button B: X+17, Y+33 +Prize: X=529, Y=6313 + +Button A: X+28, Y+96 +Button B: X+94, Y+61 +Prize: X=2878, Y=4903 + +Button A: X+85, Y+12 +Button B: X+11, Y+78 +Prize: X=12753, Y=17192 + +Button A: X+41, Y+26 +Button B: X+28, Y+81 +Prize: X=5978, Y=8218 + +Button A: X+33, Y+14 +Button B: X+11, Y+47 +Prize: X=5732, Y=3748 + +Button A: X+79, Y+68 +Button B: X+12, Y+52 +Prize: X=1307, Y=4292 + +Button A: X+12, Y+40 +Button B: X+77, Y+49 +Prize: X=1685, Y=9105 + +Button A: X+13, Y+41 +Button B: X+83, Y+56 +Prize: X=18196, Y=6822 + +Button A: X+13, Y+46 +Button B: X+57, Y+17 +Prize: X=598, Y=4502 + +Button A: X+45, Y+20 +Button B: X+11, Y+42 +Prize: X=3832, Y=204 + +Button A: X+11, Y+37 +Button B: X+63, Y+26 +Prize: X=5093, Y=2816 + +Button A: X+73, Y+15 +Button B: X+26, Y+37 +Prize: X=2871, Y=1508 + +Button A: X+24, Y+87 +Button B: X+69, Y+23 +Prize: X=3441, Y=5887 + +Button A: X+13, Y+56 +Button B: X+59, Y+19 +Prize: X=19054, Y=11310 + +Button A: X+51, Y+27 +Button B: X+33, Y+71 +Prize: X=5841, Y=6197 + +Button A: X+51, Y+81 +Button B: X+59, Y+18 +Prize: X=8661, Y=8532 + +Button A: X+20, Y+96 +Button B: X+42, Y+33 +Prize: X=4498, Y=6585 + +Button A: X+50, Y+82 +Button B: X+97, Y+34 +Prize: X=6745, Y=6684 + +Button A: X+69, Y+25 +Button B: X+14, Y+48 +Prize: X=11428, Y=14726 + +Button A: X+90, Y+44 +Button B: X+37, Y+88 +Prize: X=3393, Y=2288 + +Button A: X+31, Y+74 +Button B: X+56, Y+17 +Prize: X=2670, Y=4040 + +Button A: X+54, Y+87 +Button B: X+78, Y+32 +Prize: X=5466, Y=5809 + +Button A: X+72, Y+26 +Button B: X+12, Y+67 +Prize: X=1604, Y=5033 + +Button A: X+88, Y+20 +Button B: X+23, Y+97 +Prize: X=1753, Y=1775 + +Button A: X+73, Y+27 +Button B: X+20, Y+57 +Prize: X=11138, Y=12104 + +Button A: X+18, Y+65 +Button B: X+50, Y+24 +Prize: X=5672, Y=5766 + +Button A: X+16, Y+55 +Button B: X+54, Y+20 +Prize: X=18756, Y=14580 + +Button A: X+46, Y+29 +Button B: X+17, Y+46 +Prize: X=2394, Y=17395 + +Button A: X+16, Y+60 +Button B: X+85, Y+49 +Prize: X=7894, Y=8562 + +Button A: X+53, Y+17 +Button B: X+27, Y+70 +Prize: X=13517, Y=12629 + +Button A: X+20, Y+73 +Button B: X+56, Y+16 +Prize: X=8496, Y=4948 + +Button A: X+51, Y+93 +Button B: X+60, Y+18 +Prize: X=6126, Y=8520 + +Button A: X+15, Y+43 +Button B: X+64, Y+38 +Prize: X=5574, Y=4926 + +Button A: X+21, Y+60 +Button B: X+57, Y+17 +Prize: X=4337, Y=11300 + diff --git a/day14/day14.hs b/day14/day14.hs new file mode 100644 index 0000000..337fe68 --- /dev/null +++ b/day14/day14.hs @@ -0,0 +1,73 @@ +import Data.List +import Data.List.Split + +type Vec = (Int, Int) +type Robot = (Vec, Vec) + +size :: Vec +size = (101, 103) + +mul :: Int -> Vec -> Vec +mul s (x, y) = (s*x, s*y) +add :: Vec -> Vec -> Vec +add (x, y) (z, w) = (x+z, y+w) +clamp :: Vec -> Vec -> Vec +clamp m@(mx, my) v@(x, y) + | x < 0 = clamp m (x + mx, y) + | y < 0 = clamp m (x, y + my) + | x >= mx = clamp m (x - mx, y) + | y >= my = clamp m (x, y - my) + | otherwise = v + +consume1 :: String -> Robot +consume1 str = + ((atoi px, atoi py), (atoi vx, atoi vy)) + where + atoi = (read::String->Int) + ["p", px, py, "v", vx, vy] = splitOneOf "=, " str + +consume :: String -> [Robot] +consume file = + map consume1 $ lines file + +step :: [Robot] -> [Robot] +step robots = + map stepOne robots + where + stepOne (p, v) = (clamp size $ add p v, v) + +applyN :: Int -> (a -> a) -> a -> a +applyN n f = + foldr (.) id (replicate n f) + +count :: Vec -> Vec -> [Robot] -> Int +count tl br robots = + length $ filter (inside tl br) robots + where + inside (xs, ys) (xe, ye) ((x, y), _) = + x >= xs && x < xe && y >= ys && y < ye + +counts :: [Robot] -> (Int, Int, Int, Int) +counts robots = + (count (0, 0) (tx, ty) robots, + count ((tx + 1), 0) (mx, ty) robots, + count (0, (ty + 1)) (tx, my) robots, + count ((tx + 1), (ty + 1)) (mx, my) robots) + where + (mx, my) = size + tx = (mx - 1) `div` 2 + ty = (my - 1) `div` 2 + +safety :: (Int, Int, Int, Int) -> Int +safety (a, b, c, d) = + a * b * c * d + +part1 :: [Robot] -> Int +part1 robots = + safety $ counts $ applyN 100 step robots + +main = do + file <- readFile "day14.input" + let robots = consume file + putStrLn ("Part 1: " ++ (show $ part1 robots)) + --putStrLn ("Part 2: " ++ (show $ part2 robots)) diff --git a/day14/day14.input b/day14/day14.input new file mode 100644 index 0000000..c7d0438 --- /dev/null +++ b/day14/day14.input @@ -0,0 +1,500 @@ +p=46,91 v=80,-6 +p=89,91 v=-69,68 +p=61,39 v=-75,66 +p=8,63 v=48,-75 +p=58,76 v=-18,19 +p=99,14 v=-92,-85 +p=80,66 v=-3,-13 +p=15,1 v=-11,30 +p=52,79 v=93,81 +p=81,44 v=24,99 +p=6,41 v=-12,61 +p=40,14 v=-47,-85 +p=53,30 v=-52,-78 +p=2,53 v=-97,-33 +p=25,75 v=79,44 +p=77,17 v=-30,-21 +p=41,41 v=93,-99 +p=95,98 v=-49,43 +p=52,56 v=-88,-55 +p=99,20 v=-64,-53 +p=9,7 v=-56,-26 +p=18,0 v=87,-77 +p=90,95 v=-51,72 +p=25,81 v=20,-39 +p=94,79 v=-12,68 +p=58,88 v=-88,6 +p=31,99 v=-11,-85 +p=99,79 v=33,-46 +p=86,25 v=97,-17 +p=79,73 v=-35,-4 +p=20,52 v=17,63 +p=65,65 v=-98,-34 +p=34,31 v=33,-49 +p=14,21 v=17,54 +p=71,16 v=29,42 +p=63,53 v=-41,44 +p=59,78 v=-44,-92 +p=44,96 v=88,93 +p=88,70 v=-38,36 +p=78,78 v=16,11 +p=12,35 v=27,21 +p=45,77 v=-65,-10 +p=80,87 v=31,89 +p=31,2 v=-68,59 +p=24,64 v=-6,3 +p=28,34 v=54,-98 +p=99,61 v=-71,-21 +p=11,84 v=-37,60 +p=14,14 v=-68,-57 +p=97,12 v=-92,58 +p=25,69 v=39,-61 +p=72,34 v=60,-62 +p=15,84 v=-10,14 +p=96,57 v=-56,15 +p=76,55 v=-33,98 +p=23,97 v=56,60 +p=34,30 v=-68,76 +p=14,2 v=-68,22 +p=8,8 v=5,46 +p=16,38 v=-71,-21 +p=62,91 v=21,72 +p=67,75 v=-23,-96 +p=28,69 v=-79,31 +p=17,71 v=-81,36 +p=98,62 v=-43,-59 +p=61,92 v=-79,7 +p=55,26 v=-81,55 +p=97,18 v=66,-32 +p=93,33 v=92,-78 +p=29,53 v=54,70 +p=49,100 v=45,-43 +p=63,13 v=52,38 +p=13,49 v=9,-64 +p=73,37 v=46,7 +p=86,56 v=63,-50 +p=0,2 v=43,-61 +p=57,96 v=-96,74 +p=84,63 v=-66,-26 +p=25,94 v=-86,68 +p=6,72 v=82,40 +p=49,5 v=15,-20 +p=52,28 v=-28,-63 +p=17,99 v=56,-31 +p=42,85 v=13,44 +p=12,33 v=99,-19 +p=97,16 v=19,-69 +p=44,29 v=-99,-59 +p=30,15 v=36,-81 +p=58,42 v=-62,33 +p=32,36 v=28,-41 +p=34,97 v=-29,2 +p=21,61 v=86,-44 +p=27,94 v=-49,13 +p=60,74 v=-72,85 +p=32,81 v=-42,93 +p=46,37 v=37,16 +p=78,25 v=-49,-8 +p=72,76 v=-88,97 +p=21,59 v=-2,89 +p=1,16 v=-79,-24 +p=34,55 v=54,-50 +p=34,36 v=46,37 +p=99,29 v=-71,-42 +p=83,50 v=-24,19 +p=51,65 v=-12,13 +p=9,41 v=74,70 +p=38,34 v=-65,29 +p=8,22 v=-79,-66 +p=76,77 v=83,-13 +p=41,15 v=67,17 +p=46,51 v=85,78 +p=14,99 v=-33,39 +p=49,33 v=-93,-90 +p=5,102 v=74,-28 +p=27,7 v=22,37 +p=80,80 v=-87,-83 +p=21,73 v=-76,2 +p=59,63 v=-76,-91 +p=36,60 v=-34,-46 +p=84,89 v=99,-35 +p=53,89 v=24,-67 +p=17,57 v=39,31 +p=86,60 v=-11,-93 +p=58,5 v=11,49 +p=35,82 v=-91,-10 +p=8,38 v=-48,-74 +p=69,58 v=34,-38 +p=26,17 v=-94,-40 +p=66,77 v=-10,64 +p=18,7 v=-14,43 +p=67,71 v=78,11 +p=84,67 v=-7,-1 +p=67,54 v=-54,-38 +p=38,30 v=-83,82 +p=9,19 v=-4,-32 +p=34,61 v=-11,65 +p=8,60 v=-63,64 +p=11,45 v=-75,-29 +p=80,26 v=-92,20 +p=24,18 v=98,-73 +p=63,6 v=86,-53 +p=10,60 v=7,69 +p=76,47 v=34,-93 +p=98,9 v=-17,46 +p=65,19 v=11,-73 +p=54,51 v=-14,-67 +p=74,56 v=-82,40 +p=43,74 v=-78,19 +p=46,38 v=-83,62 +p=51,3 v=28,-19 +p=75,47 v=-8,85 +p=40,43 v=-94,-42 +p=99,48 v=27,-54 +p=16,55 v=-48,-62 +p=82,79 v=-34,58 +p=9,52 v=-53,12 +p=53,91 v=34,-48 +p=98,68 v=-17,-39 +p=30,38 v=-58,17 +p=95,87 v=36,-57 +p=97,43 v=-69,74 +p=70,46 v=65,41 +p=14,52 v=30,-21 +p=51,77 v=20,-47 +p=19,38 v=22,33 +p=32,22 v=96,17 +p=91,38 v=15,14 +p=13,98 v=43,80 +p=31,98 v=-1,59 +p=14,39 v=40,-29 +p=58,32 v=87,-89 +p=52,42 v=78,-21 +p=24,13 v=-97,-3 +p=23,26 v=33,-49 +p=6,10 v=-97,-77 +p=59,7 v=43,-47 +p=89,98 v=-30,6 +p=29,65 v=-3,-17 +p=85,95 v=94,72 +p=54,14 v=80,52 +p=85,83 v=-68,65 +p=60,22 v=-44,5 +p=91,67 v=-25,69 +p=90,81 v=-76,99 +p=22,92 v=-6,2 +p=37,59 v=-73,7 +p=37,37 v=-26,-46 +p=78,74 v=45,73 +p=94,57 v=38,-60 +p=62,88 v=-49,56 +p=62,29 v=96,37 +p=76,71 v=-3,-38 +p=6,94 v=-51,8 +p=95,64 v=95,50 +p=76,90 v=99,-93 +p=38,93 v=95,-23 +p=62,76 v=-62,60 +p=70,61 v=94,-18 +p=85,29 v=-61,50 +p=11,75 v=-27,56 +p=35,51 v=43,13 +p=14,74 v=61,52 +p=30,15 v=-55,-28 +p=18,69 v=-97,-58 +p=98,33 v=53,-70 +p=30,61 v=-45,-14 +p=77,102 v=16,-15 +p=93,87 v=92,83 +p=23,10 v=20,-98 +p=75,48 v=86,-9 +p=6,57 v=51,-48 +p=39,35 v=80,91 +p=84,70 v=63,81 +p=5,40 v=-44,-79 +p=38,81 v=2,52 +p=91,73 v=50,-55 +p=55,101 v=95,-22 +p=12,13 v=4,-73 +p=34,25 v=-39,-37 +p=80,5 v=-2,-44 +p=85,75 v=-54,65 +p=36,37 v=-47,-78 +p=7,18 v=79,92 +p=79,101 v=-59,-81 +p=15,42 v=43,74 +p=23,4 v=85,-64 +p=95,10 v=-95,30 +p=23,96 v=-94,88 +p=57,45 v=26,8 +p=63,37 v=-91,83 +p=73,0 v=-15,10 +p=44,3 v=-39,-52 +p=17,90 v=94,88 +p=63,65 v=17,21 +p=9,32 v=58,-66 +p=57,37 v=8,-5 +p=86,17 v=89,-65 +p=65,81 v=-26,73 +p=63,56 v=80,9 +p=69,33 v=29,-85 +p=81,0 v=-92,23 +p=97,44 v=45,-63 +p=42,85 v=-83,18 +p=36,90 v=12,79 +p=52,59 v=-75,-83 +p=25,72 v=76,83 +p=19,81 v=22,77 +p=31,35 v=-59,-38 +p=59,49 v=18,73 +p=52,24 v=31,-8 +p=65,34 v=-5,4 +p=69,95 v=-41,-93 +p=17,94 v=-19,-68 +p=90,99 v=-87,-85 +p=30,74 v=-94,-96 +p=13,40 v=2,13 +p=100,3 v=40,-77 +p=84,6 v=-72,21 +p=51,43 v=-26,74 +p=5,82 v=84,89 +p=28,63 v=90,-5 +p=28,17 v=90,-24 +p=98,70 v=40,23 +p=39,75 v=82,-19 +p=3,56 v=-35,-13 +p=46,8 v=-39,-40 +p=28,28 v=64,50 +p=25,70 v=54,31 +p=1,79 v=27,-47 +p=35,56 v=90,-5 +p=19,23 v=-58,46 +p=31,90 v=67,59 +p=30,53 v=-89,59 +p=56,23 v=-21,-73 +p=75,4 v=-72,-23 +p=48,1 v=88,-85 +p=37,13 v=36,51 +p=68,66 v=-41,-67 +p=29,2 v=64,-52 +p=16,57 v=17,32 +p=78,22 v=-10,-40 +p=36,52 v=-11,49 +p=25,43 v=95,-54 +p=11,62 v=87,95 +p=67,59 v=91,7 +p=30,20 v=77,54 +p=31,15 v=33,87 +p=75,37 v=72,73 +p=95,30 v=-50,38 +p=95,54 v=40,49 +p=42,93 v=38,85 +p=40,78 v=41,-60 +p=33,64 v=42,-48 +p=36,62 v=72,-55 +p=13,29 v=12,-65 +p=77,54 v=-10,-54 +p=67,70 v=96,-92 +p=4,39 v=-69,-9 +p=65,97 v=-47,-62 +p=40,97 v=26,41 +p=21,69 v=35,56 +p=100,4 v=-56,13 +p=19,57 v=88,-66 +p=93,96 v=13,-86 +p=14,37 v=-53,4 +p=55,58 v=-35,-79 +p=35,44 v=10,-27 +p=63,65 v=-36,-17 +p=69,8 v=60,67 +p=0,22 v=66,48 +p=13,47 v=-24,16 +p=66,17 v=-62,-98 +p=93,14 v=-51,1 +p=44,45 v=23,33 +p=92,10 v=63,-73 +p=47,81 v=54,-30 +p=64,43 v=90,-92 +p=0,23 v=14,4 +p=49,57 v=75,61 +p=80,42 v=-90,-21 +p=61,99 v=-5,-60 +p=61,98 v=93,-89 +p=79,7 v=-90,-7 +p=83,14 v=-20,-53 +p=22,72 v=17,35 +p=51,56 v=-69,-49 +p=76,13 v=25,2 +p=55,18 v=47,-3 +p=61,93 v=-15,51 +p=21,81 v=-45,-6 +p=84,42 v=-2,-5 +p=20,46 v=-1,57 +p=62,62 v=-75,65 +p=80,25 v=65,-20 +p=20,35 v=64,91 +p=78,25 v=68,-45 +p=50,21 v=-78,-57 +p=47,34 v=-83,-41 +p=19,33 v=43,-82 +p=42,99 v=-21,-97 +p=95,44 v=-90,-66 +p=39,62 v=60,-80 +p=49,87 v=18,93 +p=68,43 v=-83,-98 +p=36,64 v=-19,-67 +p=88,7 v=14,-77 +p=93,32 v=-12,-16 +p=59,78 v=-88,56 +p=17,87 v=2,-93 +p=39,90 v=-22,23 +p=58,41 v=-65,54 +p=100,47 v=-35,-91 +p=10,38 v=-27,74 +p=93,90 v=89,85 +p=37,64 v=54,77 +p=4,5 v=69,-61 +p=17,69 v=69,-1 +p=91,40 v=-56,-42 +p=12,33 v=22,97 +p=39,7 v=-57,-15 +p=50,25 v=-48,13 +p=37,60 v=-79,-47 +p=79,26 v=42,-57 +p=92,1 v=42,-60 +p=65,29 v=-23,-4 +p=41,26 v=75,8 +p=58,65 v=-83,86 +p=54,98 v=-19,36 +p=41,18 v=93,13 +p=3,81 v=-89,47 +p=70,95 v=-36,-1 +p=50,24 v=28,-91 +p=24,21 v=-19,-42 +p=64,20 v=62,62 +p=86,52 v=81,53 +p=28,24 v=7,-43 +p=2,63 v=-97,98 +p=91,55 v=14,-79 +p=52,92 v=83,31 +p=86,93 v=-38,-37 +p=70,52 v=12,99 +p=14,47 v=-48,23 +p=99,58 v=-61,-79 +p=20,19 v=74,33 +p=33,73 v=-41,80 +p=94,12 v=-43,84 +p=0,39 v=66,-60 +p=76,8 v=-41,-72 +p=15,99 v=-97,6 +p=13,24 v=93,-21 +p=88,96 v=32,-64 +p=98,29 v=-74,12 +p=20,79 v=48,14 +p=69,78 v=36,-66 +p=99,25 v=37,-33 +p=59,88 v=80,6 +p=45,47 v=-83,-25 +p=61,15 v=-31,-3 +p=83,71 v=-64,-14 +p=5,43 v=62,-75 +p=98,71 v=84,-10 +p=45,72 v=45,31 +p=23,34 v=-63,62 +p=44,101 v=-52,-57 +p=43,99 v=98,-80 +p=12,42 v=-71,-25 +p=74,99 v=16,-93 +p=36,19 v=15,42 +p=17,55 v=-22,81 +p=91,94 v=50,72 +p=81,42 v=11,-83 +p=39,33 v=-11,-39 +p=78,58 v=81,98 +p=62,94 v=-5,-96 +p=9,68 v=-21,-15 +p=54,84 v=-26,97 +p=67,45 v=97,9 +p=94,69 v=45,7 +p=13,18 v=-97,83 +p=33,53 v=67,12 +p=49,79 v=67,-22 +p=15,90 v=-32,-27 +p=89,54 v=50,28 +p=11,6 v=87,96 +p=89,58 v=19,-59 +p=95,1 v=27,-68 +p=5,71 v=-6,90 +p=36,71 v=-19,-67 +p=18,92 v=8,76 +p=25,23 v=18,-38 +p=81,36 v=-46,-25 +p=50,21 v=23,5 +p=41,67 v=-52,-44 +p=3,50 v=22,41 +p=67,47 v=93,23 +p=88,79 v=89,10 +p=27,35 v=-19,62 +p=37,1 v=15,22 +p=90,0 v=29,39 +p=74,22 v=-33,-57 +p=13,95 v=74,-15 +p=9,8 v=84,10 +p=78,87 v=52,18 +p=67,3 v=73,84 +p=30,97 v=76,60 +p=17,68 v=-65,7 +p=72,51 v=7,28 +p=85,69 v=-51,81 +p=18,98 v=95,-27 +p=62,48 v=-52,82 +p=37,5 v=-16,-69 +p=27,19 v=90,91 +p=95,76 v=-97,85 +p=55,89 v=-33,-33 +p=49,89 v=-39,-19 +p=79,76 v=-62,-8 +p=29,77 v=-24,97 +p=82,53 v=-51,86 +p=94,45 v=76,-99 +p=91,39 v=-35,-86 +p=10,51 v=-97,8 +p=10,45 v=52,-10 +p=100,17 v=17,22 +p=71,50 v=-50,-21 +p=10,66 v=-4,98 +p=53,13 v=-78,51 +p=0,92 v=-5,83 +p=70,59 v=-67,-5 +p=34,29 v=54,-86 +p=99,84 v=-71,-80 +p=37,21 v=72,-86 +p=98,16 v=69,57 +p=81,64 v=37,-10 +p=92,22 v=-74,-40 +p=27,78 v=51,-18 +p=99,63 v=-74,40 +p=35,36 v=40,10 +p=58,35 v=57,62 +p=57,33 v=-34,-53 +p=94,72 v=-12,56 +p=3,24 v=-49,-25 +p=53,87 v=-96,-22 +p=26,82 v=-37,48 +p=56,31 v=75,25 +p=72,99 v=1,82 +p=70,60 v=-92,15 +p=46,47 v=41,-99 +p=8,31 v=74,-66 +p=97,71 v=-74,-84 +p=8,91 v=4,-93 +p=62,20 v=42,17 +p=17,83 v=-9,-19 +p=18,82 v=-58,-63 +p=24,4 v=82,2 +p=42,59 v=-21,40 +p=94,86 v=-46,80 +p=58,62 v=5,-52 +p=77,6 v=73,30 +p=35,46 v=-78,-66 +p=44,59 v=7,-22 |