commit 8fd936789f1ddafde5db2929d62ec2faa87e834a Author: Brandon Scott Date: Sat Dec 22 12:50:18 2018 -0600 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..70c389a --- /dev/null +++ b/.gitignore @@ -0,0 +1,885 @@ + +# Created by https://www.gitignore.io/api/jetbrains,intellij+iml,eclipse,visualstudio,sublimetext,windows,macos,emacs,vim,linux,c,c++,cmake,python,csharp,java + +### Vim ### +# swap +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +# session +Session.vim +# temporary +.netrwhist +*~ +# auto-generated tag files +tags + + +### JetBrains ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + + +# User-specific stuff: +.idea/workspace.xml +.idea/tasks.xml + +# Sensitive or high-churn files: +.idea/dataSources/ +.idea/dataSources.ids +.idea/dataSources.xml +.idea/dataSources.local.xml +.idea/sqlDataSources.xml +.idea/dynamic.xml +.idea/uiDesigner.xml + +# Gradle: +.idea/gradle.xml +.idea/libraries +.gradle + +# Mongo Explorer plugin: +.idea/mongoSettings.xml + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +### JetBrains Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + + +### Eclipse ### + +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# Eclipse Core +.project + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates +*.vcxproj.filters + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/ + + +### SublimeText ### +# cache files for sublime text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# workspace files are user-specific +*.sublime-workspace + +# project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using SublimeText +# *.sublime-project + +# sftp configuration file +sftp-config.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + + +### Windows ### +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + + +### macOS ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon +# Thumbnails +._* +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### Emacs ### +# -*- mode: gitignore; -*- +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + + +### Intellij+iml ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff: + +# Sensitive or high-churn files: + +# Gradle: + +# Mongo Explorer plugin: + +## File-based project format: + +## Plugin-specific files: + +# IntelliJ + +# mpeltonen/sbt-idea plugin + +# JIRA plugin + +# Crashlytics plugin (for Android Studio and IntelliJ) + +### Intellij+iml Patch ### +# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 + +*.iml +modules.xml +.idea/misc.xml +*.ipr + + +### Linux ### + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + + +### C ### +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.elf + +# Linker output +*.map +*.exp + +# Precompiled Headers +*.gch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb + +# Kernel Module Compile Results +*.mod* +*.cmd +modules.order +Module.symvers +Mkfile.old +dkms.conf + + +### C++ ### +# Prerequisites + +# Compiled Object files +*.slo + +# Precompiled Headers + +# Compiled Dynamic libraries + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai + +# Executables + + +### CMake ### +CMakeCache.txt +CMakeFiles +CMakeScripts +Makefile +cmake_install.cmake +install_manifest.txt +CTestTestfile.cmake + + +### Python ### +# Byte-compiled / optimized / DLL files +*.py[cod] +*$py.class + +# C extensions + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# dotenv +.env + +# virtualenv +.venv/ +venv/ +ENV/ + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject + + +### Java ### +*.class + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files + +# User-specific files (MonoDevelop/Xamarin Studio) + +# Build results + +# Visual Studio 2015 cache/options directory +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results + +# NUNIT + +# Build Results of an ATL Project + +# .NET Core + + +# Chutzpah Test files + +# Visual C++ cache files + +# Visual Studio profiler + +# TFS 2012 Local Workspace + +# Guidance Automation Toolkit + +# ReSharper is a .NET coding add-in + +# JustCode is a .NET coding add-in + +# TeamCity is a build add-in + +# DotCover is a Code Coverage Tool + +# Visual Studio code coverage results + +# NCrunch + +# MightyMoose + +# Web workbench (sass) + +# Installshield output folder + +# DocProject is a documentation generator add-in + +# Click-Once directory + +# Publish Web Output +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted + +# NuGet Packages +# The packages folder can be ignored because of Package Restore +# except build/, which is used as an MSBuild target. +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files + +# Microsoft Azure Build Output + +# Microsoft Azure Emulator + +# Windows Store app package directories and files + +# Visual Studio cache files +# files ending in .cache can be ignored +# but keep track of directories ending in .cache + +# Others + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) + +# SQL Server files + +# Business Intelligence projects + +# Microsoft Fakes + +# GhostDoc plugin setting file + +# Node.js Tools for Visual Studio + +# Visual Studio 6 build log + +# Visual Studio 6 workspace options file + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) + +# Visual Studio LightSwitch build output + +# Paket dependency manager + +# FAKE - F# Make + +# JetBrains Rider + +# CodeRush + +# Python Tools for Visual Studio (PTVS) + +# Cake - Uncomment if you are using it +# tools/ + +### VisualStudio Patch ### diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..58c2cd0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +Individual files may be licensed differently, as noted in those files. + +MIT License + +Copyright (c) 2017 individual contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..efbd861 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# Advent of Code 2017 + +## About + +These are my solutions to the Advent of Code 2017. + +## Author + +Brandon Scott + +## What is Advent of Code? + +[Advent of Code](https://adventofcode.com/) is an Advent calendar of small programming +puzzles for a variety of skill sets and skill levels that can be solved in any +programming language you like. People use them as a speed contest, interview prep, +company training, university coursework, practice problems, or to challenge +each other. + +## License + +By default, all code in this project is licensed under the MIT license, +copyright the individual contributor(s). Comments in individual files +may specify an alternate license as chosen by a particular individual +for their code. If not specified, the file is MIT. \ No newline at end of file diff --git a/csharp/BScottDay1.cs b/csharp/BScottDay1.cs new file mode 100644 index 0000000..8df7f0e --- /dev/null +++ b/csharp/BScottDay1.cs @@ -0,0 +1,48 @@ +using System; +using System.IO; + +namespace AOC2017 +{ + class BScottDay1 : BScottSolution + { + public override string Name => "Day 1: Inverse Captcha"; + + public override void Run() + { + string input = "1122"; + Console.WriteLine($"Example 1: {CalculateSumPart1(input)}"); + + input = "1111"; + Console.WriteLine($"Example 2: {CalculateSumPart1(input)}"); + + input = "1234"; + Console.WriteLine($"Example 3: {CalculateSumPart1(input)}"); + + input = "91212129"; + Console.WriteLine($"Example 4: {CalculateSumPart1(input)}"); + + input = File.ReadAllText("BScottDay1.txt"); + Console.WriteLine($"Part 1 Answer: {CalculateSumPart1(input)}"); + Console.WriteLine($"Part 2 Answer: {CalculateSumPart2(input)}"); + } + + static long CalculateSumPart1(string input) + { + long sum = 0; + for (int i = 0; i < input.Length; i++) + if (input[i] == input[(i + 1) % input.Length]) + sum += int.Parse(input[i].ToString()); + return sum; + } + + static long CalculateSumPart2(string input) + { + long sum = 0; + int step = input.Length / 2; + for (int i = 0; i < input.Length; i++) + if (input[i] == input[(i + step) % input.Length]) + sum += int.Parse(input[i].ToString()); + return sum; + } + } +} diff --git a/csharp/BScottDay1.txt b/csharp/BScottDay1.txt new file mode 100644 index 0000000..51f86e0 --- /dev/null +++ b/csharp/BScottDay1.txt @@ -0,0 +1 @@ +818275977931166178424892653779931342156567268946849597948944469863818248114327524824136924486891794739281668741616818614613222585132742386168687517939432911753846817997473555693821316918473474459788714917665794336753628836231159578734813485687247273288926216976992516314415836985611354682821892793983922755395577592859959966574329787693934242233159947846757279523939217844194346599494858459582798326799512571365294673978955928416955127211624234143497546729348687844317864243859238665326784414349618985832259224761857371389133635711819476969854584123589566163491796442167815899539788237118339218699137497532932492226948892362554937381497389469981346971998271644362944839883953967698665427314592438958181697639594631142991156327257413186621923369632466918836951277519421695264986942261781256412377711245825379412978876134267384793694756732246799739464721215446477972737883445615664755923441441781128933369585655925615257548499628878242122434979197969569971961379367756499884537433839217835728263798431874654317137955175565253555735968376115749641527957935691487965161211853476747758982854811367422656321836839326818976668191525884763294465366151349347633968321457954152621175837754723675485348339261288195865348545793575843874731785852718281311481217515834822185477982342271937155479432673815629144664144538221768992733498856934255518875381672342521819499939835919827166318715849161715775427981485233467222586764392783699273452228728667175488552924399518855743923659815483988899924199449721321589476864161778841352853573584489497263216627369841455165476954483715112127465311353411346132671561568444626828453687183385215975319858714144975174516356117245993696521941589168394574287785233685284294357548156487538175462176268162852746996633977948755296869616778577327951858348313582783675149343562362974553976147259225311183729415381527435926224781181987111454447371894645359797229493458443522549386769845742557644349554641538488252581267341635761715674381775778868374988451463624332123361576518411234438681171864923916896987836734129295354684962897616358722633724198278552339794629939574841672355699222747886785616814449297817352118452284785694551841431869545321438468118 \ No newline at end of file diff --git a/csharp/BScottDay10.cs b/csharp/BScottDay10.cs new file mode 100644 index 0000000..366d686 --- /dev/null +++ b/csharp/BScottDay10.cs @@ -0,0 +1,94 @@ +using System; +using System.IO; +using System.Text; + +namespace AOC2017 +{ + class BScottDay10 : BScottSolution + { + public override string Name => "Day 10: Knot Hash"; + + public override void Run() + { + string input = File.ReadAllText("BScottDay10.txt"); + Console.WriteLine($"Part 1 Answer: {KnotHashPart1(input)}"); + Console.WriteLine($"Part 2 Answer: {KnotHashPart2(input)}"); + + Console.WriteLine($"Part 2 Example Answer #1 (blank): {KnotHashPart2("")}"); + Console.WriteLine($"Part 2 Example Answer #2 (AoC 2017): {KnotHashPart2("AoC 2017")}"); + Console.WriteLine($"Part 2 Example Answer #3 (1,2,3): {KnotHashPart2("1,2,3")}"); + Console.WriteLine($"Part 2 Example Answer #4 (1,2,4): {KnotHashPart2("1,2,4")}"); + } + + private int KnotHashPart1(string input) + { + int[] lengths = Array.ConvertAll(input.Split(','), s => int.Parse(s)); + byte[] list = new byte[256]; + int pos = 0, skipSize = 0; + + // initialize list + for (int i = 0; i < list.Length; i++) + list[i] = (byte)i; + + for (int i = 0; i < lengths.Length; i++) + { + byte[] buff = new byte[lengths[i]]; + + for (int j = 0; j < buff.Length; j++) + buff[j] = list[(pos + j) % list.Length]; + + Array.Reverse(buff); + + for (int j = 0; j < buff.Length; j++) + list[(pos + j) % list.Length] = buff[j]; + + pos += (lengths[i] + skipSize) % list.Length; // wrap around + skipSize++; // increase skip size + } + + return list[0] * list[1]; + } + + private string KnotHashPart2(string input) + { + String suffix = Encoding.ASCII.GetString(new byte[] { 17, 31, 73, 47, 23 }); + byte[] lengths = Encoding.ASCII.GetBytes(input + suffix); //string of bytes and add a suffix + byte[] list = new byte[256]; + byte[] denseHash = new byte[16]; + int pos = 0, skipSize = 0; + + // initialize list + for (int i = 0; i < list.Length; i++) + list[i] = (byte)i; + + // 64 rounds of fun + for (int x = 0; x < 64; x++) + { + for (int i = 0; i < lengths.Length; i++) + { + byte[] buff = new byte[lengths[i]]; + + for (int j = 0; j < buff.Length; j++) + buff[j] = list[(pos + j) % list.Length]; + + Array.Reverse(buff); + + for (int j = 0; j < buff.Length; j++) + list[(pos + j) % list.Length] = buff[j]; + + pos += (lengths[i] + skipSize) % list.Length; // wrap around + skipSize++; // increase skip size + } + } + + // do the Xor magic + for (int i = 0; i < 16; i++) + { + for (int j = 0; j < 16; j++) + denseHash[i] ^= list[i * 16 + j]; + } + + return BitConverter.ToString(denseHash).Replace("-", "").ToLower(); + } + } +} diff --git a/csharp/BScottDay10.txt b/csharp/BScottDay10.txt new file mode 100644 index 0000000..57a8488 --- /dev/null +++ b/csharp/BScottDay10.txt @@ -0,0 +1 @@ +94,84,0,79,2,27,81,1,123,93,218,23,103,255,254,243 \ No newline at end of file diff --git a/csharp/BScottDay11.cs b/csharp/BScottDay11.cs new file mode 100644 index 0000000..bea4354 --- /dev/null +++ b/csharp/BScottDay11.cs @@ -0,0 +1,65 @@ +using System; +using System.IO; + +namespace AOC2017 +{ + class BScottDay11 : BScottSolution + { + public override string Name => "Day 11: Hex Ed"; + + public override void Run() + { + Console.WriteLine($"Part 1 Example Answer #1 (ne,ne,ne):\t\t{CalculateDistances("ne,ne,ne").Item1}"); + Console.WriteLine($"Part 1 Example Answer #2 (ne,ne,sw,sw):\t\t{CalculateDistances("ne,ne,sw,sw").Item1}"); + Console.WriteLine($"Part 1 Example Answer #3 (ne,ne,s,s):\t\t{CalculateDistances("ne,ne,s,s").Item1}"); + Console.WriteLine($"Part 1 Example Answer #4 (se,sw,se,sw,sw):\t{CalculateDistances("se,sw,se,sw,sw").Item1}"); + + string input = File.ReadAllText("BScottDay11.txt"); + Console.WriteLine($"Part 1 Answer:\t{CalculateDistances(input).Item1}"); + Console.WriteLine($"Part 2 Answer:\t{CalculateDistances(input).Item2}"); + } + + private static Tuple CalculateDistances(string input) + { + string[] commands = input.Split(','); + + int x = 0, y = 0, distance = 0, maxDistance = 0; + foreach (string cmd in commands) + { + switch (cmd) + { + case "n": + y--; + break; + case "s": + y++; + break; + + case "ne": + x++; + break; + case "sw": + x--; + break; + + case "se": + y++; + x++; + break; + + case "nw": + y--; + x--; + break; + } + + distance = Math.Max(Math.Abs(y), Math.Max(Math.Abs(x), Math.Abs((x - y) * -1))); + + if (distance > maxDistance) + maxDistance = distance; + } + + return Tuple.Create(distance,maxDistance); + } + } +} diff --git a/csharp/BScottDay11.txt b/csharp/BScottDay11.txt new file mode 100644 index 0000000..31e30fe --- /dev/null +++ b/csharp/BScottDay11.txt @@ -0,0 +1 @@ +sw,s,se,se,se,se,se,nw,ne,ne,ne,ne,ne,n,n,ne,n,n,n,n,n,sw,sw,n,ne,nw,n,n,nw,nw,n,nw,nw,nw,nw,nw,nw,nw,ne,sw,s,nw,sw,se,nw,sw,sw,nw,nw,nw,sw,sw,s,nw,nw,sw,sw,sw,sw,n,sw,sw,sw,sw,sw,sw,sw,sw,s,s,sw,sw,s,sw,s,sw,sw,sw,sw,ne,s,s,ne,sw,s,sw,s,s,n,ne,sw,s,sw,s,s,s,s,s,s,s,s,s,s,s,s,sw,s,s,n,s,s,s,se,se,s,s,sw,s,se,se,se,s,n,s,s,se,s,se,se,se,se,ne,s,n,sw,se,se,se,se,se,s,se,nw,nw,se,se,se,se,se,se,se,n,ne,se,s,se,se,se,ne,se,nw,se,se,s,ne,se,n,se,se,ne,sw,se,ne,se,se,se,nw,nw,ne,se,se,s,n,n,se,se,ne,se,ne,se,se,ne,se,se,ne,ne,ne,ne,ne,se,ne,se,nw,se,se,s,s,se,ne,ne,se,ne,ne,ne,ne,ne,ne,nw,ne,ne,ne,s,ne,n,ne,se,ne,n,ne,nw,n,ne,n,ne,ne,ne,ne,ne,n,nw,ne,ne,ne,ne,s,ne,ne,s,ne,ne,n,n,se,n,ne,n,ne,nw,ne,s,ne,n,ne,ne,ne,n,ne,s,s,ne,ne,ne,ne,ne,nw,ne,n,ne,ne,ne,n,ne,ne,n,ne,ne,n,n,ne,ne,ne,n,s,n,s,ne,ne,n,n,n,n,n,n,n,n,ne,n,n,sw,n,n,n,nw,n,ne,ne,sw,n,n,n,s,n,n,n,n,n,n,n,n,n,nw,se,n,s,s,n,n,n,ne,n,n,nw,n,n,nw,nw,n,n,nw,nw,n,nw,n,n,n,n,se,nw,n,nw,n,nw,nw,n,n,nw,nw,n,nw,n,n,nw,nw,n,nw,ne,n,n,n,n,nw,nw,nw,n,nw,n,nw,s,nw,n,n,n,n,nw,nw,n,n,nw,n,nw,nw,se,nw,ne,n,n,ne,n,nw,nw,n,n,n,nw,n,nw,n,n,nw,ne,nw,s,n,ne,n,nw,n,nw,nw,n,nw,n,n,nw,nw,nw,n,n,nw,nw,nw,nw,nw,n,nw,n,sw,n,n,nw,nw,nw,nw,s,nw,s,nw,nw,nw,n,nw,nw,nw,se,s,nw,nw,sw,nw,nw,n,se,ne,nw,nw,nw,sw,sw,ne,nw,nw,nw,nw,nw,nw,s,nw,nw,nw,nw,nw,sw,nw,nw,nw,s,nw,nw,se,nw,nw,nw,nw,sw,nw,ne,nw,nw,nw,nw,s,nw,nw,nw,nw,nw,n,nw,sw,sw,n,nw,nw,sw,nw,nw,sw,sw,se,nw,nw,nw,s,sw,nw,se,nw,sw,se,n,sw,sw,nw,sw,nw,nw,nw,nw,nw,ne,nw,nw,sw,nw,nw,nw,nw,sw,nw,sw,n,nw,nw,sw,nw,sw,sw,nw,sw,nw,nw,sw,sw,sw,sw,nw,ne,sw,nw,sw,sw,sw,sw,nw,sw,nw,sw,sw,sw,nw,sw,nw,nw,nw,sw,nw,sw,sw,sw,sw,sw,sw,nw,sw,n,sw,sw,sw,ne,sw,ne,sw,sw,nw,nw,sw,nw,sw,sw,sw,nw,sw,sw,s,sw,sw,ne,ne,s,sw,n,nw,sw,nw,ne,ne,se,sw,sw,sw,nw,nw,sw,nw,sw,n,sw,nw,s,sw,sw,sw,n,nw,sw,sw,ne,sw,sw,s,sw,se,s,sw,ne,s,sw,sw,sw,sw,sw,sw,sw,sw,sw,nw,n,n,sw,sw,ne,sw,sw,sw,n,sw,se,sw,sw,nw,n,sw,n,s,s,s,sw,sw,s,nw,sw,n,sw,sw,sw,sw,sw,sw,sw,sw,nw,sw,s,ne,n,sw,sw,sw,sw,sw,sw,sw,ne,sw,sw,s,sw,sw,s,sw,sw,sw,s,nw,s,sw,n,sw,sw,s,s,sw,s,sw,sw,ne,s,sw,s,sw,sw,n,n,s,sw,sw,sw,s,sw,s,s,sw,se,sw,sw,n,s,sw,sw,n,s,sw,sw,s,sw,sw,sw,s,sw,sw,se,sw,sw,sw,nw,s,sw,s,sw,sw,sw,s,sw,sw,n,s,s,s,s,ne,sw,sw,s,sw,s,s,sw,se,sw,nw,sw,sw,n,n,sw,n,s,s,se,s,sw,s,sw,s,s,ne,se,sw,s,se,sw,s,s,s,s,s,ne,se,sw,sw,sw,sw,nw,s,s,s,sw,s,s,se,sw,s,s,sw,n,sw,ne,n,s,sw,s,sw,s,s,s,s,sw,sw,se,sw,sw,s,s,s,s,sw,s,n,n,nw,nw,sw,se,s,sw,sw,sw,s,s,s,s,s,s,s,s,sw,se,s,n,n,s,s,s,s,s,s,ne,n,s,s,sw,s,s,s,s,s,sw,se,se,s,ne,sw,s,s,nw,s,sw,s,n,nw,sw,s,s,s,s,sw,s,s,sw,s,s,sw,s,s,s,s,s,s,sw,s,s,s,s,s,sw,s,s,n,s,s,ne,s,s,s,s,s,s,sw,n,s,s,s,ne,s,s,s,s,n,ne,s,s,s,s,s,s,n,sw,s,nw,s,s,s,se,s,s,s,n,s,s,sw,nw,nw,n,sw,s,s,s,s,s,s,s,s,se,s,se,n,s,se,s,nw,se,ne,s,s,s,s,s,se,s,s,nw,s,se,s,s,sw,se,s,se,s,s,n,s,s,s,s,s,s,s,se,se,se,nw,se,se,se,se,s,se,nw,s,s,s,s,ne,nw,se,s,s,n,s,s,se,ne,s,s,n,s,s,nw,se,n,nw,ne,ne,se,s,ne,se,se,s,s,ne,s,s,ne,s,s,se,n,se,se,s,s,n,se,s,se,s,se,nw,se,s,sw,s,ne,s,s,s,sw,se,s,s,se,s,s,se,se,s,se,sw,se,s,se,ne,s,sw,se,se,s,se,se,se,ne,s,n,s,n,se,ne,s,ne,s,n,s,ne,sw,ne,s,s,nw,s,sw,se,s,se,s,se,s,se,se,nw,s,se,se,n,sw,s,se,se,se,se,s,nw,n,se,s,s,s,s,s,se,se,s,se,se,se,nw,s,se,se,se,se,se,s,s,s,se,s,se,n,s,se,s,se,se,se,se,ne,s,s,se,s,s,se,s,se,s,se,nw,nw,s,se,se,s,ne,s,ne,se,nw,n,se,sw,se,s,n,se,se,s,s,se,se,se,se,s,se,ne,se,se,s,se,ne,sw,sw,nw,se,n,s,ne,se,se,se,s,se,sw,s,nw,se,se,se,se,se,nw,se,se,sw,se,se,se,sw,se,ne,se,se,ne,s,se,se,se,se,se,se,n,s,ne,se,s,s,se,se,se,se,se,se,se,se,se,se,se,se,se,se,se,se,se,s,ne,se,s,se,ne,se,se,se,s,ne,se,se,se,ne,n,s,se,se,se,se,se,se,se,s,se,se,s,se,se,ne,se,ne,ne,se,se,se,sw,se,se,ne,se,se,n,se,se,se,se,se,sw,se,se,se,nw,se,se,se,se,se,se,se,se,se,ne,se,se,se,se,se,se,se,se,se,se,se,n,se,ne,se,nw,se,ne,se,s,s,se,se,se,se,se,se,s,se,se,se,ne,se,se,nw,s,ne,se,s,ne,se,n,s,se,se,se,se,se,se,se,se,ne,se,se,se,se,se,se,se,n,ne,se,se,se,se,se,nw,se,ne,nw,se,se,se,ne,ne,se,se,nw,n,se,se,se,se,sw,se,nw,se,se,ne,se,se,se,se,sw,ne,se,n,se,se,se,se,n,se,se,se,ne,se,se,se,s,ne,se,se,sw,ne,se,se,se,ne,ne,n,n,s,se,ne,ne,sw,ne,n,se,ne,se,se,se,se,n,ne,sw,se,se,se,ne,se,n,nw,se,n,ne,ne,n,ne,ne,se,n,se,ne,s,se,ne,sw,se,s,se,ne,se,n,ne,ne,se,se,se,n,ne,sw,se,ne,sw,se,se,se,se,se,s,sw,ne,se,se,se,se,sw,se,se,se,se,sw,n,ne,n,se,se,s,ne,se,se,ne,ne,se,se,se,ne,se,ne,se,s,se,s,ne,se,n,n,se,se,nw,se,sw,se,n,s,se,se,sw,se,ne,ne,ne,s,se,se,ne,nw,se,ne,se,n,se,se,ne,ne,se,se,nw,se,ne,nw,ne,ne,ne,ne,ne,ne,ne,n,n,se,se,se,n,se,sw,se,n,se,ne,se,se,se,sw,se,ne,ne,ne,se,sw,se,se,n,se,se,ne,se,s,se,se,ne,ne,se,se,ne,se,se,ne,ne,ne,se,nw,se,se,se,ne,ne,se,se,s,nw,s,ne,se,se,se,se,ne,se,se,se,sw,ne,ne,ne,ne,ne,ne,ne,se,se,s,ne,s,se,se,nw,ne,sw,sw,ne,ne,se,ne,ne,se,se,ne,ne,ne,ne,sw,ne,ne,ne,ne,n,ne,ne,se,ne,sw,n,se,ne,ne,s,se,se,n,nw,se,ne,se,ne,ne,nw,ne,se,s,ne,ne,nw,se,ne,se,s,se,nw,ne,se,se,n,ne,se,ne,ne,se,se,sw,ne,se,ne,se,sw,se,n,ne,se,ne,se,ne,nw,ne,se,sw,ne,se,se,ne,sw,ne,ne,ne,ne,ne,ne,ne,n,ne,ne,n,ne,sw,ne,sw,ne,se,ne,ne,sw,ne,n,se,n,sw,ne,ne,s,ne,ne,ne,ne,ne,ne,ne,ne,ne,nw,se,ne,ne,ne,se,ne,s,n,ne,se,ne,ne,ne,ne,ne,ne,se,ne,ne,sw,ne,ne,se,n,ne,se,ne,ne,ne,nw,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,nw,ne,ne,ne,nw,ne,nw,sw,ne,sw,ne,se,s,ne,ne,ne,ne,ne,ne,se,ne,n,ne,ne,ne,ne,ne,sw,ne,ne,ne,ne,ne,sw,nw,se,se,ne,ne,sw,ne,n,ne,ne,ne,ne,s,ne,ne,ne,ne,ne,ne,ne,ne,s,nw,ne,n,ne,ne,ne,s,ne,nw,ne,ne,ne,ne,ne,ne,ne,ne,ne,sw,ne,ne,ne,ne,n,ne,ne,ne,nw,ne,ne,ne,ne,ne,se,ne,se,ne,ne,ne,ne,ne,ne,ne,n,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,nw,ne,n,n,ne,n,ne,s,ne,ne,ne,ne,ne,n,ne,ne,ne,se,ne,s,sw,ne,ne,ne,ne,ne,ne,ne,n,ne,ne,n,n,ne,ne,sw,n,ne,nw,n,s,n,ne,nw,nw,ne,se,nw,sw,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,se,ne,sw,n,ne,ne,n,ne,ne,ne,ne,ne,se,n,ne,s,ne,ne,ne,n,ne,ne,ne,ne,ne,s,ne,ne,nw,ne,ne,s,se,ne,ne,se,sw,s,ne,ne,ne,ne,ne,n,sw,nw,s,ne,n,ne,n,ne,ne,sw,ne,ne,ne,ne,se,n,ne,ne,ne,ne,ne,ne,ne,ne,sw,ne,n,n,s,nw,s,ne,n,n,ne,ne,sw,ne,ne,n,nw,n,nw,s,ne,se,ne,ne,n,ne,n,n,ne,ne,n,ne,sw,ne,n,n,s,ne,ne,n,nw,ne,n,ne,n,n,ne,n,ne,s,sw,n,ne,nw,n,ne,ne,ne,n,ne,nw,n,ne,ne,ne,n,ne,n,n,s,se,s,s,nw,ne,ne,ne,ne,ne,se,ne,se,ne,ne,s,n,n,ne,sw,n,ne,n,ne,ne,n,ne,ne,ne,n,ne,ne,ne,n,n,ne,n,ne,n,ne,ne,ne,n,sw,ne,n,ne,n,ne,n,ne,s,ne,n,nw,ne,ne,ne,n,ne,n,n,ne,sw,ne,ne,ne,ne,n,ne,n,s,ne,ne,n,ne,ne,n,ne,ne,n,ne,n,nw,s,ne,ne,n,n,ne,n,nw,n,s,ne,ne,n,se,n,s,n,ne,ne,ne,n,ne,ne,se,n,n,ne,ne,n,n,ne,ne,ne,ne,n,n,ne,n,n,n,s,se,n,n,n,n,ne,ne,ne,ne,ne,se,ne,n,n,s,ne,ne,n,ne,ne,s,se,ne,se,n,n,ne,ne,s,n,n,se,ne,s,ne,s,ne,sw,n,ne,n,n,s,ne,ne,ne,ne,ne,ne,n,n,ne,ne,n,ne,ne,se,s,n,ne,nw,n,ne,nw,n,ne,n,ne,n,n,ne,n,n,n,n,n,ne,n,n,ne,ne,n,n,se,sw,ne,ne,ne,nw,ne,n,sw,ne,s,ne,n,sw,ne,n,n,n,n,n,ne,ne,n,ne,ne,ne,n,n,ne,n,ne,n,ne,s,sw,n,n,ne,ne,ne,n,sw,s,ne,n,se,s,n,n,ne,n,se,n,ne,ne,sw,se,n,ne,n,ne,ne,n,n,n,ne,nw,ne,s,n,n,ne,ne,se,ne,se,nw,nw,nw,sw,n,ne,n,n,n,n,n,n,s,n,nw,n,ne,ne,n,ne,ne,n,ne,s,n,n,ne,sw,n,ne,n,n,n,ne,nw,n,ne,sw,n,n,n,ne,n,ne,n,ne,n,n,ne,n,n,s,n,ne,ne,se,ne,n,n,n,n,nw,n,n,n,n,n,s,n,n,n,n,n,n,ne,se,n,sw,n,n,n,n,ne,n,n,n,n,n,n,n,sw,n,ne,ne,s,n,n,ne,n,n,n,n,n,nw,n,sw,n,n,n,n,n,se,n,n,n,n,n,ne,n,n,n,s,n,n,ne,n,n,n,n,se,n,n,n,ne,n,n,n,n,n,n,n,ne,n,n,n,n,n,ne,s,n,se,n,n,n,n,ne,n,sw,n,n,nw,n,ne,n,se,n,ne,ne,n,n,ne,n,s,n,n,n,n,s,n,nw,n,n,n,nw,n,n,s,n,n,n,sw,n,n,n,ne,n,ne,n,s,n,n,n,n,ne,n,n,n,n,n,n,n,n,sw,n,n,n,s,n,s,nw,n,sw,n,se,se,nw,n,n,n,se,n,ne,n,n,ne,n,n,ne,n,ne,n,n,n,n,n,n,se,se,n,se,nw,s,n,n,sw,n,n,n,n,n,n,n,nw,n,nw,n,n,n,n,se,sw,n,n,n,n,n,n,s,n,n,s,n,n,n,n,n,n,n,se,n,n,n,n,n,se,n,n,n,n,ne,n,s,n,n,n,n,n,se,n,n,n,se,n,n,n,n,n,n,n,se,ne,n,n,n,n,n,n,n,n,nw,sw,n,se,n,se,n,se,nw,s,n,nw,sw,n,nw,se,n,nw,n,n,n,n,n,nw,ne,n,ne,n,n,n,n,n,sw,n,n,sw,nw,n,se,n,n,n,se,n,ne,ne,n,n,n,n,n,sw,n,n,n,n,nw,s,ne,n,sw,n,n,n,n,n,n,n,nw,n,n,nw,n,n,n,n,n,n,n,n,sw,ne,n,s,n,n,n,nw,n,nw,n,se,n,n,nw,n,n,n,n,nw,se,n,n,nw,ne,n,n,sw,sw,n,nw,n,se,n,n,se,n,n,n,n,ne,nw,nw,n,sw,nw,n,ne,ne,n,n,n,n,n,nw,n,n,n,n,nw,n,sw,sw,n,se,sw,n,nw,n,n,n,nw,nw,n,n,nw,n,nw,nw,nw,nw,n,n,n,n,n,nw,nw,nw,n,n,n,n,n,n,n,n,ne,nw,n,n,s,n,n,n,nw,nw,n,n,sw,n,n,n,n,n,n,n,n,se,ne,nw,n,nw,nw,s,s,nw,s,n,n,nw,nw,n,n,n,n,n,s,nw,n,ne,n,nw,s,n,nw,n,n,n,n,n,se,n,n,nw,n,n,nw,nw,n,n,nw,n,nw,n,nw,n,nw,nw,sw,n,nw,ne,n,n,n,n,n,n,n,sw,s,n,n,n,n,n,nw,nw,nw,nw,se,n,se,se,nw,nw,nw,nw,n,se,n,n,nw,nw,n,se,n,n,n,n,n,n,n,nw,nw,n,n,nw,s,ne,ne,n,n,n,n,s,nw,n,n,n,n,nw,sw,sw,nw,nw,nw,nw,nw,n,n,n,n,n,s,s,n,nw,n,n,n,n,n,nw,n,n,nw,nw,s,nw,n,n,nw,n,n,nw,nw,n,nw,n,nw,nw,sw,n,n,s,n,ne,n,s,n,n,n,n,nw,nw,n,n,n,n,n,nw,nw,n,nw,nw,n,nw,se,s,n,n,nw,sw,n,n,nw,nw,n,nw,n,s,nw,nw,nw,nw,ne,n,n,n,nw,n,n,s,nw,sw,sw,se,n,n,n,nw,se,nw,n,n,nw,nw,nw,n,nw,nw,ne,n,n,nw,n,n,nw,n,nw,n,ne,n,nw,se,sw,nw,nw,sw,n,n,n,n,n,n,n,n,n,n,n,n,nw,nw,se,n,nw,n,nw,nw,ne,ne,n,n,ne,nw,n,nw,nw,n,nw,n,n,nw,sw,nw,se,nw,sw,nw,nw,n,n,nw,n,nw,n,n,sw,sw,n,se,n,n,n,nw,n,n,nw,n,sw,se,sw,nw,n,sw,n,s,nw,nw,nw,n,n,nw,n,nw,nw,nw,nw,nw,nw,n,nw,nw,se,s,s,sw,n,nw,sw,nw,nw,n,n,n,nw,nw,nw,n,nw,nw,n,nw,nw,n,nw,nw,nw,nw,nw,nw,n,n,nw,nw,ne,s,nw,n,s,n,nw,nw,sw,nw,n,n,sw,nw,n,sw,ne,n,n,nw,se,sw,n,n,nw,n,ne,n,nw,se,s,s,n,nw,nw,n,nw,nw,n,n,n,n,sw,sw,nw,n,n,n,n,sw,s,se,n,nw,n,nw,nw,se,nw,n,ne,n,nw,n,ne,se,nw,nw,nw,n,sw,ne,n,n,nw,n,se,n,n,sw,nw,ne,n,nw,nw,nw,s,nw,nw,n,nw,ne,nw,nw,nw,n,se,nw,nw,n,nw,nw,nw,nw,n,nw,n,n,ne,n,sw,nw,n,n,nw,nw,nw,n,nw,s,n,nw,nw,nw,nw,se,n,n,nw,n,n,nw,s,ne,n,nw,n,s,se,nw,sw,nw,nw,nw,s,nw,nw,n,nw,n,se,s,nw,nw,nw,sw,n,nw,n,se,n,s,nw,nw,nw,n,nw,nw,n,n,sw,nw,nw,nw,n,nw,sw,nw,nw,s,se,nw,nw,nw,ne,s,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,n,n,nw,nw,nw,nw,nw,nw,n,nw,n,nw,nw,n,sw,nw,sw,nw,nw,n,n,n,nw,ne,nw,n,nw,nw,nw,n,nw,nw,nw,nw,nw,n,nw,n,nw,n,nw,n,nw,nw,nw,nw,nw,nw,nw,nw,ne,nw,nw,n,nw,sw,n,nw,nw,nw,nw,nw,nw,s,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,n,nw,nw,n,s,n,se,nw,nw,se,n,nw,ne,n,n,nw,nw,ne,nw,n,ne,nw,nw,n,n,ne,ne,sw,nw,nw,nw,n,sw,n,n,ne,nw,sw,nw,nw,nw,ne,se,sw,nw,ne,nw,nw,n,nw,nw,nw,nw,nw,ne,nw,n,s,nw,nw,nw,nw,nw,nw,ne,n,s,nw,n,nw,nw,s,n,nw,ne,s,nw,nw,nw,sw,nw,nw,nw,n,nw,nw,nw,n,n,nw,nw,nw,n,nw,n,sw,nw,nw,nw,nw,nw,n,n,nw,nw,nw,ne,s,nw,sw,nw,se,nw,nw,nw,n,nw,se,nw,ne,nw,nw,n,nw,se,nw,n,sw,sw,nw,se,nw,nw,nw,nw,n,nw,s,nw,n,nw,nw,se,nw,s,n,se,n,sw,nw,nw,nw,n,nw,ne,n,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,ne,nw,n,nw,nw,nw,s,sw,nw,nw,s,sw,nw,nw,nw,nw,nw,nw,nw,nw,n,se,nw,n,nw,nw,nw,nw,nw,nw,n,nw,nw,nw,nw,nw,sw,nw,se,nw,nw,nw,nw,nw,ne,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,s,nw,nw,nw,n,nw,nw,ne,nw,nw,nw,nw,nw,se,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,n,nw,se,nw,nw,n,s,s,nw,nw,n,nw,nw,nw,se,nw,nw,nw,ne,nw,se,nw,nw,nw,se,nw,nw,nw,s,se,n,nw,nw,nw,n,s,nw,nw,nw,nw,nw,n,nw,nw,ne,se,nw,nw,nw,nw,nw,nw,nw,nw,nw,ne,nw,ne,sw,sw,s,ne,nw,nw,nw,nw,n,nw,nw,se,nw,nw,nw,n,nw,nw,nw,nw,nw,nw,nw,s,sw,nw,nw,nw,nw,nw,n,nw,s,sw,nw,nw,nw,nw,nw,s,n,nw,nw,nw,nw,n,nw,nw,nw,nw,nw,sw,nw,sw,nw,se,sw,nw,ne,nw,sw,nw,ne,sw,nw,nw,nw,nw,nw,nw,sw,nw,nw,nw,sw,nw,sw,s,s,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,s,se,nw,nw,nw,nw,nw,n,ne,sw,nw,nw,nw,nw,nw,sw,nw,nw,ne,nw,nw,nw,nw,nw,nw,sw,nw,nw,nw,nw,sw,s,nw,nw,nw,ne,ne,nw,nw,nw,nw,nw,nw,sw,s,sw,se,nw,sw,ne,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,sw,sw,nw,nw,nw,nw,s,sw,sw,se,se,nw,nw,s,nw,nw,sw,n,sw,sw,nw,sw,nw,nw,nw,nw,n,nw,nw,ne,nw,n,nw,nw,nw,sw,nw,ne,s,sw,s,nw,nw,nw,n,sw,nw,nw,nw,nw,nw,se,nw,sw,nw,nw,se,nw,nw,ne,sw,nw,nw,sw,nw,nw,nw,nw,sw,nw,sw,s,nw,nw,nw,sw,nw,nw,nw,nw,nw,nw,ne,nw,n,nw,nw,nw,nw,nw,nw,nw,se,s,n,s,s,ne,nw,sw,nw,nw,sw,nw,nw,nw,nw,nw,nw,sw,nw,se,nw,nw,nw,nw,se,nw,n,nw,n,sw,nw,nw,sw,nw,nw,nw,nw,nw,nw,se,nw,nw,nw,nw,nw,ne,nw,nw,nw,sw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,sw,s,sw,nw,sw,nw,sw,nw,nw,nw,nw,nw,n,nw,nw,n,se,nw,sw,nw,nw,sw,se,s,nw,sw,sw,se,sw,nw,sw,sw,n,sw,nw,ne,nw,sw,nw,nw,sw,nw,sw,nw,nw,n,sw,sw,nw,nw,nw,sw,nw,sw,nw,n,nw,ne,nw,nw,nw,sw,s,nw,nw,se,n,nw,nw,nw,nw,sw,sw,ne,sw,nw,sw,nw,se,sw,nw,nw,nw,sw,n,sw,sw,sw,nw,ne,sw,sw,nw,nw,sw,se,nw,nw,se,nw,s,ne,sw,s,s,nw,nw,nw,nw,nw,nw,nw,n,nw,ne,sw,sw,sw,sw,s,sw,sw,nw,nw,nw,nw,nw,sw,ne,sw,nw,nw,ne,nw,sw,nw,nw,nw,sw,nw,nw,nw,nw,sw,nw,n,sw,nw,nw,nw,sw,s,sw,sw,nw,sw,n,nw,nw,nw,nw,nw,nw,nw,sw,nw,nw,sw,sw,nw,nw,nw,nw,s,sw,nw,s,n,nw,sw,sw,se,nw,nw,nw,nw,nw,nw,s,nw,nw,ne,nw,s,sw,sw,sw,nw,sw,sw,nw,nw,sw,se,sw,nw,nw,sw,sw,ne,nw,nw,nw,n,nw,sw,nw,nw,nw,nw,sw,sw,sw,nw,sw,sw,ne,nw,nw,nw,sw,nw,ne,sw,n,nw,nw,nw,nw,sw,nw,nw,sw,nw,nw,nw,sw,se,sw,nw,nw,nw,nw,nw,nw,sw,s,sw,sw,se,s,sw,ne,nw,ne,sw,sw,nw,nw,sw,sw,se,nw,n,nw,nw,nw,nw,sw,nw,ne,sw,n,sw,sw,sw,sw,se,se,sw,ne,sw,sw,nw,nw,sw,sw,sw,sw,nw,nw,nw,nw,sw,sw,nw,nw,sw,nw,nw,nw,nw,sw,sw,s,ne,sw,nw,sw,sw,sw,nw,n,nw,sw,nw,nw,nw,nw,sw,nw,sw,nw,nw,nw,se,sw,sw,sw,sw,s,ne,sw,sw,sw,sw,nw,sw,ne,ne,sw,nw,sw,nw,nw,se,sw,sw,nw,sw,nw,sw,n,sw,nw,nw,sw,sw,sw,sw,nw,sw,nw,sw,n,nw,s,sw,sw,sw,sw,sw,nw,se,s,sw,sw,sw,sw,sw,nw,sw,sw,nw,n,se,nw,sw,nw,nw,s,sw,nw,se,nw,sw,sw,s,s,nw,s,sw,nw,sw,nw,sw,sw,sw,sw,sw,nw,nw,nw,sw,sw,sw,n,s,se,sw,ne,s,sw,ne,sw,sw,nw,nw,sw,sw,sw,sw,sw,se,sw,nw,nw,se,sw,n,sw,s,nw,sw,sw,sw,nw,sw,se,ne,nw,sw,nw,sw,sw,sw,nw,sw,sw,sw,sw,nw,sw,sw,nw,nw,nw,n,sw,nw,nw,nw,s,nw,nw,nw,sw,s,se,sw,nw,sw,n,ne,se,nw,s,s,sw,se,s,sw,nw,sw,se,sw,sw,nw,nw,s,nw,n,nw,ne,nw,sw,sw,nw,sw,sw,n,nw,nw,s,ne,se,n,sw,n,nw,n,sw,ne,sw,nw,sw,sw,nw,ne,s,nw,nw,nw,nw,ne,sw,sw,se,nw,sw,sw,se,sw,nw,nw,sw,nw,sw,sw,nw,sw,sw,sw,sw,n,sw,nw,se,sw,s,ne,sw,sw,sw,sw,sw,se,sw,nw,ne,nw,sw,nw,ne,sw,se,sw,nw,nw,sw,nw,sw,ne,sw,ne,sw,nw,nw,nw,s,nw,n,sw,s,nw,nw,nw,nw,se,ne,sw,se,sw,sw,nw,sw,sw,nw,nw,ne,se,sw,nw,sw,se,nw,nw,nw,sw,s,sw,nw,sw,sw,nw,nw,sw,nw,nw,s,sw,sw,nw,sw,se,ne,sw,sw,se,s,nw,sw,sw,sw,nw,sw,nw,sw,sw,sw,nw,ne,nw,n,sw,se,n,sw,se,s,sw,nw,sw,sw,nw,s,sw,sw,nw,sw,sw,sw,ne,n,sw,s,ne,sw,sw,sw,sw,nw,sw,sw,sw,nw,sw,sw,sw,s,sw,sw,sw,nw,sw,sw,sw,sw,sw,nw,s,sw,nw,nw,n,sw,sw,sw,sw,nw,sw,sw,sw,sw,sw,sw,nw,nw,sw,nw,se,sw,nw,ne,nw,sw,nw,sw,sw,s,sw,nw,sw,sw,sw,nw,sw,sw,sw,nw,sw,nw,sw,ne,nw,ne,sw,nw,sw,sw,sw,nw,nw,nw,nw,sw,s,sw,nw,se,nw,sw,nw,sw,sw,sw,sw,sw,sw,sw,sw,nw,sw,s,nw,sw,sw,nw,nw,nw,sw,sw,sw,sw,sw,sw,ne,sw,se,sw,sw,nw,sw,ne,nw,sw,sw,nw,sw,n,s,nw,sw,sw,se,sw,n,nw,ne,nw,nw,sw,sw,sw,sw,sw,ne,ne,sw,sw,nw,nw,sw,nw,n,sw,sw,sw,nw,n,sw,n,sw,sw,s,nw,nw,ne,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,ne,nw,sw,s,sw,sw,s,nw,sw,sw,ne,nw,sw,sw,sw,nw,s,sw,sw,sw,sw,nw,sw,sw,sw,sw,nw,sw,sw,sw,sw,sw,sw,nw,sw,sw,nw,sw,sw,se,sw,sw,nw,sw,sw,se,se,sw,s,nw,sw,sw,nw,sw,se,sw,se,sw,s,sw,ne,nw,s,s,sw,sw,sw,sw,sw,sw,sw,nw,se,sw,s,sw,sw,sw,ne,sw,sw,nw,nw,nw,sw,nw,sw,s,sw,ne,sw,sw,sw,sw,nw,sw,sw,ne,nw,sw,nw,sw,sw,ne,sw,sw,sw,s,nw,sw,sw,nw,sw,sw,sw,sw,sw,ne,se,nw,sw,sw,s,n,ne,sw,sw,nw,sw,se,sw,sw,sw,sw,sw,ne,sw,sw,nw,sw,sw,sw,sw,sw,sw,sw,nw,sw,sw,sw,nw,sw,sw,sw,sw,nw,s,sw,se,sw,sw,sw,n,nw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,ne,sw,sw,sw,sw,sw,sw,sw,nw,nw,sw,sw,se,se,s,sw,ne,sw,sw,n,s,sw,sw,sw,sw,sw,sw,sw,sw,ne,se,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,n,nw,sw,ne,sw,nw,sw,sw,nw,sw,sw,sw,sw,n,sw,sw,sw,sw,nw,sw,sw,s,sw,sw,sw,sw,nw,sw,sw,sw,sw,sw,sw,sw,sw,nw,sw,sw,sw,sw,sw,sw,sw,s,sw,sw,sw,sw,se,sw,sw,sw,ne,sw,sw,sw,sw,se,sw,sw,s,se,sw,sw,sw,n,sw,sw,sw,sw,sw,sw,n,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,ne,sw,sw,sw,sw,ne,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,sw,s,sw,sw,nw,sw,sw,ne,n,sw,sw,sw,sw,sw,sw,n,sw,sw,sw,sw,sw,sw,sw,sw,nw,n,nw,n,sw,nw,ne,se,se,se,s,se,s,sw,s,nw,s,s,s,s,se,se,nw,sw,sw,sw,s,s,s,sw,sw,n,se,sw,s,sw,sw,sw,sw,sw,sw,nw,sw,sw,nw,sw,nw,s,sw,s,nw,s,nw,nw,nw,s,nw,nw,nw,nw,nw,nw,n,ne,nw,sw,nw,n,sw,nw,nw,n,n,nw,n,nw,n,n,nw,n,sw,n,sw,n,ne,n,n,n,n,n,sw,n,n,n,se,n,se,n,n,ne,n,ne,se,n,ne,n,n,n,n,n,nw,s,ne,ne,n,ne,se,ne,ne,ne,ne,s,ne,n,ne,ne,se,s,ne,ne,se,ne,ne,n,n,ne,sw,s,n,ne,ne,ne,ne,ne,ne,ne,ne,ne,n,ne,ne,ne,ne,ne,sw,se,nw,se,s,ne,se,ne,se,ne,ne,ne,se,sw,ne,ne,ne,s,nw,ne,se,ne,se,ne,s,se,ne,se,se,ne,se,se,se,ne,nw,ne,se,ne,sw,se,se,ne,se,nw,se,se,se,ne,se,se,se,n,ne,ne,se,se,se,ne,se,se,se,nw,se,se,se,se,se,se,se,se,se,se,se,sw,se,se,sw,se,s,se,se,se,se,se,se,se,se,ne,se,se,se,se,nw,s,s,ne,se,se,se,sw,s,nw,s,se,s,s,s,se,s,nw,se,sw,sw,s,se,se,s,se,se,nw,se,s,se,s,se,s,s,s,s,se,se,s,s,s,s,se,se,se,sw,s,s,s,ne,ne,s,sw,sw,s,s,s,s,nw,s,nw,se,ne,s,se,s,ne,s,s,s,s,s,s,s,sw,s,s,sw,s,se,se,s,s,s,s,s,nw,s,se,s,s,sw,s,s,s,s,s,s,s,sw,s,s,s,s,s,s,s,s,se,s,nw,s,sw,s,s,sw,s,s,se,s,s,sw,s,s,sw,sw,sw,sw,s,sw,n,n,sw,ne,sw,sw,s,sw,ne,s,sw,nw,nw,s,s,sw,sw,sw,s,s,sw,s,sw,sw,sw,s,se,nw,s,s,sw,s,sw,sw,s,nw,sw,s,s,sw,sw,sw,sw,s,s,sw,sw,ne,sw,sw,s,se,sw,n,sw,se,sw,sw,s,sw,sw,sw,se,sw,sw,sw,sw,sw,s,n,s,n,sw,sw,sw,sw,nw,sw,sw,nw,sw,s,sw,sw,nw,ne,sw,sw,sw,sw,sw,sw,se,n,sw,sw,sw,nw,sw,sw,sw,sw,nw,sw,s,sw,sw,sw,sw,sw,sw,sw,se,n,nw,sw,ne,nw,ne,sw,sw,nw,nw,nw,sw,sw,sw,sw,sw,sw,sw,nw,sw,sw,n,nw,sw,sw,nw,sw,sw,sw,se,nw,s,sw,nw,s,n,nw,sw,sw,s,sw,sw,ne,sw,sw,nw,sw,n,sw,se,sw,nw,nw,nw,sw,nw,sw,sw,sw,ne,sw,nw,sw,n,nw,nw,sw,sw,sw,nw,nw,se,nw,nw,sw,se,sw,sw,nw,sw,sw,sw,nw,sw,nw,nw,sw,sw,sw,sw,sw,nw,nw,se,sw,ne,nw,sw,sw,sw,nw,n,sw,nw,sw,nw,ne,nw,nw,s,nw,nw,nw,sw,s,sw,sw,sw,nw,nw,n,nw,nw,nw,nw,nw,sw,sw,nw,n,nw,sw,sw,sw,se,sw,sw,nw,ne,nw,nw,n,nw,nw,nw,nw,nw,sw,nw,nw,nw,ne,nw,ne,nw,nw,sw,sw,nw,nw,nw,nw,nw,sw,nw,nw,nw,nw,nw,ne,nw,nw,nw,nw,nw,sw,sw,nw,se,se,sw,nw,nw,nw,nw,s,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,sw,nw,ne,nw,nw,ne,nw,sw,nw,nw,nw,nw,nw,nw,ne,nw,nw,nw,nw,nw,sw,nw,nw,nw,nw,nw,nw,nw,nw,nw,nw,sw,nw,nw,nw,sw,n,nw,nw,n,nw,se,se,s,nw,nw,n,ne,nw,ne,nw,nw,n,nw,sw,nw,s,s,nw,nw,n,nw,nw,se,nw,n,n,nw,ne,n,nw,nw,n,n,n,sw,n,nw,nw,nw,nw,sw,n,se,nw,s,sw,n,nw,nw,n,nw,nw,nw,n,n,nw,ne,n,s,se,n,s,n,nw,n,se,ne,nw,sw,n,se,nw,nw,s,se,n,n,ne,sw,s,n,nw,nw,nw,sw,nw,n,nw,nw,s,nw,n,n,n,n,n,n,n,n,nw,n,s,nw,n,nw,n,n,nw,se,s,nw,n,ne,sw,nw,sw,nw,nw,nw,nw,n,n,nw,n,n,n,nw,n,n,s,n,sw,n,sw,ne,n,n,n,nw,nw,n,nw,n,nw,nw,n,nw,n,s,n,n,s,n,nw,sw,nw,sw,nw,n,se,nw,s,nw,s,n,se,n,nw,n,n,n,n,n,n,ne,n,ne,n,n,n,n,nw,nw,s,n,n,ne,n,ne,n,n,n,n,n,n,sw,nw,n,n,n,n,nw,n,n,nw,n,n,n,n,se,n,n,n,n,n,n,nw,n,n,n,ne,n,n,n,n,n,s,n,n,sw,n,n,n,se,n,n,se,n,sw,n,n,se,n,n,s,se,nw,n,n,n,n,n,n,n,n,n,n,ne,n,n,n,n,n,se,ne,n,n,n,n,n,n,n,n,ne,n,n,n,n,n,n,n,s,n,s,se,n,n,n,n,ne,ne,n,n,s,n,n,n,n,n,n,nw,n,n,ne,n,n,n,ne,n,n,sw,se,n,n,n,ne,s,n,ne,n,n,n,n,n,s,n,se,n,se,s,n,n,n,n,ne,n,n,n,n,sw,se,n,n,nw,sw,nw,ne,n,n,se,n,n,n,se,n,n,n,ne,n,n,sw,nw,n,n,ne,n,ne,ne,n,n,n,ne,n,n,n,sw,n,sw,se,n,n,ne,s,n,ne,ne,n,n,n,se,sw,n,n,ne,s,ne,ne,ne,ne,ne,n,n,n,n,n,n,nw,ne,n,n,n,ne,ne,ne,sw,n,n,n,n,n,n,ne,ne,n,n,n,n,n,n,ne,s,ne,ne,ne,n,ne,n,n,ne,ne,se,ne,n,nw,ne,ne,s,ne,ne,n,ne,n,n,ne,n,ne,n,n,ne,ne,ne,se,n,ne,ne,nw,ne,n,ne,ne,n,ne,n,ne,ne,n,se,n,n,ne,n,n,ne,ne,n,ne,n,ne,ne,nw,n,ne,ne,ne,n,ne,ne,ne,s,nw,ne,ne,n,ne,n,ne,n,ne,ne,ne,sw,s,n,ne,ne,ne,n,sw,ne,nw,se,nw,ne,ne,n,ne,n,ne,ne,ne,ne,ne,ne,sw,ne,ne,se,ne,n,ne,ne,n,n,ne,ne,ne,ne,ne,ne,n,ne,ne,n,ne,ne,ne,se,sw,sw,nw,ne,ne,n,ne,nw,ne,ne,ne,ne,ne,ne,se,nw,ne,ne,ne,ne,n,ne,ne,n,ne,ne,ne,n,sw,ne,ne,s,n,ne,nw,ne,n,ne,s,ne,ne,ne,ne,ne,ne,n,sw,ne,sw,sw,se,ne,n,ne,s,ne,ne,s,n,ne,ne,ne,ne,ne,n,ne,ne,ne,ne,ne,sw,ne,ne,ne,ne,ne,ne,sw,n,ne,ne,ne,se,n,ne,nw,ne,nw,se,ne,s,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,s,ne,ne,s,ne,ne,ne,se,ne,ne,nw,ne,sw,n,ne,ne,se,ne,sw,se,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,nw,ne,ne,ne,sw,ne,ne,ne,ne,ne,ne,ne,ne,s,ne,se,ne,ne,se,ne,ne,s,ne,ne,ne,ne,ne,ne,se,ne,ne,ne,sw,ne,ne,se,se,ne,ne,se,ne,se,nw,ne,ne,ne,ne,ne,se,ne,ne,ne,se,ne,ne,ne,ne,se,se,ne,se,ne,s,n,s,ne,ne,ne,ne,ne,ne,ne,ne,ne,ne,se,se,s,ne,n,se,ne,ne,ne,se,n,n,ne,se,nw,n,ne,ne,s,nw,ne,ne,se,ne,s,se,ne,se,ne,ne,ne,ne,ne,sw,n,ne,ne,ne,ne,ne,ne,ne,se,ne,ne,ne,s,ne,ne,ne,ne,se,se,se,ne,se,se,ne,ne,se,ne,ne,se,se,ne,ne,se,ne,s,ne,n,ne,ne,se,se,ne,n,ne,nw,se,ne,se,se,n,ne,s,se,ne,se,ne,se,se,se,se,se,se,sw,se,se,se,ne,sw,ne,ne,ne,ne,ne,nw,ne,se,s,se,ne,se,se,se,ne,sw,ne,se,ne,se,nw,se,ne,n,se,se,sw,ne,ne,se,sw,ne,se,se,se,se,ne,ne,ne,se,se,ne,se,ne,se,ne,se,se,se,se,n,n,se,se,ne,ne,se,se,se,se,ne,ne,s,s,ne,se,se,se,ne,sw,se,ne,se,sw,ne,ne,se,se,nw,se,ne,nw,ne,se,se,ne,se,se,ne,ne,se,se,sw,se,se,n,se,se,ne,se,ne,se,se,se,ne,se,n,se,se,ne,se,ne,ne,se,ne,se,se,se,se,s,se,sw,se,se,se,ne,se,ne,se,ne,ne,se,s,ne,ne,se,se,se,se,s,se,se,ne,se,ne,se,se,se,ne,se,s,ne,se,se,ne,se,ne,se,se,ne,se,se,n,se,s,ne,ne,se,se,ne,s,se,se,nw,n,ne,ne,se,ne,sw,ne,s,s,sw,sw,ne,se,se,n,nw,se,n,se,n,ne,se,ne,se,se,nw,ne,se,se,ne,nw,se,se,ne,se,sw,ne,ne,se,se,se,se,se,se,s,se,ne,se,se,se,nw,se,se,n,se,se,ne,sw,se,se,se,se,se,ne,se,nw,nw,ne,se,se,se,se,ne,s,se,se,sw,se,se,se,se,n,n,se,se,n,se,se,se,se,n,se,se,se,n,se,ne,se,ne,nw,se,n,se,ne,se,se,se,se,se,se,se,se,nw,se,se,se,n,se,se,se,se,ne,se,se,se,se,se,se,n,nw,ne,ne,se,se,ne,sw,se,sw,se,se,se,ne,se,n,n,nw,se,se,sw,n,se,s,s,se,se,se,se,se,se,nw,se,sw,ne,se,s,se,se,se,se,se,ne,se,s,se,n,se,se,se,se,se,se,ne,se,sw,se,sw,se,se,se,se,se,se,se,ne,s,se,se,n,n,se,se,se,se,se,se,se,se,se,se,nw,s,se,se,nw,se,n,se,nw,se,s,sw,se,se,se,nw,se,sw,se,se,s,ne,se,se,se,se,se,sw,se,se,se,se,se,se,se,se,ne,ne,se,nw,s,se,se,se,s,se,se,se,se,se,se,se,se,se,se,nw,s,n,se,se,se,se,nw,se,se,se,se,se,se,se,ne,se,se,se,se,s,se,se,se,sw,nw,se,se,se,n,se,ne,se,se,se,se,se,se,se,sw,n,se,se,se,se,se,se,se,se,se,se,se,se,ne,se,se,se,se,se,se,se,se,ne,se,se,se,se,se,se,se,s,ne,ne,ne,se,ne,s,se,se,se,s,se,s,se,s,se,se,se,se,se,s,se,s,nw,se,se,se,sw,ne,s,se,ne,se,se,se,s,se,se,s,s,se,s,se,se,sw,n,se,ne,s,s,se,s,se,se,nw,se,s,se,n,ne,se,se,se,se,s,se,se,s,s,s,se,se,sw,s,se,se,s,n,se,n,se,se,ne,s,ne,se,se,s,se,se,ne,s,sw,sw,s,se,s,se,nw,se,ne,se,se,se,n,se,s,nw,se,n,se,s,se,se,se,s,s,se,se,se,s,se,se,se,s,se,se,s,se,s,se,se,se,se,se,se,se,s,se,s,se,s,se,n,s,se,se,se,se,s,se,se,se,se,nw,s,n,s,se,s,se,s,se,s,se,se,se,s,se,s,s,s,se,s,se,se,se,ne,se,se,nw,se,s,se,se,se,s,s,s,se,se,s,sw,ne,se,s,s,se,se,s,se,se,s,se,nw,s,s,se,se,nw,s,se,s,se,se,se,s,se,se,nw,se,n,se,se,se,se,ne,se,se,n,se,s,s,s,s,se,se,s,s,s,s,se,n,se,s,s,se,se,s,sw,se,s,ne,n,s,se,sw,se,se,n,sw,se,ne,se,s,se,s,se,se,se,nw,ne,se,se,se,se,s,s,se,se,s,se,se,s,s,ne,nw,s,s,nw,sw,sw,s,se,sw,nw,se,se,s,se,sw,s,s,ne,se,s,s,se,se,s,se,se,sw,se,se,s,se,s,se,s,s,s,s,nw,s,s,s,se,se,s,se,se,s,s,se,se,s,s,se,s,s,s,n,s,se,se,s,n,sw,s,se,se,s,se,s,s,s,s,se,se,s,s,sw,s,se,s,sw,s,s,s,s,se,n,s,se,se,s,se,s,se,s,s,s,s,se,se,se,ne,s,s,s,s,se,s,s,s,ne,s,s,nw,s,s,s,se,se,se,s,s,s,s,s,s,s,s,se,nw,se,se,s,s,se,s,s,se,se,s,s,s,se,s,s,se,s,se,s,se,s,s,s,se,s,s,n,se,s,s,ne,s,s,s,se,s,s,s,s,n,s,se,n,sw,se,se,s,s,s,s,se,s,s,s,s,s,se,se,se,s,s,s,s,ne,ne,s,s,se,s,s,se,s,se,s,se,sw,s,s,se,s,s,se,nw,s,s,s,s,s,s,se,se,s,s,ne,s,s,s,s,s,se,s,ne,s,s,s,s,s,s,s,se,s,s,se,s,s,s,sw,nw,s,se,n,se,s,s,s,ne,ne,s,s,s,s,s,se,s,s,s,s,s,s,n,s,s,s,s,s,ne,s,n,s,se,s,s,s,se,s,s,s,sw,s,se,s,nw,s,se,se,s,sw,s,s,s,se,s,s,s,sw,nw,s,se,se,s,s,s,s,n,nw,sw,s,s,nw,sw,s,n,se,sw,se,s,ne,s,s,ne,s,s,s,s,s,s,se,s,s,sw,s,se,s,s,nw,s,s,s,s,s,s,sw,s,s,s,s,s,s,s,s,s,s,s,s \ No newline at end of file diff --git a/csharp/BScottDay12.cs b/csharp/BScottDay12.cs new file mode 100644 index 0000000..ad84022 --- /dev/null +++ b/csharp/BScottDay12.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.RegularExpressions; + +namespace AOC2017 +{ + class BScottDay12 : BScottSolution + { + public override string Name => "Day 12: Digital Plumber"; + + public override void Run() + { + string[] exampleInput = new[] { + "0 <-> 2", + "1 <-> 1", + "2 <-> 0, 3, 4", + "3 <-> 2, 4", + "4 <-> 2, 3, 6", + "5 <-> 6", + "6 <-> 4, 5" + }; + + Console.WriteLine($"Part 1 Example Answer: {DigitalPlumberPart1(exampleInput)}"); + Console.WriteLine($"Part 2 Example Answer: {DigitalPlumberPart2(exampleInput)}"); + + string[] input = File.ReadAllLines("BScottDay12.txt"); + + Console.WriteLine($"Part 1 Answer: {DigitalPlumberPart1(input)}"); + Console.WriteLine($"Part 2 Answer: {DigitalPlumberPart2(input)}"); + } + + private int DigitalPlumberPart1(string[] input) + { + Dictionary programDictionary = ParseInput(input); + List connected = new List(); + GetConnectedPrograms(programDictionary, connected, 0, 0); + return connected.Count; + } + + private int DigitalPlumberPart2(string[] input) + { + Dictionary programDictionary = ParseInput(input); + List connected = new List(); + int groups = 0; + foreach (var programId in programDictionary.Keys) + { + if (!connected.Contains(programId)) + { + GetConnectedPrograms(programDictionary, connected, programId, 0); + groups++; + } + } + return groups; + } + + private void GetConnectedPrograms(Dictionary programDictionary, List connected, int start, int level) + { + // stack overflow protection + if (level > 100) + return; + + foreach (var programId in programDictionary[start]) + { + if (!connected.Contains(programId)) + { + connected.Add(programId); + GetConnectedPrograms(programDictionary, connected, programId, ++level); + } + } + } + + private Dictionary ParseInput(string[] input) + { + Dictionary programDictionary = new Dictionary(); + Regex regex = new Regex(@"([\d]+) <-> (?:([\d]+)*(?:, )?)*"); + + for (int i = 0; i < input.Length; i++) + { + Match match = regex.Match(input[i]); + if (match.Success) + { + List programList = new List(); + + foreach (Capture capture in match.Groups[2].Captures) + programList.Add(int.Parse(capture.Value)); + + programDictionary.Add(int.Parse(match.Groups[1].Value), programList.ToArray()); + } + } + + return programDictionary; + } + } +} diff --git a/csharp/BScottDay12.txt b/csharp/BScottDay12.txt new file mode 100644 index 0000000..1340739 --- /dev/null +++ b/csharp/BScottDay12.txt @@ -0,0 +1,2000 @@ +0 <-> 480, 1750 +1 <-> 52, 393, 635, 800, 840 +2 <-> 575, 1950 +3 <-> 1188, 1527 +4 <-> 177, 897, 898 +5 <-> 1214 +6 <-> 686 +7 <-> 346, 1443 +8 <-> 432 +9 <-> 449 +10 <-> 10, 678 +11 <-> 1883 +12 <-> 1760 +13 <-> 80, 486, 533 +14 <-> 483 +15 <-> 1360 +16 <-> 1812 +17 <-> 150, 854, 1727 +18 <-> 556, 1743, 1952 +19 <-> 195 +20 <-> 1146, 1249 +21 <-> 31, 624, 1362, 1927 +22 <-> 1355, 1895 +23 <-> 471, 1624 +24 <-> 493, 1424 +25 <-> 309 +26 <-> 1381 +27 <-> 595 +28 <-> 760, 1049, 1229 +29 <-> 686, 1969 +30 <-> 1498 +31 <-> 21, 301, 1293 +32 <-> 839, 1466 +33 <-> 33, 130, 140 +34 <-> 1169 +35 <-> 579, 1785 +36 <-> 1872 +37 <-> 280 +38 <-> 433, 1903 +39 <-> 718 +40 <-> 1541 +41 <-> 599 +42 <-> 1469 +43 <-> 175, 205 +44 <-> 148, 783 +45 <-> 1752 +46 <-> 1245, 1331 +47 <-> 47, 58 +48 <-> 242, 611 +49 <-> 1418 +50 <-> 129, 446 +51 <-> 253 +52 <-> 1, 104 +53 <-> 830, 1178 +54 <-> 673, 1376 +55 <-> 202 +56 <-> 56, 567, 1447 +57 <-> 1486, 1579, 1610 +58 <-> 47 +59 <-> 1473 +60 <-> 633 +61 <-> 1780 +62 <-> 62 +63 <-> 155, 206, 405, 598, 639 +64 <-> 1016, 1533 +65 <-> 1781 +66 <-> 78, 1082, 1446, 1948 +67 <-> 1044, 1540 +68 <-> 198, 927, 1288 +69 <-> 69 +70 <-> 1127 +71 <-> 531, 1029 +72 <-> 747 +73 <-> 620, 1517, 1563 +74 <-> 942, 1234 +75 <-> 351, 506, 1449 +76 <-> 1952, 1998 +77 <-> 338 +78 <-> 66 +79 <-> 616, 1466 +80 <-> 13, 652, 1955 +81 <-> 1899 +82 <-> 376, 909, 1112 +83 <-> 220, 345, 838, 905, 1153 +84 <-> 84 +85 <-> 635, 694, 1653 +86 <-> 208, 997 +87 <-> 87 +88 <-> 301 +89 <-> 919, 1769, 1805 +90 <-> 90, 992, 1720 +91 <-> 786, 928 +92 <-> 361 +93 <-> 440, 939 +94 <-> 131, 1703 +95 <-> 1539 +96 <-> 1752 +97 <-> 687 +98 <-> 822, 906 +99 <-> 1564 +100 <-> 597, 1817 +101 <-> 162 +102 <-> 138, 288, 542, 1816 +103 <-> 512, 1946 +104 <-> 52 +105 <-> 802, 1511, 1527 +106 <-> 766, 828 +107 <-> 253 +108 <-> 582, 1397, 1670, 1734 +109 <-> 109 +110 <-> 420, 1957 +111 <-> 319 +112 <-> 633 +113 <-> 1056 +114 <-> 1042, 1730 +115 <-> 884 +116 <-> 1428 +117 <-> 1256 +118 <-> 1177 +119 <-> 1015 +120 <-> 685, 769 +121 <-> 254, 553, 1198 +122 <-> 424, 1093 +123 <-> 915 +124 <-> 637, 690, 1117 +125 <-> 1295, 1567 +126 <-> 1168 +127 <-> 1467, 1634 +128 <-> 1858 +129 <-> 50, 1950 +130 <-> 33, 1521 +131 <-> 94 +132 <-> 483 +133 <-> 1069, 1355 +134 <-> 384, 610, 652 +135 <-> 1633 +136 <-> 1954 +137 <-> 237, 377, 1720 +138 <-> 102, 266, 406 +139 <-> 411 +140 <-> 33 +141 <-> 523, 1279, 1732 +142 <-> 1963 +143 <-> 1117 +144 <-> 520, 1051, 1142 +145 <-> 1018 +146 <-> 708, 1544 +147 <-> 154, 442, 971, 1661, 1848 +148 <-> 44, 1506, 1776 +149 <-> 245, 1052, 1506 +150 <-> 17, 150, 1565 +151 <-> 151, 308 +152 <-> 700, 1843 +153 <-> 1996 +154 <-> 147, 240 +155 <-> 63, 990 +156 <-> 1386, 1854 +157 <-> 1117 +158 <-> 687 +159 <-> 1845 +160 <-> 1477 +161 <-> 161 +162 <-> 101, 244, 464 +163 <-> 1547 +164 <-> 632, 1008, 1244, 1339 +165 <-> 1332, 1373, 1533 +166 <-> 697, 1002, 1871 +167 <-> 547, 1004, 1498 +168 <-> 559 +169 <-> 408 +170 <-> 170 +171 <-> 398, 1878 +172 <-> 1022, 1444 +173 <-> 1437, 1515 +174 <-> 383 +175 <-> 43, 1374 +176 <-> 634, 689, 1313, 1401 +177 <-> 4 +178 <-> 695, 870 +179 <-> 179, 687 +180 <-> 627, 720, 1071 +181 <-> 1859 +182 <-> 251, 387 +183 <-> 241, 1441 +184 <-> 1183, 1774, 1945 +185 <-> 185, 436 +186 <-> 186, 323, 1495 +187 <-> 187 +188 <-> 964 +189 <-> 441, 808, 1673, 1803 +190 <-> 190, 911, 1076 +191 <-> 191, 1394 +192 <-> 192 +193 <-> 193 +194 <-> 599, 1656, 1694 +195 <-> 19, 295 +196 <-> 1362, 1560 +197 <-> 322 +198 <-> 68 +199 <-> 861 +200 <-> 978, 1536, 1620 +201 <-> 1190, 1315 +202 <-> 55, 584, 1539 +203 <-> 492, 820, 1444 +204 <-> 1821 +205 <-> 43, 1367 +206 <-> 63, 352 +207 <-> 681 +208 <-> 86, 1089 +209 <-> 1045 +210 <-> 1672, 1783 +211 <-> 682, 1136 +212 <-> 354, 1003, 1403 +213 <-> 543 +214 <-> 994, 1922 +215 <-> 564 +216 <-> 541, 811, 1797 +217 <-> 1398 +218 <-> 542 +219 <-> 278, 1527 +220 <-> 83 +221 <-> 917 +222 <-> 515, 870, 1812 +223 <-> 1130, 1203, 1891 +224 <-> 224 +225 <-> 300 +226 <-> 424, 1223 +227 <-> 793, 1431 +228 <-> 1571 +229 <-> 1946 +230 <-> 256, 318, 1081 +231 <-> 231 +232 <-> 1294, 1303 +233 <-> 671 +234 <-> 234, 380, 1902 +235 <-> 416, 492 +236 <-> 545, 1113 +237 <-> 137, 318, 581, 1126, 1561, 1612 +238 <-> 906 +239 <-> 272, 1135, 1782 +240 <-> 154, 240 +241 <-> 183 +242 <-> 48, 679 +243 <-> 396, 1841 +244 <-> 162 +245 <-> 149, 901, 1688 +246 <-> 741 +247 <-> 406, 1111, 1343 +248 <-> 584 +249 <-> 1551 +250 <-> 889 +251 <-> 182, 1230, 1980 +252 <-> 781 +253 <-> 51, 107, 325, 1156 +254 <-> 121 +255 <-> 989, 1200, 1228, 1832 +256 <-> 230 +257 <-> 758 +258 <-> 665 +259 <-> 470, 1090, 1645, 1874 +260 <-> 964 +261 <-> 1649, 1822, 1887, 1956 +262 <-> 650 +263 <-> 765 +264 <-> 264, 391, 1216 +265 <-> 329, 1347 +266 <-> 138, 474, 1092 +267 <-> 1462 +268 <-> 268, 873, 1129 +269 <-> 410, 866, 1863 +270 <-> 1985 +271 <-> 558, 1891 +272 <-> 239 +273 <-> 658, 1598 +274 <-> 412, 1135 +275 <-> 1478, 1941 +276 <-> 276, 1418 +277 <-> 347, 1714 +278 <-> 219 +279 <-> 677, 1198 +280 <-> 37, 1399, 1555 +281 <-> 281, 1194 +282 <-> 637, 1158 +283 <-> 815 +284 <-> 555, 1554 +285 <-> 1727 +286 <-> 927 +287 <-> 1352 +288 <-> 102 +289 <-> 1984 +290 <-> 344, 1298 +291 <-> 1187, 1442 +292 <-> 305, 812 +293 <-> 1673 +294 <-> 331, 1243, 1423 +295 <-> 195, 295, 1513, 1821 +296 <-> 1078 +297 <-> 1002, 1420 +298 <-> 566, 1259 +299 <-> 299, 1722 +300 <-> 225, 1062 +301 <-> 31, 88, 779, 1337 +302 <-> 917 +303 <-> 1367 +304 <-> 1038, 1773 +305 <-> 292, 1554, 1808 +306 <-> 1065, 1471 +307 <-> 1246, 1614, 1702 +308 <-> 151, 443, 1205 +309 <-> 25, 1522 +310 <-> 729, 1977 +311 <-> 1011 +312 <-> 559, 718, 1471 +313 <-> 1047, 1441 +314 <-> 480, 1676 +315 <-> 316, 1943 +316 <-> 315, 555, 753 +317 <-> 398, 428, 534, 1959 +318 <-> 230, 237 +319 <-> 111, 591 +320 <-> 394 +321 <-> 1832, 1866 +322 <-> 197, 1768 +323 <-> 186 +324 <-> 1156, 1208, 1575 +325 <-> 253 +326 <-> 1584, 1845 +327 <-> 1077 +328 <-> 1009 +329 <-> 265, 329, 1070, 1128 +330 <-> 1892 +331 <-> 294 +332 <-> 1616, 1786, 1962 +333 <-> 1667 +334 <-> 1135 +335 <-> 548 +336 <-> 969, 1855, 1868 +337 <-> 610 +338 <-> 77, 1044 +339 <-> 809, 1114 +340 <-> 1841 +341 <-> 578 +342 <-> 1099 +343 <-> 1410 +344 <-> 290, 379, 991 +345 <-> 83, 1317, 1588 +346 <-> 7, 547 +347 <-> 277, 1478 +348 <-> 348, 802 +349 <-> 1286, 1504 +350 <-> 767, 1073 +351 <-> 75, 731, 1163, 1526, 1558 +352 <-> 206, 1733 +353 <-> 731 +354 <-> 212 +355 <-> 404 +356 <-> 1666 +357 <-> 1116 +358 <-> 1552, 1739 +359 <-> 360 +360 <-> 359, 1564, 1876 +361 <-> 92, 949, 1741 +362 <-> 441, 730, 1053 +363 <-> 1469 +364 <-> 1936 +365 <-> 1250, 1529 +366 <-> 366, 413, 1520 +367 <-> 407, 1338, 1681, 1692 +368 <-> 1312 +369 <-> 1572, 1628, 1811 +370 <-> 430 +371 <-> 1886 +372 <-> 1416 +373 <-> 1943 +374 <-> 569 +375 <-> 556 +376 <-> 82, 834 +377 <-> 137, 1779 +378 <-> 1177, 1478 +379 <-> 344, 728, 801, 1141 +380 <-> 234 +381 <-> 940 +382 <-> 611, 996 +383 <-> 174, 515, 596, 1903 +384 <-> 134 +385 <-> 1408, 1471 +386 <-> 1061, 1867 +387 <-> 182 +388 <-> 1123 +389 <-> 397, 1068 +390 <-> 1503 +391 <-> 264, 1138, 1921 +392 <-> 1996 +393 <-> 1 +394 <-> 320, 665, 1106 +395 <-> 395 +396 <-> 243, 831 +397 <-> 389, 1193 +398 <-> 171, 317 +399 <-> 399 +400 <-> 740, 1448 +401 <-> 659, 963, 1929 +402 <-> 1396 +403 <-> 1082, 1793 +404 <-> 355, 404, 613, 1901 +405 <-> 63, 716, 1602 +406 <-> 138, 247 +407 <-> 367, 1186, 1996 +408 <-> 169, 472, 1551 +409 <-> 1078, 1216 +410 <-> 269, 1328 +411 <-> 139, 1758 +412 <-> 274 +413 <-> 366, 986, 1171, 1836 +414 <-> 783 +415 <-> 947 +416 <-> 235, 1976 +417 <-> 473, 774 +418 <-> 1010, 1082 +419 <-> 612 +420 <-> 110 +421 <-> 1747, 1804 +422 <-> 422, 1987 +423 <-> 423 +424 <-> 122, 226, 1119 +425 <-> 707, 1378 +426 <-> 1199, 1325 +427 <-> 1415 +428 <-> 317, 702, 930 +429 <-> 485, 700, 1601 +430 <-> 370, 627 +431 <-> 1297, 1622 +432 <-> 8, 705, 736, 1649 +433 <-> 38 +434 <-> 607, 1787 +435 <-> 1803 +436 <-> 185 +437 <-> 437, 1634 +438 <-> 716, 1152 +439 <-> 1098, 1798, 1991 +440 <-> 93, 440 +441 <-> 189, 362, 449 +442 <-> 147 +443 <-> 308, 1505 +444 <-> 444 +445 <-> 445, 1001, 1165, 1591 +446 <-> 50, 457, 712, 1683 +447 <-> 1822 +448 <-> 1525 +449 <-> 9, 441, 668 +450 <-> 782 +451 <-> 745, 868, 1296, 1453 +452 <-> 1295 +453 <-> 465, 997 +454 <-> 663 +455 <-> 839, 1197 +456 <-> 1802, 1949 +457 <-> 446, 577, 605, 1101 +458 <-> 691, 1466, 1635, 1643 +459 <-> 1484 +460 <-> 1672, 1953 +461 <-> 577, 989, 1393, 1799 +462 <-> 462 +463 <-> 552, 1474 +464 <-> 162, 669 +465 <-> 453 +466 <-> 1213, 1345 +467 <-> 706, 941 +468 <-> 1254, 1478 +469 <-> 1658 +470 <-> 259, 1464, 1624, 1797 +471 <-> 23 +472 <-> 408, 1549 +473 <-> 417, 676 +474 <-> 266, 1340, 1543 +475 <-> 1699, 1717 +476 <-> 1048, 1741 +477 <-> 1741 +478 <-> 1627 +479 <-> 1494 +480 <-> 0, 314 +481 <-> 1206 +482 <-> 987 +483 <-> 14, 132, 1844, 1881, 1961 +484 <-> 1320 +485 <-> 429, 1544 +486 <-> 13, 1097 +487 <-> 1130 +488 <-> 1606 +489 <-> 1544 +490 <-> 1752 +491 <-> 545, 641 +492 <-> 203, 235, 1518, 1538, 1633 +493 <-> 24, 1029 +494 <-> 834, 962 +495 <-> 495 +496 <-> 1069 +497 <-> 571, 638, 993, 1067 +498 <-> 1220 +499 <-> 521, 1919 +500 <-> 1650, 1768 +501 <-> 843, 1932 +502 <-> 1318, 1751 +503 <-> 976 +504 <-> 1151 +505 <-> 594, 1282, 1433 +506 <-> 75 +507 <-> 1932 +508 <-> 932, 934, 1439, 1938 +509 <-> 509 +510 <-> 1284 +511 <-> 1324 +512 <-> 103, 813, 1011 +513 <-> 1120 +514 <-> 742 +515 <-> 222, 383 +516 <-> 1976 +517 <-> 776, 790, 821, 1242 +518 <-> 647, 1549 +519 <-> 671, 1457 +520 <-> 144 +521 <-> 499, 1207 +522 <-> 1634 +523 <-> 141, 1310 +524 <-> 1604 +525 <-> 1933 +526 <-> 592, 1671, 1712 +527 <-> 527 +528 <-> 1167, 1171, 1309 +529 <-> 529, 1137 +530 <-> 980 +531 <-> 71 +532 <-> 750 +533 <-> 13 +534 <-> 317, 1440 +535 <-> 685, 922, 1034, 1427 +536 <-> 1784 +537 <-> 1677 +538 <-> 1635 +539 <-> 1575 +540 <-> 1243 +541 <-> 216, 617, 1095, 1834 +542 <-> 102, 218 +543 <-> 213, 1346, 1501 +544 <-> 1648 +545 <-> 236, 491 +546 <-> 994, 1800 +547 <-> 167, 346, 1724 +548 <-> 335, 693 +549 <-> 1707 +550 <-> 1526 +551 <-> 1159 +552 <-> 463, 1658 +553 <-> 121, 1103 +554 <-> 1641, 1891 +555 <-> 284, 316 +556 <-> 18, 375 +557 <-> 1081 +558 <-> 271, 1033 +559 <-> 168, 312, 1014, 1660 +560 <-> 1536 +561 <-> 1681 +562 <-> 973, 1136 +563 <-> 1114 +564 <-> 215, 1429 +565 <-> 565, 1960 +566 <-> 298, 636, 959, 1135, 1136 +567 <-> 56, 709 +568 <-> 1772 +569 <-> 374, 569, 763 +570 <-> 604, 1862 +571 <-> 497 +572 <-> 1896 +573 <-> 573, 997, 1640, 1711 +574 <-> 1806 +575 <-> 2 +576 <-> 1953 +577 <-> 457, 461, 1499, 1771 +578 <-> 341, 981, 1344, 1701 +579 <-> 35, 735, 765 +580 <-> 580, 1116 +581 <-> 237 +582 <-> 108 +583 <-> 1227, 1762 +584 <-> 202, 248, 795, 1523, 1537, 1845 +585 <-> 1389, 1943 +586 <-> 586, 867 +587 <-> 587, 1145, 1574, 1651 +588 <-> 744 +589 <-> 593, 799 +590 <-> 1160 +591 <-> 319, 863, 1260 +592 <-> 526, 1622 +593 <-> 589, 1267 +594 <-> 505 +595 <-> 27, 595 +596 <-> 383, 1951 +597 <-> 100 +598 <-> 63 +599 <-> 41, 194 +600 <-> 1397 +601 <-> 722, 1115 +602 <-> 974 +603 <-> 1348 +604 <-> 570, 604, 1342 +605 <-> 457, 630, 1479, 1767 +606 <-> 606 +607 <-> 434 +608 <-> 863, 1421 +609 <-> 1505, 1524 +610 <-> 134, 337, 1380 +611 <-> 48, 382 +612 <-> 419, 763 +613 <-> 404, 729 +614 <-> 1211, 1496, 1654 +615 <-> 1152 +616 <-> 79 +617 <-> 541, 960 +618 <-> 1224, 1889 +619 <-> 837, 1094 +620 <-> 73 +621 <-> 717 +622 <-> 716, 1570 +623 <-> 770 +624 <-> 21, 1564 +625 <-> 750, 807, 1042, 1715 +626 <-> 1164, 1307, 1700, 1933 +627 <-> 180, 430, 666 +628 <-> 1194, 1463 +629 <-> 875 +630 <-> 605 +631 <-> 846, 1731 +632 <-> 164, 1454, 1579 +633 <-> 60, 112, 1940 +634 <-> 176 +635 <-> 1, 85, 1948 +636 <-> 566, 1057 +637 <-> 124, 282 +638 <-> 497, 727 +639 <-> 63 +640 <-> 843, 884, 1603 +641 <-> 491, 641 +642 <-> 875 +643 <-> 1719 +644 <-> 1214 +645 <-> 1608 +646 <-> 1043, 1477 +647 <-> 518 +648 <-> 998 +649 <-> 649 +650 <-> 262, 650 +651 <-> 1340 +652 <-> 80, 134 +653 <-> 1020, 1600 +654 <-> 1080, 1182 +655 <-> 1499 +656 <-> 656, 968 +657 <-> 1608 +658 <-> 273, 1245, 1698 +659 <-> 401, 1049, 1774 +660 <-> 660, 1877 +661 <-> 1374 +662 <-> 1808, 1910, 1949 +663 <-> 454, 663, 721, 1823 +664 <-> 664 +665 <-> 258, 394, 1820 +666 <-> 627, 1334, 1765 +667 <-> 1158 +668 <-> 449, 1073, 1336 +669 <-> 464, 1362, 1716 +670 <-> 670 +671 <-> 233, 519, 1806 +672 <-> 928, 1397, 1923 +673 <-> 54, 673, 1239, 1626 +674 <-> 996, 1846 +675 <-> 1452, 1531 +676 <-> 473, 1080, 1195 +677 <-> 279 +678 <-> 10 +679 <-> 242 +680 <-> 770, 1082 +681 <-> 207, 1768 +682 <-> 211, 1780 +683 <-> 1366, 1969 +684 <-> 1500 +685 <-> 120, 535 +686 <-> 6, 29, 1480 +687 <-> 97, 158, 179 +688 <-> 797 +689 <-> 176, 902, 1656, 1735 +690 <-> 124 +691 <-> 458, 1685 +692 <-> 977 +693 <-> 548, 693, 999 +694 <-> 85 +695 <-> 178, 1161, 1173 +696 <-> 1691 +697 <-> 166 +698 <-> 698 +699 <-> 1632 +700 <-> 152, 429, 1380, 1583 +701 <-> 1393 +702 <-> 428, 1072, 1123 +703 <-> 703 +704 <-> 1504 +705 <-> 432, 1553 +706 <-> 467 +707 <-> 425, 950 +708 <-> 146 +709 <-> 567 +710 <-> 710 +711 <-> 1536 +712 <-> 446 +713 <-> 1118 +714 <-> 1031, 1087 +715 <-> 843 +716 <-> 405, 438, 622, 809, 879 +717 <-> 621, 1564, 1753 +718 <-> 39, 312, 1628 +719 <-> 852, 1592 +720 <-> 180 +721 <-> 663 +722 <-> 601, 824 +723 <-> 723 +724 <-> 1053 +725 <-> 1752, 1898 +726 <-> 998, 1841 +727 <-> 638 +728 <-> 379 +729 <-> 310, 613, 1127 +730 <-> 362 +731 <-> 351, 353, 1614, 1619 +732 <-> 1258, 1911 +733 <-> 1883 +734 <-> 987 +735 <-> 579, 1758 +736 <-> 432 +737 <-> 760 +738 <-> 1125 +739 <-> 1492 +740 <-> 400, 1794 +741 <-> 246, 1202 +742 <-> 514, 1607 +743 <-> 743, 948 +744 <-> 588, 753 +745 <-> 451 +746 <-> 963, 1370, 1611, 1815, 1941 +747 <-> 72, 1453 +748 <-> 748, 1017 +749 <-> 1160, 1661 +750 <-> 532, 625 +751 <-> 751, 1395 +752 <-> 1788 +753 <-> 316, 744 +754 <-> 1329 +755 <-> 1005, 1468, 1943 +756 <-> 1227, 1247 +757 <-> 1687 +758 <-> 257, 1292, 1893 +759 <-> 759, 1629 +760 <-> 28, 737, 949 +761 <-> 1543 +762 <-> 840, 1216 +763 <-> 569, 612, 1302, 1490 +764 <-> 817, 1606 +765 <-> 263, 579, 1731 +766 <-> 106 +767 <-> 350 +768 <-> 1261, 1569 +769 <-> 120, 1119, 1663, 1812 +770 <-> 623, 680 +771 <-> 1752 +772 <-> 1242 +773 <-> 1421, 1548 +774 <-> 417, 1841 +775 <-> 1801, 1880 +776 <-> 517, 1221 +777 <-> 1596, 1923 +778 <-> 778 +779 <-> 301 +780 <-> 993 +781 <-> 252, 781 +782 <-> 450, 782, 1745 +783 <-> 44, 414, 833, 1088 +784 <-> 1914 +785 <-> 799 +786 <-> 91 +787 <-> 972, 1744, 1830 +788 <-> 788 +789 <-> 1246 +790 <-> 517, 790, 1256 +791 <-> 838 +792 <-> 1360, 1393 +793 <-> 227, 793 +794 <-> 1601 +795 <-> 584, 1337 +796 <-> 1537, 1549 +797 <-> 688, 1221 +798 <-> 1412 +799 <-> 589, 785, 799, 1763 +800 <-> 1 +801 <-> 379 +802 <-> 105, 348 +803 <-> 1638, 1901 +804 <-> 1356 +805 <-> 1424 +806 <-> 906, 983 +807 <-> 625 +808 <-> 189 +809 <-> 339, 716 +810 <-> 1775, 1938 +811 <-> 216 +812 <-> 292 +813 <-> 512 +814 <-> 1194 +815 <-> 283, 1439 +816 <-> 982, 1049 +817 <-> 764, 860, 913 +818 <-> 1027, 1394, 1396 +819 <-> 1045, 1992 +820 <-> 203 +821 <-> 517, 865 +822 <-> 98 +823 <-> 920 +824 <-> 722, 1409, 1530 +825 <-> 1036 +826 <-> 1794 +827 <-> 842 +828 <-> 106, 881, 1327 +829 <-> 829 +830 <-> 53 +831 <-> 396, 885 +832 <-> 1130, 1582 +833 <-> 783 +834 <-> 376, 494, 1236 +835 <-> 1241 +836 <-> 911, 1596 +837 <-> 619, 1099 +838 <-> 83, 791, 1334 +839 <-> 32, 455, 1963 +840 <-> 1, 762, 918 +841 <-> 841 +842 <-> 827, 1000 +843 <-> 501, 640, 715, 1174 +844 <-> 1448 +845 <-> 1376, 1635, 1769 +846 <-> 631, 1893, 1981 +847 <-> 1508 +848 <-> 1007 +849 <-> 849, 886 +850 <-> 1430 +851 <-> 860 +852 <-> 719, 897, 1272 +853 <-> 1374 +854 <-> 17, 956, 1536 +855 <-> 1774 +856 <-> 1378 +857 <-> 1171 +858 <-> 958, 1180, 1718 +859 <-> 1585 +860 <-> 817, 851 +861 <-> 199, 1184, 1509 +862 <-> 965, 1095, 1786 +863 <-> 591, 608, 961, 1108 +864 <-> 864 +865 <-> 821 +866 <-> 269, 1973 +867 <-> 586 +868 <-> 451, 905, 1710 +869 <-> 997, 1508 +870 <-> 178, 222, 1358 +871 <-> 973 +872 <-> 1724 +873 <-> 268, 1169, 1613 +874 <-> 1360 +875 <-> 629, 642, 1077 +876 <-> 915, 1149, 1512 +877 <-> 949 +878 <-> 1070 +879 <-> 716, 1573 +880 <-> 1371, 1552 +881 <-> 828, 1483, 1883 +882 <-> 1121, 1257 +883 <-> 976, 1500 +884 <-> 115, 640 +885 <-> 831, 1012 +886 <-> 849 +887 <-> 1292 +888 <-> 1728, 1947 +889 <-> 250, 984, 1840 +890 <-> 1864 +891 <-> 1612 +892 <-> 1492 +893 <-> 928 +894 <-> 1534, 1920 +895 <-> 1751, 1928, 1989 +896 <-> 1363, 1914 +897 <-> 4, 852, 897 +898 <-> 4, 1926 +899 <-> 1668, 1840 +900 <-> 1239 +901 <-> 245 +902 <-> 689, 1426, 1971 +903 <-> 903, 1817 +904 <-> 1721, 1755 +905 <-> 83, 868 +906 <-> 98, 238, 806, 1528, 1931 +907 <-> 1671, 1833 +908 <-> 1736 +909 <-> 82, 1689 +910 <-> 988, 1023 +911 <-> 190, 836 +912 <-> 1694 +913 <-> 817 +914 <-> 915 +915 <-> 123, 876, 914, 1562 +916 <-> 920, 997, 1278 +917 <-> 221, 302, 1739 +918 <-> 840 +919 <-> 89 +920 <-> 823, 916 +921 <-> 1198, 1266, 1282, 1678 +922 <-> 535 +923 <-> 923 +924 <-> 1464, 1636 +925 <-> 1002, 1419 +926 <-> 1697 +927 <-> 68, 286, 1010 +928 <-> 91, 672, 893, 1997 +929 <-> 1311, 1475, 1954 +930 <-> 428 +931 <-> 1271 +932 <-> 508 +933 <-> 1330, 1681 +934 <-> 508 +935 <-> 1103, 1982 +936 <-> 1088, 1773 +937 <-> 1130, 1324 +938 <-> 1104, 1118, 1590 +939 <-> 93, 1726 +940 <-> 381, 1621, 1865 +941 <-> 467, 941 +942 <-> 74, 1519, 1764, 1930 +943 <-> 1465, 1545 +944 <-> 1353 +945 <-> 1665 +946 <-> 1727 +947 <-> 415, 1118 +948 <-> 743 +949 <-> 361, 760, 877, 1122 +950 <-> 707, 1782 +951 <-> 1438 +952 <-> 952, 1180 +953 <-> 1685 +954 <-> 954 +955 <-> 955, 1287, 1541 +956 <-> 854 +957 <-> 957 +958 <-> 858 +959 <-> 566, 1429 +960 <-> 617 +961 <-> 863 +962 <-> 494 +963 <-> 401, 746, 1132 +964 <-> 188, 260, 1064, 1424 +965 <-> 862 +966 <-> 1742 +967 <-> 1692, 1713 +968 <-> 656 +969 <-> 336, 1770 +970 <-> 1523 +971 <-> 147 +972 <-> 787 +973 <-> 562, 871 +974 <-> 602, 1026, 1754 +975 <-> 985 +976 <-> 503, 883, 1636 +977 <-> 692, 1298 +978 <-> 200 +979 <-> 1068, 1306 +980 <-> 530, 1894 +981 <-> 578, 1043, 1385 +982 <-> 816, 1057 +983 <-> 806, 1085, 1375, 1430 +984 <-> 889, 1517 +985 <-> 975, 1762 +986 <-> 413 +987 <-> 482, 734, 987 +988 <-> 910, 988 +989 <-> 255, 461, 1422, 1768 +990 <-> 155, 1589 +991 <-> 344, 1365 +992 <-> 90 +993 <-> 497, 780, 1688, 1888 +994 <-> 214, 546 +995 <-> 1246, 1268 +996 <-> 382, 674 +997 <-> 86, 453, 573, 869, 916 +998 <-> 648, 726 +999 <-> 693, 1172 +1000 <-> 842, 1086, 1828 +1001 <-> 445 +1002 <-> 166, 297, 925, 1002 +1003 <-> 212, 1458 +1004 <-> 167, 1610 +1005 <-> 755 +1006 <-> 1613 +1007 <-> 848, 1007 +1008 <-> 164, 1225, 1316 +1009 <-> 328, 1009 +1010 <-> 418, 927, 1657 +1011 <-> 311, 512, 1287, 1476 +1012 <-> 885 +1013 <-> 1264, 1473, 1678 +1014 <-> 559 +1015 <-> 119, 1502 +1016 <-> 64, 1349 +1017 <-> 748 +1018 <-> 145, 1018 +1019 <-> 1791 +1020 <-> 653, 1663 +1021 <-> 1854 +1022 <-> 172 +1023 <-> 910 +1024 <-> 1151, 1913 +1025 <-> 1359 +1026 <-> 974, 1857 +1027 <-> 818, 1351, 1760 +1028 <-> 1677 +1029 <-> 71, 493 +1030 <-> 1030, 1175 +1031 <-> 714 +1032 <-> 1318 +1033 <-> 558, 1861 +1034 <-> 535 +1035 <-> 1035, 1958 +1036 <-> 825, 1310, 1742 +1037 <-> 1862 +1038 <-> 304, 1199 +1039 <-> 1168, 1480 +1040 <-> 1639, 1861, 1886 +1041 <-> 1041, 1050 +1042 <-> 114, 625 +1043 <-> 646, 981, 1219 +1044 <-> 67, 338, 1634 +1045 <-> 209, 819 +1046 <-> 1148, 1154, 1459 +1047 <-> 313, 1921 +1048 <-> 476 +1049 <-> 28, 659, 816, 1356, 1427, 1795, 1934 +1050 <-> 1041 +1051 <-> 144 +1052 <-> 149, 1052, 1383, 1423, 1621 +1053 <-> 362, 724 +1054 <-> 1054 +1055 <-> 1491, 1784 +1056 <-> 113, 1567 +1057 <-> 636, 982 +1058 <-> 1096, 1257, 1617, 1729 +1059 <-> 1059, 1130 +1060 <-> 1343, 1647, 1892 +1061 <-> 386 +1062 <-> 300, 1062, 1829 +1063 <-> 1063, 1571 +1064 <-> 964, 1846 +1065 <-> 306 +1066 <-> 1323, 1785 +1067 <-> 497 +1068 <-> 389, 979, 1330 +1069 <-> 133, 496 +1070 <-> 329, 878 +1071 <-> 180 +1072 <-> 702 +1073 <-> 350, 668 +1074 <-> 1188 +1075 <-> 1534 +1076 <-> 190, 1158 +1077 <-> 327, 875, 1444 +1078 <-> 296, 409 +1079 <-> 1450 +1080 <-> 654, 676 +1081 <-> 230, 557, 1896 +1082 <-> 66, 403, 418, 680 +1083 <-> 1134 +1084 <-> 1807, 1860 +1085 <-> 983, 1555 +1086 <-> 1000, 1992 +1087 <-> 714, 1216, 1728, 1895 +1088 <-> 783, 936 +1089 <-> 208 +1090 <-> 259 +1091 <-> 1213 +1092 <-> 266 +1093 <-> 122 +1094 <-> 619, 1814 +1095 <-> 541, 862, 1830 +1096 <-> 1058, 1145 +1097 <-> 486, 1894 +1098 <-> 439, 1133 +1099 <-> 342, 837 +1100 <-> 1559, 1931 +1101 <-> 457 +1102 <-> 1570 +1103 <-> 553, 935 +1104 <-> 938, 1897 +1105 <-> 1425 +1106 <-> 394 +1107 <-> 1304, 1566 +1108 <-> 863 +1109 <-> 1423 +1110 <-> 1149, 1217 +1111 <-> 247, 1111 +1112 <-> 82 +1113 <-> 236 +1114 <-> 339, 563 +1115 <-> 601 +1116 <-> 357, 580 +1117 <-> 124, 143, 157 +1118 <-> 713, 938, 947 +1119 <-> 424, 769 +1120 <-> 513, 1606 +1121 <-> 882 +1122 <-> 949 +1123 <-> 388, 702 +1124 <-> 1255, 1552 +1125 <-> 738, 1923 +1126 <-> 237 +1127 <-> 70, 729 +1128 <-> 329 +1129 <-> 268 +1130 <-> 223, 487, 832, 937, 1059 +1131 <-> 1661 +1132 <-> 963, 1253, 1810 +1133 <-> 1098, 1354, 1852 +1134 <-> 1083, 1134 +1135 <-> 239, 274, 334, 566 +1136 <-> 211, 562, 566, 1504 +1137 <-> 529 +1138 <-> 391, 1869 +1139 <-> 1499 +1140 <-> 1140 +1141 <-> 379, 1403 +1142 <-> 144, 1957 +1143 <-> 1507, 1688 +1144 <-> 1189 +1145 <-> 587, 1096, 1372, 1942 +1146 <-> 20, 1668 +1147 <-> 1168 +1148 <-> 1046, 1148 +1149 <-> 876, 1110, 1758 +1150 <-> 1491 +1151 <-> 504, 1024, 1164 +1152 <-> 438, 615, 1152, 1837 +1153 <-> 83 +1154 <-> 1046 +1155 <-> 1412, 1725 +1156 <-> 253, 324 +1157 <-> 1381, 1631 +1158 <-> 282, 667, 1076 +1159 <-> 551, 1159 +1160 <-> 590, 749 +1161 <-> 695, 1841 +1162 <-> 1535 +1163 <-> 351 +1164 <-> 626, 1151 +1165 <-> 445, 1680 +1166 <-> 1752, 1895 +1167 <-> 528, 1501 +1168 <-> 126, 1039, 1147 +1169 <-> 34, 873 +1170 <-> 1556 +1171 <-> 413, 528, 857, 1365 +1172 <-> 999 +1173 <-> 695, 1988 +1174 <-> 843, 1174 +1175 <-> 1030 +1176 <-> 1609 +1177 <-> 118, 378, 1213 +1178 <-> 53, 1839 +1179 <-> 1281, 1674 +1180 <-> 858, 952 +1181 <-> 1542 +1182 <-> 654 +1183 <-> 184 +1184 <-> 861, 1489, 1803 +1185 <-> 1251 +1186 <-> 407 +1187 <-> 291 +1188 <-> 3, 1074, 1627 +1189 <-> 1144, 1189 +1190 <-> 201, 1769 +1191 <-> 1735 +1192 <-> 1542, 1860 +1193 <-> 397 +1194 <-> 281, 628, 814 +1195 <-> 676 +1196 <-> 1196 +1197 <-> 455 +1198 <-> 121, 279, 921 +1199 <-> 426, 1038 +1200 <-> 255, 1381, 1882 +1201 <-> 1536, 1691 +1202 <-> 741, 1216 +1203 <-> 223, 1922 +1204 <-> 1243 +1205 <-> 308 +1206 <-> 481, 1206, 1434, 1605 +1207 <-> 521 +1208 <-> 324 +1209 <-> 1209 +1210 <-> 1298 +1211 <-> 614, 1402 +1212 <-> 1778 +1213 <-> 466, 1091, 1177 +1214 <-> 5, 644, 1862 +1215 <-> 1215 +1216 <-> 264, 409, 762, 1087, 1202 +1217 <-> 1110 +1218 <-> 1503 +1219 <-> 1043 +1220 <-> 498, 1475 +1221 <-> 776, 797, 1359 +1222 <-> 1316 +1223 <-> 226 +1224 <-> 618 +1225 <-> 1008 +1226 <-> 1387, 1517 +1227 <-> 583, 756 +1228 <-> 255 +1229 <-> 28, 1659 +1230 <-> 251 +1231 <-> 1231 +1232 <-> 1232, 1578, 1857 +1233 <-> 1233 +1234 <-> 74, 1326, 1576 +1235 <-> 1772, 1783 +1236 <-> 834, 1734 +1237 <-> 1868, 1998 +1238 <-> 1305, 1538 +1239 <-> 673, 900, 1818 +1240 <-> 1792, 1800 +1241 <-> 835, 1751, 1925 +1242 <-> 517, 772 +1243 <-> 294, 540, 1204 +1244 <-> 164 +1245 <-> 46, 658 +1246 <-> 307, 789, 995 +1247 <-> 756, 1284 +1248 <-> 1283 +1249 <-> 20 +1250 <-> 365 +1251 <-> 1185, 1456, 1981 +1252 <-> 1998 +1253 <-> 1132 +1254 <-> 468 +1255 <-> 1124, 1255 +1256 <-> 117, 790, 1970 +1257 <-> 882, 1058, 1503 +1258 <-> 732 +1259 <-> 298 +1260 <-> 591, 1497 +1261 <-> 768, 1768 +1262 <-> 1262 +1263 <-> 1783 +1264 <-> 1013, 1719 +1265 <-> 1842 +1266 <-> 921, 1432 +1267 <-> 593 +1268 <-> 995, 1390 +1269 <-> 1364 +1270 <-> 1667, 1781 +1271 <-> 931, 1982 +1272 <-> 852, 1472 +1273 <-> 1961 +1274 <-> 1749 +1275 <-> 1364, 1445 +1276 <-> 1299, 1480 +1277 <-> 1277 +1278 <-> 916, 1326 +1279 <-> 141 +1280 <-> 1280, 1775 +1281 <-> 1179 +1282 <-> 505, 921, 1388, 1455 +1283 <-> 1248, 1363 +1284 <-> 510, 1247, 1979 +1285 <-> 1943 +1286 <-> 349 +1287 <-> 955, 1011 +1288 <-> 68, 1813 +1289 <-> 1883 +1290 <-> 1977 +1291 <-> 1751 +1292 <-> 758, 887, 1529 +1293 <-> 31 +1294 <-> 232, 1517 +1295 <-> 125, 452, 1397 +1296 <-> 451 +1297 <-> 431, 1775 +1298 <-> 290, 977, 1210 +1299 <-> 1276 +1300 <-> 1300 +1301 <-> 1480, 1755 +1302 <-> 763, 1806 +1303 <-> 232 +1304 <-> 1107, 1510, 1841 +1305 <-> 1238, 1680 +1306 <-> 979 +1307 <-> 626 +1308 <-> 1854 +1309 <-> 528, 1993 +1310 <-> 523, 1036, 1310 +1311 <-> 929, 1311 +1312 <-> 368, 1957 +1313 <-> 176, 1756 +1314 <-> 1314 +1315 <-> 201 +1316 <-> 1008, 1222, 1736 +1317 <-> 345 +1318 <-> 502, 1032, 1914 +1319 <-> 1503 +1320 <-> 484, 1961 +1321 <-> 1635 +1322 <-> 1322, 1777 +1323 <-> 1066 +1324 <-> 511, 937 +1325 <-> 426 +1326 <-> 1234, 1278, 1912 +1327 <-> 828, 1931 +1328 <-> 410, 1866 +1329 <-> 754, 1664, 1698 +1330 <-> 933, 1068 +1331 <-> 46 +1332 <-> 165 +1333 <-> 1884, 1886 +1334 <-> 666, 838, 1983 +1335 <-> 1516, 1849 +1336 <-> 668, 1384 +1337 <-> 301, 795 +1338 <-> 367, 1535 +1339 <-> 164 +1340 <-> 474, 651 +1341 <-> 1341 +1342 <-> 604 +1343 <-> 247, 1060 +1344 <-> 578, 1637, 1665, 1917, 1980 +1345 <-> 466 +1346 <-> 543 +1347 <-> 265 +1348 <-> 603, 1348 +1349 <-> 1016 +1350 <-> 1677 +1351 <-> 1027 +1352 <-> 287, 1527, 1878 +1353 <-> 944, 1353 +1354 <-> 1133, 1485 +1355 <-> 22, 133 +1356 <-> 804, 1049, 1813 +1357 <-> 1507 +1358 <-> 870, 1889 +1359 <-> 1025, 1221 +1360 <-> 15, 792, 874 +1361 <-> 1361 +1362 <-> 21, 196, 669, 1544 +1363 <-> 896, 1283 +1364 <-> 1269, 1275 +1365 <-> 991, 1171 +1366 <-> 683 +1367 <-> 205, 303 +1368 <-> 1400, 1473 +1369 <-> 1537 +1370 <-> 746, 1451 +1371 <-> 880 +1372 <-> 1145 +1373 <-> 165, 1482 +1374 <-> 175, 661, 853, 1374 +1375 <-> 983 +1376 <-> 54, 845, 1433 +1377 <-> 1653 +1378 <-> 425, 856 +1379 <-> 1604 +1380 <-> 610, 700, 1967 +1381 <-> 26, 1157, 1200 +1382 <-> 1382, 1581, 1969 +1383 <-> 1052 +1384 <-> 1336 +1385 <-> 981 +1386 <-> 156, 1632 +1387 <-> 1226 +1388 <-> 1282 +1389 <-> 585 +1390 <-> 1268 +1391 <-> 1951 +1392 <-> 1392 +1393 <-> 461, 701, 792 +1394 <-> 191, 818 +1395 <-> 751 +1396 <-> 402, 818 +1397 <-> 108, 600, 672, 1295, 1937 +1398 <-> 217, 1675, 1943 +1399 <-> 280 +1400 <-> 1368 +1401 <-> 176 +1402 <-> 1211, 1699 +1403 <-> 212, 1141 +1404 <-> 1489 +1405 <-> 1479 +1406 <-> 1406, 1900 +1407 <-> 1407 +1408 <-> 385 +1409 <-> 824, 1778, 1964 +1410 <-> 343, 1568 +1411 <-> 1796 +1412 <-> 798, 1155 +1413 <-> 1551 +1414 <-> 1460, 1686 +1415 <-> 427, 1630, 1937 +1416 <-> 372, 1821 +1417 <-> 1554, 1690 +1418 <-> 49, 276 +1419 <-> 925 +1420 <-> 297 +1421 <-> 608, 773, 1543 +1422 <-> 989, 1520 +1423 <-> 294, 1052, 1109, 1618 +1424 <-> 24, 805, 964 +1425 <-> 1105, 1822 +1426 <-> 902 +1427 <-> 535, 1049, 1986 +1428 <-> 116, 1805 +1429 <-> 564, 959, 1978 +1430 <-> 850, 983 +1431 <-> 227 +1432 <-> 1266 +1433 <-> 505, 1376 +1434 <-> 1206 +1435 <-> 1435, 1940 +1436 <-> 1980 +1437 <-> 173, 1853 +1438 <-> 951, 1517 +1439 <-> 508, 815, 1606 +1440 <-> 534 +1441 <-> 183, 313, 1788 +1442 <-> 291, 1532, 1657 +1443 <-> 7 +1444 <-> 172, 203, 1077 +1445 <-> 1275, 1445 +1446 <-> 66 +1447 <-> 56 +1448 <-> 400, 844, 1568 +1449 <-> 75, 1449, 1870 +1450 <-> 1079, 1859 +1451 <-> 1370 +1452 <-> 675 +1453 <-> 451, 747, 1462, 1944 +1454 <-> 632, 1563 +1455 <-> 1282 +1456 <-> 1251, 1654 +1457 <-> 519 +1458 <-> 1003, 1575 +1459 <-> 1046 +1460 <-> 1414 +1461 <-> 1830, 1986 +1462 <-> 267, 1453 +1463 <-> 628, 1911 +1464 <-> 470, 924 +1465 <-> 943, 1738 +1466 <-> 32, 79, 458 +1467 <-> 127 +1468 <-> 755 +1469 <-> 42, 363, 1469 +1470 <-> 1600 +1471 <-> 306, 312, 385 +1472 <-> 1272, 1607 +1473 <-> 59, 1013, 1368, 1695, 1992 +1474 <-> 463, 1480 +1475 <-> 929, 1220, 1724 +1476 <-> 1011 +1477 <-> 160, 646 +1478 <-> 275, 347, 378, 468 +1479 <-> 605, 1405, 1867 +1480 <-> 686, 1039, 1276, 1301, 1474 +1481 <-> 1926 +1482 <-> 1373, 1529 +1483 <-> 881 +1484 <-> 459, 1540 +1485 <-> 1354 +1486 <-> 57 +1487 <-> 1715, 1915 +1488 <-> 1488 +1489 <-> 1184, 1404 +1490 <-> 763 +1491 <-> 1055, 1150, 1491 +1492 <-> 739, 892, 1776 +1493 <-> 1493 +1494 <-> 479, 1907 +1495 <-> 186 +1496 <-> 614 +1497 <-> 1260 +1498 <-> 30, 167 +1499 <-> 577, 655, 1139 +1500 <-> 684, 883 +1501 <-> 543, 1167, 1965 +1502 <-> 1015, 1502 +1503 <-> 390, 1218, 1257, 1319, 1906 +1504 <-> 349, 704, 1136, 1750 +1505 <-> 443, 609 +1506 <-> 148, 149 +1507 <-> 1143, 1357 +1508 <-> 847, 869 +1509 <-> 861, 1837 +1510 <-> 1304 +1511 <-> 105 +1512 <-> 876 +1513 <-> 295 +1514 <-> 1514 +1515 <-> 173, 1593, 1809 +1516 <-> 1335, 1599 +1517 <-> 73, 984, 1226, 1294, 1438 +1518 <-> 492 +1519 <-> 942 +1520 <-> 366, 1422 +1521 <-> 130 +1522 <-> 309, 1522 +1523 <-> 584, 970, 1826 +1524 <-> 609 +1525 <-> 448, 1525 +1526 <-> 351, 550 +1527 <-> 3, 105, 219, 1352 +1528 <-> 906, 1718 +1529 <-> 365, 1292, 1482 +1530 <-> 824 +1531 <-> 675, 1531 +1532 <-> 1442 +1533 <-> 64, 165, 1804 +1534 <-> 894, 1075, 1959 +1535 <-> 1162, 1338, 1854 +1536 <-> 200, 560, 711, 854, 1201, 1873 +1537 <-> 584, 796, 1369 +1538 <-> 492, 1238 +1539 <-> 95, 202 +1540 <-> 67, 1484 +1541 <-> 40, 955 +1542 <-> 1181, 1192 +1543 <-> 474, 761, 1421 +1544 <-> 146, 485, 489, 1362, 1753 +1545 <-> 943 +1546 <-> 1546 +1547 <-> 163, 1993 +1548 <-> 773 +1549 <-> 472, 518, 796 +1550 <-> 1550 +1551 <-> 249, 408, 1413 +1552 <-> 358, 880, 1124 +1553 <-> 705 +1554 <-> 284, 305, 1417, 1554, 1904 +1555 <-> 280, 1085 +1556 <-> 1170, 1989 +1557 <-> 1847 +1558 <-> 351, 1864 +1559 <-> 1100 +1560 <-> 196 +1561 <-> 237, 1738 +1562 <-> 915 +1563 <-> 73, 1454 +1564 <-> 99, 360, 624, 717 +1565 <-> 150 +1566 <-> 1107 +1567 <-> 125, 1056 +1568 <-> 1410, 1448 +1569 <-> 768 +1570 <-> 622, 1102 +1571 <-> 228, 1063 +1572 <-> 369, 1770 +1573 <-> 879 +1574 <-> 587, 1761 +1575 <-> 324, 539, 1458 +1576 <-> 1234 +1577 <-> 1577 +1578 <-> 1232 +1579 <-> 57, 632, 1766 +1580 <-> 1608 +1581 <-> 1382, 1730 +1582 <-> 832 +1583 <-> 700, 1839, 1846 +1584 <-> 326 +1585 <-> 859, 1585 +1586 <-> 1939 +1587 <-> 1587, 1625 +1588 <-> 345 +1589 <-> 990 +1590 <-> 938, 1590 +1591 <-> 445 +1592 <-> 719 +1593 <-> 1515, 1646 +1594 <-> 1894 +1595 <-> 1595 +1596 <-> 777, 836, 1827 +1597 <-> 1820, 1870 +1598 <-> 273 +1599 <-> 1516, 1599, 1604 +1600 <-> 653, 1470 +1601 <-> 429, 794 +1602 <-> 405 +1603 <-> 640 +1604 <-> 524, 1379, 1599 +1605 <-> 1206 +1606 <-> 488, 764, 1120, 1439, 1908 +1607 <-> 742, 1472 +1608 <-> 645, 657, 1580, 1829 +1609 <-> 1176, 1609, 1694 +1610 <-> 57, 1004 +1611 <-> 746, 1679 +1612 <-> 237, 891 +1613 <-> 873, 1006 +1614 <-> 307, 731 +1615 <-> 1615 +1616 <-> 332 +1617 <-> 1058 +1618 <-> 1423 +1619 <-> 731 +1620 <-> 200, 1858 +1621 <-> 940, 1052 +1622 <-> 431, 592, 1968 +1623 <-> 1623 +1624 <-> 23, 470 +1625 <-> 1587 +1626 <-> 673, 1751 +1627 <-> 478, 1188 +1628 <-> 369, 718 +1629 <-> 759 +1630 <-> 1415 +1631 <-> 1157 +1632 <-> 699, 1386 +1633 <-> 135, 492, 1746 +1634 <-> 127, 437, 522, 1044 +1635 <-> 458, 538, 845, 1321 +1636 <-> 924, 976 +1637 <-> 1344 +1638 <-> 803 +1639 <-> 1040 +1640 <-> 573 +1641 <-> 554 +1642 <-> 1642 +1643 <-> 458 +1644 <-> 1755, 1794 +1645 <-> 259, 1708 +1646 <-> 1593 +1647 <-> 1060 +1648 <-> 544, 1648 +1649 <-> 261, 432 +1650 <-> 500 +1651 <-> 587 +1652 <-> 1853 +1653 <-> 85, 1377 +1654 <-> 614, 1456 +1655 <-> 1700, 1847 +1656 <-> 194, 689 +1657 <-> 1010, 1442, 1667 +1658 <-> 469, 552 +1659 <-> 1229 +1660 <-> 559 +1661 <-> 147, 749, 1131, 1835 +1662 <-> 1970 +1663 <-> 769, 1020 +1664 <-> 1329, 1985 +1665 <-> 945, 1344 +1666 <-> 356, 1883 +1667 <-> 333, 1270, 1657 +1668 <-> 899, 1146 +1669 <-> 1669 +1670 <-> 108 +1671 <-> 526, 907, 1842 +1672 <-> 210, 460, 1687 +1673 <-> 189, 293 +1674 <-> 1179, 1918, 1936 +1675 <-> 1398, 1743, 1749 +1676 <-> 314 +1677 <-> 537, 1028, 1350, 1740, 1857 +1678 <-> 921, 1013 +1679 <-> 1611 +1680 <-> 1165, 1305 +1681 <-> 367, 561, 933 +1682 <-> 1701 +1683 <-> 446 +1684 <-> 1684 +1685 <-> 691, 953 +1686 <-> 1414, 1968 +1687 <-> 757, 1672 +1688 <-> 245, 993, 1143 +1689 <-> 909 +1690 <-> 1417 +1691 <-> 696, 1201 +1692 <-> 367, 967 +1693 <-> 1693 +1694 <-> 194, 912, 1609 +1695 <-> 1473 +1696 <-> 1696 +1697 <-> 926, 1897 +1698 <-> 658, 1329, 1698 +1699 <-> 475, 1402 +1700 <-> 626, 1655 +1701 <-> 578, 1682, 1701 +1702 <-> 307 +1703 <-> 94, 1910 +1704 <-> 1883 +1705 <-> 1931 +1706 <-> 1706 +1707 <-> 549, 1707 +1708 <-> 1645, 1872 +1709 <-> 1709 +1710 <-> 868, 1710 +1711 <-> 573 +1712 <-> 526 +1713 <-> 967, 1713 +1714 <-> 277, 1757, 1850 +1715 <-> 625, 1487 +1716 <-> 669 +1717 <-> 475 +1718 <-> 858, 1528 +1719 <-> 643, 1264 +1720 <-> 90, 137 +1721 <-> 904 +1722 <-> 299 +1723 <-> 1975 +1724 <-> 547, 872, 1475 +1725 <-> 1155, 1943 +1726 <-> 939 +1727 <-> 17, 285, 946 +1728 <-> 888, 1087 +1729 <-> 1058 +1730 <-> 114, 1581 +1731 <-> 631, 765 +1732 <-> 141 +1733 <-> 352 +1734 <-> 108, 1236 +1735 <-> 689, 1191 +1736 <-> 908, 1316 +1737 <-> 1753 +1738 <-> 1465, 1561 +1739 <-> 358, 917 +1740 <-> 1677, 1838 +1741 <-> 361, 476, 477 +1742 <-> 966, 1036 +1743 <-> 18, 1675 +1744 <-> 787 +1745 <-> 782 +1746 <-> 1633 +1747 <-> 421 +1748 <-> 1888 +1749 <-> 1274, 1675 +1750 <-> 0, 1504 +1751 <-> 502, 895, 1241, 1291, 1626, 1999 +1752 <-> 45, 96, 490, 725, 771, 1166 +1753 <-> 717, 1544, 1737 +1754 <-> 974 +1755 <-> 904, 1301, 1644 +1756 <-> 1313 +1757 <-> 1714 +1758 <-> 411, 735, 1149 +1759 <-> 1759 +1760 <-> 12, 1027 +1761 <-> 1574 +1762 <-> 583, 985 +1763 <-> 799 +1764 <-> 942 +1765 <-> 666 +1766 <-> 1579 +1767 <-> 605 +1768 <-> 322, 500, 681, 989, 1261 +1769 <-> 89, 845, 1190 +1770 <-> 969, 1572 +1771 <-> 577 +1772 <-> 568, 1235 +1773 <-> 304, 936 +1774 <-> 184, 659, 855 +1775 <-> 810, 1280, 1297 +1776 <-> 148, 1492 +1777 <-> 1322, 1939 +1778 <-> 1212, 1409, 1858 +1779 <-> 377 +1780 <-> 61, 682 +1781 <-> 65, 1270 +1782 <-> 239, 950 +1783 <-> 210, 1235, 1263, 1783 +1784 <-> 536, 1055 +1785 <-> 35, 1066, 1785, 1885 +1786 <-> 332, 862 +1787 <-> 434, 1790 +1788 <-> 752, 1441 +1789 <-> 1789 +1790 <-> 1787, 1790 +1791 <-> 1019, 1791 +1792 <-> 1240 +1793 <-> 403 +1794 <-> 740, 826, 1644 +1795 <-> 1049 +1796 <-> 1411, 1796 +1797 <-> 216, 470 +1798 <-> 439 +1799 <-> 461 +1800 <-> 546, 1240 +1801 <-> 775 +1802 <-> 456 +1803 <-> 189, 435, 1184 +1804 <-> 421, 1533 +1805 <-> 89, 1428 +1806 <-> 574, 671, 1302 +1807 <-> 1084 +1808 <-> 305, 662, 1824 +1809 <-> 1515, 1913 +1810 <-> 1132 +1811 <-> 369 +1812 <-> 16, 222, 769 +1813 <-> 1288, 1356 +1814 <-> 1094, 1814 +1815 <-> 746 +1816 <-> 102 +1817 <-> 100, 903 +1818 <-> 1239 +1819 <-> 1819 +1820 <-> 665, 1597 +1821 <-> 204, 295, 1416 +1822 <-> 261, 447, 1425 +1823 <-> 663 +1824 <-> 1808 +1825 <-> 1825 +1826 <-> 1523 +1827 <-> 1596 +1828 <-> 1000 +1829 <-> 1062, 1608 +1830 <-> 787, 1095, 1461, 1957 +1831 <-> 1831 +1832 <-> 255, 321 +1833 <-> 907 +1834 <-> 541 +1835 <-> 1661 +1836 <-> 413 +1837 <-> 1152, 1509 +1838 <-> 1740 +1839 <-> 1178, 1583 +1840 <-> 889, 899 +1841 <-> 243, 340, 726, 774, 1161, 1304 +1842 <-> 1265, 1671 +1843 <-> 152 +1844 <-> 483 +1845 <-> 159, 326, 584 +1846 <-> 674, 1064, 1583 +1847 <-> 1557, 1655 +1848 <-> 147 +1849 <-> 1335 +1850 <-> 1714 +1851 <-> 1851, 1994 +1852 <-> 1133 +1853 <-> 1437, 1652 +1854 <-> 156, 1021, 1308, 1535 +1855 <-> 336 +1856 <-> 1936, 1979 +1857 <-> 1026, 1232, 1677 +1858 <-> 128, 1620, 1778 +1859 <-> 181, 1450, 1925 +1860 <-> 1084, 1192, 1860 +1861 <-> 1033, 1040 +1862 <-> 570, 1037, 1214 +1863 <-> 269 +1864 <-> 890, 1558 +1865 <-> 940 +1866 <-> 321, 1328 +1867 <-> 386, 1479 +1868 <-> 336, 1237 +1869 <-> 1138 +1870 <-> 1449, 1597 +1871 <-> 166 +1872 <-> 36, 1708 +1873 <-> 1536 +1874 <-> 259 +1875 <-> 1875 +1876 <-> 360 +1877 <-> 660 +1878 <-> 171, 1352 +1879 <-> 1879 +1880 <-> 775, 1929 +1881 <-> 483 +1882 <-> 1200 +1883 <-> 11, 733, 881, 1289, 1666, 1704 +1884 <-> 1333 +1885 <-> 1785 +1886 <-> 371, 1040, 1333 +1887 <-> 261, 1964 +1888 <-> 993, 1748 +1889 <-> 618, 1358 +1890 <-> 1890 +1891 <-> 223, 271, 554 +1892 <-> 330, 1060 +1893 <-> 758, 846 +1894 <-> 980, 1097, 1594 +1895 <-> 22, 1087, 1166 +1896 <-> 572, 1081 +1897 <-> 1104, 1697 +1898 <-> 725 +1899 <-> 81, 1946 +1900 <-> 1406 +1901 <-> 404, 803 +1902 <-> 234 +1903 <-> 38, 383 +1904 <-> 1554 +1905 <-> 1905 +1906 <-> 1503 +1907 <-> 1494, 1907 +1908 <-> 1606 +1909 <-> 1909 +1910 <-> 662, 1703 +1911 <-> 732, 1463 +1912 <-> 1326 +1913 <-> 1024, 1809, 1913 +1914 <-> 784, 896, 1318 +1915 <-> 1487 +1916 <-> 1975 +1917 <-> 1344 +1918 <-> 1674, 1980 +1919 <-> 499, 1919 +1920 <-> 894 +1921 <-> 391, 1047 +1922 <-> 214, 1203 +1923 <-> 672, 777, 1125 +1924 <-> 1924 +1925 <-> 1241, 1859 +1926 <-> 898, 1481 +1927 <-> 21 +1928 <-> 895 +1929 <-> 401, 1880 +1930 <-> 942 +1931 <-> 906, 1100, 1327, 1705 +1932 <-> 501, 507 +1933 <-> 525, 626 +1934 <-> 1049 +1935 <-> 1938 +1936 <-> 364, 1674, 1856 +1937 <-> 1397, 1415 +1938 <-> 508, 810, 1935 +1939 <-> 1586, 1777 +1940 <-> 633, 1435 +1941 <-> 275, 746 +1942 <-> 1145 +1943 <-> 315, 373, 585, 755, 1285, 1398, 1725 +1944 <-> 1453 +1945 <-> 184 +1946 <-> 103, 229, 1899 +1947 <-> 888 +1948 <-> 66, 635 +1949 <-> 456, 662 +1950 <-> 2, 129 +1951 <-> 596, 1391 +1952 <-> 18, 76 +1953 <-> 460, 576 +1954 <-> 136, 929 +1955 <-> 80 +1956 <-> 261 +1957 <-> 110, 1142, 1312, 1830 +1958 <-> 1035 +1959 <-> 317, 1534 +1960 <-> 565 +1961 <-> 483, 1273, 1320, 1961 +1962 <-> 332 +1963 <-> 142, 839 +1964 <-> 1409, 1887 +1965 <-> 1501 +1966 <-> 1966 +1967 <-> 1380 +1968 <-> 1622, 1686 +1969 <-> 29, 683, 1382 +1970 <-> 1256, 1662 +1971 <-> 902 +1972 <-> 1972 +1973 <-> 866 +1974 <-> 1974 +1975 <-> 1723, 1916 +1976 <-> 416, 516 +1977 <-> 310, 1290 +1978 <-> 1429 +1979 <-> 1284, 1856 +1980 <-> 251, 1344, 1436, 1918 +1981 <-> 846, 1251 +1982 <-> 935, 1271 +1983 <-> 1334 +1984 <-> 289, 1984 +1985 <-> 270, 1664 +1986 <-> 1427, 1461 +1987 <-> 422 +1988 <-> 1173 +1989 <-> 895, 1556 +1990 <-> 1990 +1991 <-> 439, 1991 +1992 <-> 819, 1086, 1473 +1993 <-> 1309, 1547 +1994 <-> 1851 +1995 <-> 1995 +1996 <-> 153, 392, 407 +1997 <-> 928 +1998 <-> 76, 1237, 1252 +1999 <-> 1751 \ No newline at end of file diff --git a/csharp/BScottDay13.cs b/csharp/BScottDay13.cs new file mode 100644 index 0000000..66c9bda --- /dev/null +++ b/csharp/BScottDay13.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.IO; + +namespace AOC2017 +{ + class BScottDay13 : BScottSolution + { + public override string Name => "Day 13: Packet Scanners"; + + public override void Run() + { + string[] exampleInput = new[] { + "0: 3", + "1: 2", + "4: 4", + "6: 4" + }; + + Console.WriteLine($"Part 1 Example Answer: {PacketScannerPart1(exampleInput)}"); + Console.WriteLine($"Part 2 Example Answer: {PacketScannerPart2(exampleInput)}"); + + string[] input = File.ReadAllLines("BScottDay13.txt"); + + Console.WriteLine($"Part 1 Answer: {PacketScannerPart1(input)}"); + Console.WriteLine($"Part 2 Answer: {PacketScannerPart2(input)}"); + + } + + private int PacketScannerPart1(string[] input) + { + Dictionary firewallList = new Dictionary(); + + foreach (var layer in input) + { + int[] args = Array.ConvertAll(layer.Split(':'), s => int.Parse(s.Trim())); + firewallList.Add(args[0], new Layer(args[0], args[1])); + } + + int totalSeverity = 0; + foreach (int key in firewallList.Keys) + { + if (key % (2 * firewallList[key].Range - 2) == 0) + totalSeverity += firewallList[key].Severity; + } + + return totalSeverity; + } + + private int PacketScannerPart2(string[] input) + { + Dictionary firewallList = new Dictionary(); + + foreach (var layer in input) + { + int[] args = Array.ConvertAll(layer.Split(':'), s => int.Parse(s.Trim())); + firewallList.Add(args[0], new Layer(args[0], args[1])); + } + + for (int delay = 10; delay < int.MaxValue; delay++) + { + bool isCaught = false; + foreach (int key in firewallList.Keys) + { + if ((key + delay) % (2 * firewallList[key].Range - 2) == 0) + { + isCaught = true; + break; + } + } + + if (!isCaught) + return delay; + } + + return -1; + } + + class Layer + { + public int Depth { get; private set; } + public int Range { get; private set; } + public int Severity => Depth * Range; + + public Layer(int depth, int range) + { + Depth = depth; + Range = range; + } + } + } +} diff --git a/csharp/BScottDay13.txt b/csharp/BScottDay13.txt new file mode 100644 index 0000000..dc7c501 --- /dev/null +++ b/csharp/BScottDay13.txt @@ -0,0 +1,43 @@ +0: 4 +1: 2 +2: 3 +4: 4 +6: 6 +8: 5 +10: 6 +12: 6 +14: 6 +16: 8 +18: 8 +20: 9 +22: 12 +24: 8 +26: 8 +28: 8 +30: 12 +32: 12 +34: 8 +36: 12 +38: 10 +40: 12 +42: 12 +44: 10 +46: 12 +48: 14 +50: 12 +52: 14 +54: 14 +56: 12 +58: 14 +60: 12 +62: 14 +64: 18 +66: 14 +68: 14 +72: 14 +76: 14 +82: 14 +86: 14 +88: 18 +90: 14 +92: 17 \ No newline at end of file diff --git a/csharp/BScottDay14.cs b/csharp/BScottDay14.cs new file mode 100644 index 0000000..7cff736 --- /dev/null +++ b/csharp/BScottDay14.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace AOC2017 +{ + class BScottDay14 : BScottSolution + { + public override string Name => "Day 14: Disk Defragmentation"; + + public override void Run() + { + string input = "flqrgnkx"; + Console.WriteLine($"Part 1 Example Answer: {DiskDefragmentationPart1(input)}"); + Console.WriteLine($"Part 2 Example Answer: {DiskDefragmentationPart2(input)}"); + + input = "oundnydw"; + Console.WriteLine($"Part 1 Answer: {DiskDefragmentationPart1(input)}"); + Console.WriteLine($"Part 2 Answer: {DiskDefragmentationPart2(input)}"); + } + + private int DiskDefragmentationPart1(string input) + { + byte[][] disk = new byte[128][]; + for (int i = 0; i < 128; i++) + disk[i] = KnotHash($"{input}-{i}"); + + int sum = 0; + for (int i = 0; i < 128; i++) + for (int j = 0; j < 128; j++) + sum += disk[i][j]; + + return sum; + } + + private int DiskDefragmentationPart2(string input) + { + byte[][] disk = new byte[128][]; + for (int i = 0; i < 128; i++) + disk[i] = KnotHash($"{input}-{i}"); + + List> map = new List>(); + for (int i = 0; i < 128; i++) + for (int j = 0; j < 128; j++) + if (disk[i][j] == 1) + map.Add(new Tuple(i, j)); + + int regions = 0; + while (map.Count > 0) + { + FindRegion(map); + regions++; + } + + return regions; + } + + private void FindRegion(List> map) + { + Stack> stack = new Stack>(); + + stack.Push(map[map.Count - 1]); + map.RemoveAt(map.Count - 1); + + int[,] deltas = { { 1, 0 }, { -1, 0 }, { 0, 1 }, { 0, -1 } }; + while (stack.Count > 0) + { + Tuple fragment = stack.Pop(); + for (int i = 0; i < deltas.GetLength(0); i++) + { + int dy = fragment.Item1 + deltas[i, 0]; + int dx = fragment.Item2 + deltas[i, 1]; + + if (dy < 0 || dy >= 128 || dx < 0 || dy >= 128) + continue; + + int index = map.FindIndex(eri => eri.Item1 == dy && eri.Item2 == dx); + if (index != -1) + { + stack.Push(map[index]); + map.RemoveAt(index); + } + } + } + } + + // from day 10 + private byte[] KnotHash(string input) + { + String suffix = Encoding.ASCII.GetString(new byte[] { 17, 31, 73, 47, 23 }); + byte[] lengths = Encoding.ASCII.GetBytes(input + suffix); //string of bytes and add a suffix + byte[] list = new byte[256]; + byte[] denseHash = new byte[16]; + int pos = 0, skipSize = 0; + + // initialize list + for (int i = 0; i < list.Length; i++) + list[i] = (byte)i; + + // 64 rounds of fun + for (int x = 0; x < 64; x++) + { + for (int i = 0; i < lengths.Length; i++) + { + byte[] buff = new byte[lengths[i]]; + + for (int j = 0; j < buff.Length; j++) + buff[j] = list[(pos + j) % list.Length]; + + for (int j = 0; j < buff.Length; j++) + list[(pos + j) % list.Length] = buff[(buff.Length - 1) - j]; + + pos += (lengths[i] + skipSize++) % list.Length; // wrap around, increase skipsize + } + } + + // do the Xor magic + for (int i = 0; i < 16; i++) + { + for (int j = 0; j < 16; j++) + denseHash[i] ^= list[i * 16 + j]; + } + + byte[] output = new byte[128]; + for (int i = 0; i < 16; i++) + { + for (int j = 0; j < 8; j++) + output[i * 8 + (7 - j)] = (byte)((denseHash[i] >> j) & 0x1); + } + + return output; + } + } +} diff --git a/csharp/BScottDay15.cs b/csharp/BScottDay15.cs new file mode 100644 index 0000000..8f57d50 --- /dev/null +++ b/csharp/BScottDay15.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; + +namespace AOC2017 +{ + class BScottDay15 : BScottSolution + { + public override string Name => "Day 15: Dueling Generators"; + + public override void Run() + { + int sampleSize = 40000000; + int inputA = 679; + int inputB = 771; + + Console.WriteLine($"Part 1 Example Answer: {DuelingGeneratorsPart1(sampleSize, 65, 8921)}"); + Console.WriteLine($"Part 1 Answer: {DuelingGeneratorsPart1(sampleSize, inputA, inputB)}"); + + Console.WriteLine($"Part 2 Example Answer: {DuelingGeneratorsPart2(sampleSize, 65, 8921)}"); + Console.WriteLine($"Part 2 Answer: {DuelingGeneratorsPart2(sampleSize, inputA, inputB)}"); + } + + private int DuelingGeneratorsPart1(int sampleSize, int generatorA, int generatorB) + { + int count = 0; + for (int i = 0; i < sampleSize; i++) + { + generatorA = (int)(((ulong) generatorA * 16807ul) % int.MaxValue); + generatorB = (int)(((ulong) generatorB * 48271ul) % int.MaxValue); + + if ((generatorA & 0xffff) == (generatorB & 0xffff)) + count++; + } + return count; + } + + private int DuelingGeneratorsPart2(int sampleSize, int generatorA, int generatorB) + { + int count = 0; + List cmpA = new List(); + List cmpB = new List(); + + for (int i = 0; i < sampleSize; i++) + { + generatorA = (int)(((ulong)generatorA * 16807ul) % int.MaxValue); + generatorB = (int)(((ulong)generatorB * 48271ul) % int.MaxValue); + + if (generatorA % 4 == 0) cmpA.Add(generatorA); + if (generatorB % 8 == 0) cmpB.Add(generatorB); + } + + for (int i = 0; i < Math.Min(cmpA.Count, cmpB.Count); i++) + { + if ((cmpA[i] & 0xffff) == (cmpB[i] & 0xffff)) + count++; + } + + return count; + } + } +} diff --git a/csharp/BScottDay16.cs b/csharp/BScottDay16.cs new file mode 100644 index 0000000..5e29da1 --- /dev/null +++ b/csharp/BScottDay16.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.IO; + +namespace AOC2017 +{ + class BScottDay16 : BScottSolution + { + public override string Name => "Day 16: Permutation Promenade"; + + public override void Run() + { + string[] input = File.ReadAllText("BScottDay16.txt").Split(','); + + Console.WriteLine($"Part 1 Answer: {PermutationPromenadePart1(input)}"); + Console.WriteLine($"Part 2 Answer: {PermutationPromenadePart2(input)}"); + } + + private string PermutationPromenadePart1(string[] instructions) + { + char[] programs = new char[16]; + + for (int i = 0; i < programs.Length; i++) + programs[i] = (char)('a' + i); + + for (int i = 0; i < instructions.Length; i++) + { + string[] args = instructions[i].Substring(1).Split('/'); + int a, b; + char tmp; + switch (instructions[i][0]) + { + case 's': // Spin + int startPos = 16 - int.Parse(args[0]); + char[] temp = new char[16]; + for (int j = 0; j < temp.Length; j++) + temp[j] = programs[(j + startPos) % temp.Length]; + for (int j = 0; j < temp.Length; j++) + programs[j] = temp[j]; + break; + + case 'x': // Exchange + a = int.Parse(args[0]); + b = int.Parse(args[1]); + tmp = programs[b]; + programs[b] = programs[a]; + programs[a] = tmp; + break; + + case 'p': // Partner + a = Array.IndexOf(programs, args[0][0]); + b = Array.IndexOf(programs, args[1][0]); + tmp = programs[b]; + programs[b] = programs[a]; + programs[a] = tmp; + break; + } + } + + return new String(programs); + } + + private string PermutationPromenadePart2(string[] instructions) + { + char[] programs = new char[16]; + + List cache = new List(); + + for (int i = 0; i < programs.Length; i++) + programs[i] = (char)('a' + i); + + // add initial state to cache + cache.Add(new string(programs)); + + for (int x = 0; x < 10000; x++) + { + for (int i = 0; i < instructions.Length; i++) + { + string[] args = instructions[i].Substring(1).Split('/'); + char tmp; + int a, b; + switch (instructions[i][0]) + { + case 's': // Spin + int startPos = 16 - int.Parse(args[0]); + char[] temp = new char[16]; + for (int j = 0; j < temp.Length; j++) + temp[j] = programs[(j + startPos) % temp.Length]; + for (int j = 0; j < temp.Length; j++) + programs[j] = temp[j]; + break; + + case 'x': // Exchange + a = int.Parse(args[0]); + b = int.Parse(args[1]); + tmp = programs[b]; + programs[b] = programs[a]; + programs[a] = tmp; + break; + + case 'p': // Partner + a = Array.IndexOf(programs, args[0][0]); + b = Array.IndexOf(programs, args[1][0]); + tmp = programs[b]; + programs[b] = programs[a]; + programs[a] = tmp; + break; + } + } + + // eventually the same sequence will happen again, and when it does you have + // considerably reduced the number of times you actually have to perform the sequence. + string s = new string(programs); + if (cache.Contains(s)) + break; + cache.Add(s); + } + + return cache[1000000000 % cache.Count]; + } + } +} diff --git a/csharp/BScottDay16.txt b/csharp/BScottDay16.txt new file mode 100644 index 0000000..bb4c442 --- /dev/null +++ b/csharp/BScottDay16.txt @@ -0,0 +1 @@ +x3/4,pm/e,x15/7,pp/l,x5/8,s15,x2/6,s9,x0/4,s7,x8/12,pc/b,x2/14,pe/d,x10/11,pg/o,x9/14,ph/n,x15/8,s13,pe/i,x3/7,s2,pd/b,x4/15,s11,x0/14,s10,x7/3,s8,x2/1,pj/i,s8,x10/14,s5,x4/1,pa/h,s11,x12/6,s1,x1/14,s11,x5/12,s4,pn/b,x7/9,pj/l,x1/8,pd/e,s6,pp/g,x10/2,pi/o,x15/5,pp/l,x6/13,s3,x5/12,pk/f,x1/8,s4,x11/10,s10,x4/15,pe/n,x1/5,s14,x7/2,pc/i,x4/10,pj/p,x6/15,s12,x5/0,pa/n,x8/12,s14,x3/5,pb/d,x4/12,s3,x9/6,pg/h,x3/1,s5,x4/10,pm/f,x12/2,s11,x15/13,pa/g,x0/2,s13,pj/i,s13,x6/10,pn/a,x2/1,pm/f,x10/12,s4,pi/c,x14/13,s4,x15/0,s7,x14/8,s5,x5/2,pe/d,x3/9,s14,x7/0,s10,x6/14,s8,x3/15,pn/j,x2/1,pf/a,x13/10,pe/m,x8/0,s2,x4/7,pc/l,s4,x2/0,s4,x3/4,s12,x11/2,s3,x5/8,s2,x4/6,pn/f,x15/5,s15,x4/12,s11,x1/13,pm/b,s13,pj/h,s15,x9/3,pd/l,x14/15,po/i,x10/7,pd/g,x11/13,s5,x9/14,s6,x1/0,s7,x5/8,s7,x0/11,s10,x7/12,s2,x8/9,s7,pb/j,x3/2,s10,x6/0,pe/l,x4/8,pf/p,x6/0,po/i,x7/2,s10,x10/3,pb/n,x2/13,s3,x15/3,ph/c,s14,x1/8,s10,x13/10,s5,x14/7,s7,x1/5,pk/f,x7/0,s11,x13/2,pc/d,x8/10,pi/h,x5/1,pe/f,s8,pa/j,x13/10,pc/f,s12,x9/12,pa/h,x7/0,s15,x8/13,s8,x15/11,pl/d,x2/8,s8,x3/14,s1,pa/e,x4/8,pp/n,x0/14,s3,x10/12,pg/c,x14/9,s2,x0/10,s11,x9/3,pn/a,x5/4,s15,x12/1,s6,x14/6,pf/c,s7,x15/5,s1,x12/13,s13,x9/4,s13,pb/p,x10/5,pe/c,x6/15,s7,x2/14,s15,x7/6,s13,x5/10,pb/l,x9/7,s14,x1/3,s12,x9/10,pn/h,x7/12,pc/k,x9/4,s2,x5/15,s10,x9/0,s2,x11/4,pg/e,x8/1,pm/h,x3/4,s14,x12/2,pi/d,x1/4,s15,x11/15,s14,x13/10,pb/o,x9/12,s5,x6/2,s13,x7/4,ph/m,s4,x8/12,pi/n,s15,x2/5,pj/p,x10/0,s4,x15/9,pn/m,x14/13,pd/b,x10/9,s5,x1/5,s2,x15/3,pe/j,s7,x0/6,s2,x8/9,s3,x2/3,s9,x5/12,pp/b,x6/3,pf/l,x9/0,s15,x3/2,s12,pb/m,x14/6,s12,x3/15,ph/f,x5/1,s13,x0/15,s8,x1/9,pa/p,s9,x15/13,s7,pf/b,x2/8,ph/g,x10/3,pi/o,x13/5,s1,x4/3,s7,x7/8,s13,x0/13,pn/h,x12/15,s14,x2/6,pc/d,x8/12,s5,x5/3,s10,x10/9,pb/p,x4/11,pm/k,x14/3,s12,po/h,x6/1,s14,x15/3,s13,x7/5,pe/i,x12/6,s8,x8/13,s2,x12/15,s15,x2/4,s13,x10/7,s11,x15/1,s4,x5/11,s8,x1/15,s15,x8/13,s8,x1/15,s5,pb/c,x11/10,s13,pm/p,x0/8,s12,x2/5,pj/i,x14/3,pl/o,x2/11,pe/j,x13/1,pa/l,x3/10,s11,x7/4,pj/m,x5/10,ph/g,x13/9,s5,x3/4,s1,x15/8,s4,x0/1,s5,pd/j,x9/12,s6,pk/g,x4/6,s4,x1/3,ph/n,s9,x4/10,pf/i,s10,pk/j,x3/1,s11,pe/h,x12/4,s6,x10/5,s12,x12/13,s15,x7/5,pn/l,x12/15,s9,x14/11,s8,x5/10,s2,x12/8,pc/b,x3/10,po/n,s14,x6/14,pl/j,x3/10,s4,x1/13,pe/c,x15/0,pa/b,x8/4,s4,pk/c,x5/12,s2,pi/g,x11/7,pe/l,x14/12,s5,x8/4,pg/f,x1/7,s8,x4/13,s12,x10/14,pc/h,x13/2,s1,x15/11,s3,x3/14,s5,pb/g,x2/7,s13,x9/3,s9,x13/1,s9,x3/14,s6,x5/0,s6,x8/14,s3,x11/13,s9,x1/5,s12,x4/2,pf/m,x6/5,pi/o,x15/2,s5,x12/5,pc/b,s2,x9/8,s9,x14/0,s6,x6/1,pe/n,x8/9,po/k,x15/4,pl/f,x11/14,s3,x7/15,s14,x14/12,pe/o,x15/7,s15,x6/1,s13,x13/12,pg/h,x5/0,pe/b,x1/9,s1,x8/2,s2,x3/1,pl/k,x9/0,s5,x8/2,pi/c,s1,x6/14,ph/p,x11/15,s4,x4/14,pn/i,x0/3,ph/p,x4/5,s6,x3/7,s3,pj/g,x0/4,po/k,x3/13,s14,x12/2,s8,x15/5,s11,x1/10,pj/e,x6/9,s14,x0/3,s12,x8/5,s10,x4/15,s13,x11/2,pi/m,x13/1,s13,x8/10,s9,x0/13,s14,x5/10,pd/a,x12/8,pg/h,s12,x9/0,s2,x5/2,pi/m,x6/0,s8,x15/13,s10,x6/2,pc/b,x10/4,s12,x15/1,s2,x12/5,pe/d,x10/8,pc/f,s10,x14/1,s9,x6/10,s2,x5/1,s2,x10/0,pp/l,x3/7,s8,x8/2,s13,x13/12,s11,x7/14,pc/k,x0/5,s15,x11/12,pa/g,x13/8,s11,x4/2,s14,x11/5,s8,x0/7,s15,x4/2,pj/n,x11/8,s10,pg/a,x6/10,s9,x2/11,po/h,x8/3,s12,pf/l,x0/1,s12,x10/9,pg/m,x5/2,pl/e,x12/6,s9,x1/14,s12,x10/5,pa/k,x6/12,pe/g,x10/7,pj/d,x13/0,s8,pm/k,x5/12,ph/a,x15/3,po/l,x9/6,pk/g,x7/3,s14,x4/14,s7,x10/11,pp/m,x8/14,s11,x15/0,s1,pe/d,x13/12,pa/k,x8/14,s5,x9/7,pm/g,x8/12,pd/j,x1/13,s9,x10/6,s2,x14/5,pf/e,s1,x4/2,s8,x3/13,pi/k,x11/10,pn/j,x3/7,s3,x1/12,s10,x14/2,s13,x0/10,s4,x12/8,pp/e,x6/7,s13,x5/13,s13,x3/10,s4,x9/12,s12,po/b,x5/4,s6,x0/10,s4,x12/5,pf/c,s10,x10/15,pe/l,x4/9,s14,x6/5,s1,x2/9,pb/m,s1,x4/8,s7,x1/12,s13,x0/14,pa/o,x12/7,pk/m,x1/10,s11,x15/13,s10,x9/0,s8,x1/7,s11,x9/12,s1,x10/13,s3,x11/14,s3,x12/2,s3,x13/7,s11,x11/0,pf/l,x8/10,s10,x12/7,s8,x8/5,s5,x15/1,pj/n,s9,pp/i,x6/12,s15,x0/1,pg/a,x10/15,s1,x1/0,s7,x12/14,pm/d,s15,x6/11,s1,x7/12,pa/h,x3/9,s12,x8/5,pm/b,x9/1,pp/j,x8/7,pb/k,x1/5,s12,x10/9,pa/i,x1/4,s15,x2/0,s3,x15/10,s14,x11/9,s14,x6/14,s11,x13/2,pl/g,x7/11,s10,x4/15,s15,x12/0,s8,x3/6,pa/f,x11/2,s6,x13/6,s10,pk/d,x10/9,po/m,x13/12,pc/b,x8/4,s13,x1/11,pn/o,x8/13,s14,x15/0,s8,x13/9,s15,pa/i,x6/2,s8,x15/1,pc/m,x10/9,s6,x6/5,s3,pg/l,x8/3,s13,pa/m,x2/13,s15,x0/12,s12,x5/11,s3,po/k,x1/15,pa/f,x14/6,s15,x1/15,s3,x14/4,s4,x15/9,s15,pm/n,x1/5,s15,x3/2,pp/h,x13/5,s13,pm/e,x7/10,s5,x15/9,s10,pn/g,x10/6,pb/l,x0/8,s9,x13/1,s14,x5/8,s7,x15/11,s2,x13/4,s14,x12/3,s15,pe/n,x4/0,pk/i,x13/9,s14,x5/15,s11,x3/11,pa/e,x4/5,s13,x3/10,pf/d,x14/0,s14,x10/12,pk/e,s1,x0/1,pm/o,x3/8,s13,x15/9,s7,x11/10,pg/n,s6,ph/p,s12,x12/15,pi/a,x9/0,pe/m,x4/13,pi/p,x11/5,pj/k,x7/6,s7,x3/12,s7,x0/9,pa/d,x15/10,s9,x2/11,s4,x6/1,s4,x13/9,pb/c,x0/11,po/n,x13/6,s7,x5/1,pj/e,x4/10,pp/h,x13/11,pc/d,x3/8,s12,x4/9,s5,pg/m,x13/14,pa/f,x15/3,pi/k,x9/5,pb/e,x3/12,s8,x5/10,s8,po/j,x7/2,s10,x10/11,pg/m,x8/4,s14,x9/11,s5,x2/3,s6,x1/14,pf/h,x2/3,s11,pc/b,s1,x5/6,s11,x13/10,ph/j,s8,x14/9,s5,x4/1,pf/n,x6/13,pc/h,s1,x12/2,pa/j,x1/4,s8,x12/5,ph/o,x6/11,s4,x7/2,pl/b,x9/6,s14,x8/10,pk/h,x0/4,s1,x2/10,pd/o,x4/13,s5,x0/14,s11,x4/10,pl/b,s6,x14/7,pf/o,x6/15,s12,x4/1,s4,x12/13,s6,x8/10,pd/h,s9,x11/0,pb/a,x12/5,pg/h,x15/11,s4,x8/12,s11,x7/14,s15,x8/3,s2,x12/4,po/e,x6/15,s10,x8/10,pi/d,x6/4,pk/g,x5/12,pa/i,x2/9,s13,x15/12,pc/g,x11/9,s11,x2/12,s5,x1/5,pj/p,x15/8,s9,x12/1,s1,x0/2,pf/l,s3,x11/6,s8,x0/10,s9,x5/1,pn/i,x9/2,pd/k,x4/1,pp/l,x10/5,s10,x8/3,s2,x6/9,pg/e,x8/4,s13,x9/2,s8,x14/0,pb/m,x15/3,pi/g,x13/11,s2,x4/14,pj/o,x7/12,s10,x5/2,pm/d,x6/14,pj/b,x10/4,s15,x9/14,s1,x13/3,s7,x8/9,s5,x11/10,pc/a,s12,x9/6,s5,x13/8,s9,x15/12,s5,x0/6,s13,x15/1,s2,x6/3,pd/g,s3,x1/14,s13,x15/7,s6,x12/11,ph/n,x13/2,s12,pm/d,x12/15,pc/p,s12,x14/3,s6,x7/12,pl/h,x6/2,s1,x7/0,pn/c,x13/15,pe/b,x6/11,s1,x2/8,s6,x6/9,s7,x14/1,ph/i,s15,x13/3,s14,x5/6,pm/p,x10/3,s7,pn/d,x12/14,s10,x4/7,s5,x9/2,s9,x10/5,s13,x12/13,ph/k,x15/6,pg/c,x11/4,s1,x9/7,s1,x4/15,pf/m,s10,x6/10,pi/o,x12/2,s8,x4/8,pn/h,x9/6,pd/g,x0/3,s9,x1/7,pj/h,x6/12,pk/f,x7/10,pi/n,x12/0,pb/k,x14/3,pc/g,x7/1,po/n,x4/10,s11,x3/8,s9,x12/6,s13,x7/10,pb/k,x13/5,pc/a,x7/15,s2,x9/12,s14,x11/2,s10,pb/j,x14/5,s14,x4/10,s12,x6/14,s3,x3/13,po/n,x14/7,pb/m,x9/2,pa/k,x14/8,pc/l,x6/10,pj/m,s9,x13/12,pn/a,x15/1,s14,x5/8,pm/c,s1,x11/0,pn/d,x5/14,pc/b,x9/1,s14,x2/8,pi/l,x13/15,s14,x11/2,po/b,s11,x12/10,s12,x7/4,s7,x14/13,pd/n,x6/12,ph/m,x3/10,pp/f,x0/2,pl/g,x5/6,s3,x2/12,s11,x6/5,s11,x13/2,s8,x10/1,s7,pp/d,x11/14,s3,x9/13,pk/o,x2/12,s11,x4/7,s7,x15/2,pl/j,x1/12,s1,x5/9,s12,x12/15,s15,x3/7,s2,x5/8,s14,x2/10,po/m,s9,x5/7,s13,x11/9,pk/g,x3/14,pb/m,x5/2,pk/p,x4/11,s7,x3/6,s4,pe/h,x5/10,pn/j,x0/13,pg/k,x3/11,s11,x4/8,s13,x2/7,po/p,x5/9,pi/f,x8/4,s3,pn/j,x3/13,s2,x12/14,s5,x1/5,s8,x11/15,pf/c,x14/10,s10,x12/0,pa/d,x15/8,s8,x3/0,s15,x1/10,s11,x2/14,pb/n,x5/10,ph/j,x2/12,s12,x8/0,pa/d,s1,x9/15,pm/g,x14/4,s5,x11/9,s14,x14/0,pj/f,x15/6,s14,x9/13,s14,x7/4,s3,x12/10,s4,x9/13,pd/l,x10/6,pe/f,x0/13,pm/h,x6/1,s1,x12/9,pf/p,x2/14,s11,x8/7,ph/l,x15/3,s15,x11/5,pf/p,x15/2,pm/g,x0/10,pe/n,s11,x5/8,pl/o,x0/7,pa/e,x14/10,s11,x15/5,s13,x9/6,pl/o,x14/7,s5,x8/13,pp/m,x0/3,s12,x1/10,pd/l,x15/11,pj/f,x14/10,s5,x1/3,pl/p,x4/7,s8,x12/9,pe/m,x8/14,pa/n,x3/12,ph/o,s10,pi/e,x5/0,pm/g,x3/14,s8,x12/8,s13,x3/13,pc/j,x1/14,s2,x10/6,pe/f,x7/4,s13,x15/12,s7,x2/7,s1,x11/0,s6,x10/7,pd/n,s5,x4/0,s2,x12/10,s13,x9/2,s8,x14/13,s2,x12/0,pk/m,s14,x1/10,pj/c,x9/15,pm/p,x5/14,s5,x0/13,s11,x12/15,s7,x0/13,pl/i,x4/5,pn/o,x8/6,s5,x5/1,pp/b,x14/15,pc/m,x4/3,s3,x5/7,pb/f,x6/8,pi/l,x11/0,pb/a,x6/14,s4,x8/13,s9,x9/7,s9,pc/o,x2/14,s9,x15/10,pl/i,x2/1,s15,pp/b,x8/13,pk/n,x3/11,s11,x6/4,s1,x15/13,pd/i,x5/7,s8,x15/14,s4,x12/3,s4,x13/2,s4,x10/3,s10,x1/14,s14,x9/0,s1,x8/14,pp/o,x0/11,pd/c,x12/9,s3,x14/6,s13,x4/11,s2,x9/12,pn/e,x0/6,pk/l,x11/4,s9,pd/c,x7/9,po/a,s14,x14/4,s10,pd/j,x6/15,s4,x4/11,pl/h,x1/8,pj/k,x2/10,s14,x14/1,pl/o,x11/0,s4,x13/10,ph/e,x1/6,s8,pm/j,x0/8,pc/o,x15/10,pf/m,x7/3,s10,x15/0,s1,x6/1,pe/l,x13/7,s10,x8/1,s12,x4/6,s11,x5/15,s15,x14/7,pb/g,x0/12,pf/o,x1/9,s8,x0/7,s10,x1/11,s7,x4/15,pl/j,x3/9,s9,x14/15,s12,x9/1,s7,x5/8,pm/n,x6/13,pk/b,x0/7,s8,x11/10,s3,x13/12,pn/h,x10/4,pa/p,x13/15,s12,x4/14,s13,x2/1,s5,x15/10,s10,x9/3,po/m,x15/11,s11,x8/6,s1,x11/9,s7,pb/l,s8,x8/0,s15,x15/5,s14,x8/10,s5,x15/14,pf/h,x10/13,s14,x5/9,pm/c,x14/8,s9,x9/7,pg/a,x1/11,s14,x8/3,pm/n,x9/4,s4,x2/6,s3,x3/5,pf/a,x9/0,pp/k,x13/14,s1,ph/e,x1/5,s13,x3/15,s5,x12/9,s3,x7/11,s1,x6/12,pm/b,x10/11,s7,x4/1,pn/l,x6/5,s6,x12/7,ph/o,x0/8,pg/f,x12/6,s5,x0/2,s1,x10/9,pa/c,x6/1,s12,pl/j,x4/15,pi/o,x3/11,s6,x6/9,s7,x2/8,ph/j,x9/12,s14,x6/4,s6,pm/k,x13/15,s10,x9/11,pp/c,x7/6,s2,x11/10,s15,x14/8,pl/i,x4/5,ph/c,x13/12,pl/g,x8/11,pd/p,x4/9,ph/e,x12/6,s5,x13/10,pn/c,x3/5,s5,x1/8,pk/d,x14/6,s10,x4/3,s10,x12/11,s2,x5/2,pi/j,s14,x11/15,s9,x1/9,pm/k,x10/15,pp/f,x5/4,s4,x2/7,s5,x10/13,pn/o,x1/11,s10,x0/12,pe/b,x5/4,s15,x12/14,pc/i,s2,x13/4,s14,x14/1,s1,x2/4,ph/m,x14/1,s15,x3/13,pc/b,x14/9,s4,x6/8,s9,x12/14,s5,x10/9,pa/k,x14/13,s3,x5/7,s4,pj/i,x6/4,s1,pe/a,x8/5,s14,x12/9,s9,x13/14,s11,x3/15,s3,x13/11,s6,x12/7,pc/m,x8/11,s11,x10/1,s10,x15/12,pp/g,x3/4,pm/c,x15/13,s12,x10/8,s8,x5/12,pj/h,x13/4,s7,x11/9,s15,x10/12,s7,x2/11,pf/m,s13,x15/4,s4,x5/3,s4,ph/p,x4/8,s6,x9/14,pa/b,x5/4,s11,x11/8,pf/m,x15/7,s7,x4/2,s4,x15/9,pp/g,x5/7,s1,x13/11,pd/m,x5/0,s6,x3/8,pb/e,x12/2,s3,x3/6,s15,x13/2,pg/o,x5/1,s9,x10/13,s1,x2/14,s5,x10/6,s9,x5/1,pj/h,x10/3,pc/b,x2/8,pd/j,x12/1,s9,x13/8,s12,x15/12,s5,x8/9,s15,x13/0,s9,x2/11,pm/i,x8/10,s3,x14/0,s10,x10/8,s12,x2/5,s8,x1/14,pa/d,x2/0,s3,x14/9,s15,x1/0,s8,x13/7,pi/g,x0/1,s10,x10/13,pl/d,s7,x2/8,s10,x0/15,s12,x4/3,pi/k,x11/5,s3,x7/2,s15,pg/f,x4/0,pp/c,x10/15,s10,pj/a,x4/2,pg/o,s13,x9/8,pi/f,x5/7,s12,x12/9,pe/m,x2/6,s5,x11/0,s8,x6/12,pd/a,x0/2,s7,x9/7,ph/e,x14/11,pl/c,x4/3,s11,x7/0,pd/b,x8/2,s7,x15/13,pf/p,x9/11,s9,x0/10,pd/g,x2/4,pa/j,x3/8,s5,x12/1,s12,x15/5,pb/e,x9/10,pj/p,x6/5,pm/k,x11/7,pd/h,x4/0,pf/b,x10/5,pn/a,x14/11,s14,pj/l,x7/1,s9,x5/13,pg/h,x1/11,po/c,s11,x7/12,s12,x2/14,s2,x15/10,pb/d,x8/13,po/h,x12/6,pl/e,x9/11,s6,x14/15,s13,x12/13,ph/d,x9/7,s5,x11/10,pj/b,x5/13,s12,x2/11,s3,x5/6,s11,x10/4,s2,x13/11,s15,x0/2,pa/n,x12/13,pb/h,x14/3,pf/e,x9/6,s8,pj/l,x12/13,pd/k,x15/0,s5,pg/m,x14/10,pe/k,x4/3,s14,x1/9,s1,x15/0,s5,x3/8,s10,x2/1,pn/i,x0/4,s10,pj/p,x7/5,s15,x3/14,s15,x7/5,s4,x15/6,s10,x7/3,s2,x8/12,s13,x10/14,s15,x3/12,pg/i,x1/9,s6,x4/3,ph/b,x0/5,s5,pa/c,s7,x15/8,s8,x0/10,s9,x9/12,s6,x11/7,s2,x15/1,pm/p,x8/2,s15,x3/4,s3,x6/5,pa/f,x14/8,pm/b,x15/11,s2,x0/3,s6,x12/9,pi/e,x15/7,pp/n,x4/2,s15,x15/0,pf/g,x13/14,pj/m,x1/0,pe/i,x10/11,pp/d,x15/6,s2,x10/13,pj/o,x12/9,ph/e,x14/10,pm/a,x3/0,s4,x15/4,s11,x14/8,pp/n,x6/0,s3,x10/3,s3,x13/0,s7,x5/2,s2,x1/13,pk/j,x9/10,pn/a,s14,x13/8,pc/k,x6/10,pi/j,x3/12,s2,x9/8,s7,x3/1,pl/e,x12/15,po/m,x5/1,s1,x2/7,pk/l,x3/15,s10,pi/c,x11/10,s15,x12/0,pj/g,x8/7,pi/k,x11/15,s6,x1/13,s11,x14/8,s11,x13/5,s2,x15/4,s9,x1/9,pm/p,x3/11,pb/g,s13,x9/0,pl/k,x6/2,pb/f,x11/4,s14,x8/3,s6,x4/6,s10,x13/15,s9,x9/6,s6,x14/4,pd/i,x10/12,pl/h,x11/13,po/n,x6/9,pg/p,x14/7,s1,x0/11,s13,x9/3,pi/j,x14/1,s8,x8/13,s12,x4/11,s8,x13/3,pd/e,x6/7,s10,x2/5,s11,x9/14,pl/g,x15/1,pn/a,x14/12,s8,x1/15,s11,x6/9,s8,x3/7,pd/g,x11/0,pj/b,s10,x8/1,pa/m,x4/10,pe/d,x2/6,pg/b,x13/0,s14,x3/12,s11,x9/15,s6,x14/10,pk/p,x6/3,s7,x13/15,s10,x10/3,pa/e,x4/0,s13,x3/7,pl/n,s5,x5/15,pj/b,x0/1,s10,x12/13,s2,x0/6,pl/g,x3/12,pm/c,x5/1,pn/p,x4/6,pk/d,x8/2,s6,x14/12,pi/l,x3/9,s12,x6/5,s1,x2/10,s12,x12/3,pe/n,x15/4,pf/l,x12/14,pb/d,s13,x7/9,s4,x11/3,pe/f,x6/13,po/j,s8,pe/h,s12,x11/12,s15,x1/3,pl/g,s12,x10/13,s9,x5/8,s6,x0/6,s4,x5/3,pj/m,x10/2,s13,x15/7,pe/g,x5/3,s12,x1/9,s12,x2/14,s4,x11/0,s11,x2/7,pi/k,x11/9,po/b,x14/13,s11,x2/12,s10,x6/5,s11,x8/11,s14,x3/4,s3,x12/8,s2,x11/6,s8,x7/5,s9,x3/9,s13,x10/14,s2,x2/0,s8,x5/7,s5,x14/2,s1,x4/13,s5,x14/8,s2,pp/m,s15,x13/1,s5,x6/7,s4,x11/12,s5,x14/3,s2,x8/10,s7,pb/f,s1,x7/6,s7,x15/9,s13,x13/12,pg/h,x3/4,s13,x13/9,s5,x12/6,pk/c,s10,x8/1,s11,x14/0,pm/p,s12,x2/1,pb/h,x0/4,pm/l,x13/6,s3,x5/14,s14,x10/3,po/j,x0/9,s12,x1/5,s9,x8/4,s1,x12/6,ph/g,x10/11,s5,x12/9,pd/n,x1/14,s6,x11/4,pi/e,x2/1,pn/f,x11/13,s1,x5/0,s2,x6/9,pa/e,x0/10,pg/f,x13/15,s9,x5/11,po/c,x15/13,s15,x1/7,pp/l,x6/15,pg/k,x12/14,s7,x10/1,s12,pf/i,x2/7,s9,x13/4,pl/d,x14/10,s10,pm/k,x15/1,pd/e,s1,x11/12,s2,pg/o,x6/9,s14,x14/2,s4,x8/10,s4,x4/14,s15,pa/k,x3/11,s14,x14/15,pl/c,x8/3,s13,x5/1,s14,x14/8,s13,x3/7,pf/p,x13/8,pg/l,x7/6,s2,x11/9,ph/o,x0/2,pd/e,x4/6,s5,x7/2,s2,pj/i,s5,x5/12,s13,x0/10,s5,x7/8,s1,x4/1,s6,x7/9,s10,x3/15,pd/p,x2/11,s9,x0/10,pa/f,x15/4,s1,x6/10,pb/p,x4/14,s7,x2/13,pg/c,x12/10,s1,x13/4,s1,x1/7,s4,x4/5,pn/k,x11/10,pj/i,x1/0,s7,x14/6,s9,x11/5,s10,x4/13,s7,x1/12,s9,x3/14,s13,x0/1,pc/d,x11/10,s7,x8/2,s2,x5/11,s8,x15/6,pf/j,x10/0,s5,pm/d,s5,x7/5,s6,pg/a,x1/9,s4,x3/14,s14,pj/k,x12/10,s4,x15/3,pn/p,x6/11,pa/d,x10/8,s15,x9/11,s2,x2/3,po/g,x12/15,s15,x0/13,pj/p,x4/9,s6,x15/11,pk/g,x5/12,s3,x9/4,pj/a,s6,x0/14,s12,x12/7,pm/k,x2/0,s7,x6/1,pa/l,x14/5,s12,x1/4,s10,pn/g,x14/10,s8,x6/8,po/p,s8,x1/10,pc/a,x9/2,pg/h,s15,x10/11,pc/m,x14/4,s8,x11/7,s13,x9/12,s1,x6/2,pj/b,x1/12,s1,x10/6,ph/i,x3/13,s10,x2/7,s9,x14/4,s8,x3/5,s7,x7/8,pk/m,x12/15,s14,x0/9,s6,x5/4,s13,x0/11,s15,x15/14,pa/h,x4/9,s10,x5/0,s1,x13/14,s8,x12/15,s6,x2/4,pp/l,x5/6,pk/o,x13/3,s3,x8/10,s5,x11/12,ph/a,x5/0,s2,x6/13,pp/m,x5/2,pe/d,x6/13,po/n,x7/9,s13,x14/8,pm/f,x1/11,s6,pj/i,x2/9,s10,x15/5,pf/l,x14/9,s6,x15/1,s2,x4/8,pm/o,x15/13,s10,x8/1,pc/b,s6,x3/7,s1,x13/2,s4,x4/1,s4,x2/11,pe/m,x14/4,s10,x7/9,pd/k,x2/13,po/c,x3/9,s10,x13/8,s14,x4/7,s5,x2/0,pb/f,x12/6,pe/p,x11/9,s9,x12/7,pm/i,x4/3,s6,x2/13,pg/j,x12/0,s3,pl/b,x11/13,s10,x15/8,s2,x9/5,s4,x6/10,s2,x5/13,s13,x7/11,s15,x4/2,s8,x0/11,ph/p,x5/2,pm/n,x4/0,pe/l,x13/8,s13,x10/6,pp/b,x7/9,s14,x1/0,po/i,x3/13,s5,x8/12,pm/e,s10,x9/0,pp/k,x4/13,s8,x5/10,s5,pc/d,x14/4,s5,x12/10,pj/l,x13/11,s2,x8/1,s11,x3/12,s6,x10/2,s6,x0/12,s15,x9/7,pb/p,s7,x2/3,s11,x8/1,pk/m,x5/15,pf/d,x11/6,s10,x1/8,s11,x10/9,pm/p,x7/11,pn/b,s5,x13/6,s2,x8/9,s5,x7/13,s13,x4/1,s12,x3/9,pd/f,x13/14,s8,x2/0,s10,x10/14,pb/h,x11/1,s2,x15/3,s5,x10/6,s11,x8/1,pm/g,x11/12,pa/b,x5/4,s12,x7/12,pg/o,x1/15,pn/d,x13/9,s7,x2/4,s4,x12/14,pm/i,s5,x8/11,pb/g,x9/0,s6,x1/14,s3,x4/9,pd/i,x2/6,s14,x3/7,s4,x8/13,pf/k,x6/9,s7,x10/14,s3,x8/9,s8,x0/15,s1,x8/9,pl/n,x11/12,s12,x3/9,pc/a,x11/4,s2,x1/12,s12,x4/10,pb/l,x3/8,s3,x0/1,s1,x10/8,s6,x7/6,pn/e,s6,x9/8,s12,x7/5,pm/k,x14/0,pb/i,x12/5,s1,x15/3,s14,x6/10,s15,x15/11,pa/f,s7,x3/4,pj/h,s9,x8/2,pb/g,x4/3,s15,x2/11,s9,x1/4,s2,x0/12,pf/c,x13/10,s11,x5/14,s8,x9/0,s9,x11/8,pj/n,x2/15,s8,pf/k,s10,pb/j,x10/6,s13,x13/2,pg/n,x11/10,pi/j,x6/0,s12,x10/9,s10,x12/2,s11,x7/13,pa/d,x3/15,s2,x11/12,s11,x10/5,s6,x8/12,s8,x5/15,s15,x13/6,s3,po/i,x11/12,s9,x15/1,pb/f,s2,x12/6,s9,x13/4,s5,pp/d,x5/2,s6,x0/6,s9,x9/11,s14,pa/o,x15/3,s8,x9/1,s8,x11/12,pe/i,x6/3,s8,x0/4,po/f,x7/11,pm/n,x15/8,pg/o,x12/3,s8,x14/8,pk/b,x12/1,s8,x9/4,s7,x10/12,s12,x4/6,pe/d,x10/2,pb/c,s15,x4/12,s10,x9/1,po/n,s8,x3/2,pm/g,x4/1,pi/p,s11,x13/15,pk/a,x9/0,pe/m,x15/14,s4,x6/7,pl/k,x10/13,s14,x7/3,pg/e,x11/1,ph/k,s9,x15/7,s11,x14/9,pc/i,x6/15,pn/f,s6,x9/3,pk/c,x1/8,s2,x9/4,s8,x7/13,s3,pa/o,s11,x14/15,pm/e,x11/8,s1,x6/0,pb/k,x11/15,s14,x12/6,s4,x1/8,pa/h,s9,x5/0,s4,x10/9,s3,x0/4,s1,x12/7,s8,x5/15,s3,x11/0,s1,x5/12,s7,x0/6,s14,pd/c,x3/7,pa/n,s5,x12/4,s2,x3/13,pg/e,x2/15,s10,x4/1,s12,x8/15,pn/l,x3/14,s4,x1/15,pe/j,x5/4,s6,x14/7,s2,x12/13,pc/g,x2/3,pn/b,x0/6,s9,x10/2,pc/a,x15/8,pf/g,x10/11,s1,x8/13,pe/h,x4/6,pj/g,s15,x9/12,pm/l,x15/10,s8,x7/12,s8,x6/9,pn/i,x4/0,pd/a,x3/1,s7,x2/4,s1,x10/0,s4,x9/11,pe/k,x12/15,s13,pf/i,x14/11,s2,x0/15,s11,x12/13,po/k,x1/7,pi/j,x5/2,pk/m,x0/10,s2,x5/4,pp/d,s6,x8/12,pe/c,x0/14,s6,x11/6,s9,x9/7,s7,x6/0,s10,x5/2,s5,x14/11,s12,x0/4,pp/a,x9/12,pm/d,x14/6,s2,x15/4,pl/c,x11/12,s4,x7/5,po/j,x14/1,s12,pn/e,x10/4,pm/a,x2/13,s10,x12/6,s2,x9/2,s4,x3/6,s6,x2/0,s15,x11/14,pn/c,x15/13,s4,x14/0,s4,x11/9,s13,x2/6,pm/b,s8,x15/1,po/n,x9/10,s10,x5/0,pg/j,x2/8,s13,x0/15,s7,x9/1,s3,x8/6,s9,x4/0,po/l,x14/5,pd/h,x8/4,pa/l,x13/11,s7,x15/14,pb/n,x10/8,pj/f,x15/13,s13,x6/5,s15,x1/11,pd/o,x3/9,s4,x14/11,pb/m,x5/15,pa/h,s6,x1/11,pj/b,x5/14,s15,x15/3,s11,x5/12,pa/m,x9/11,s1,x10/1,s5,x12/11,pc/i,x4/1,s6,x11/13,pl/f,x1/6,s11,x15/11,pi/h,x7/10,s14,x2/9,pd/m,x8/1,s13,x0/3,s3,x7/12,pj/e,x2/14,s7,x9/12,s4,x1/10,pp/g,x9/13,s14,x12/0,s13,x1/3,pi/o,x5/9,s5,x4/12,pf/m,s15,x11/3,s11,x13/4,po/k,x5/0,s11,x7/13,pl/d,x15/11,s14,x13/6,s14,pe/o,s11,x12/14,s14,pc/j,x5/7,pa/g,x6/15,s1,x14/3,pd/j,s15,x1/8,s14,x2/6,s3,x1/0,pb/n,x14/6,pg/e,x4/13,s4,x7/0,pf/n,s10,x6/12,pj/o,x9/14,s10,x11/1,pi/m,x7/8,pf/d,x11/14,s10,pm/b,x4/5,s9,x9/7,po/j,x4/15,pi/b,s4,x8/2,s1,x3/13,s12,x15/1,s11,pm/d,x11/8,s1,x12/6,pf/g,x1/7,pm/p,x15/5,s11,x8/14,pl/h,x0/1,pe/a,x4/10,pm/p,x6/12,po/f,x7/2,pp/m,x14/3,s4,x10/15,pa/f,x0/14,pc/b,x7/11,s1,x15/9,pa/o,x3/5,pd/e,x11/6,po/m,x15/12,s5,x10/6,pb/h,x2/12,s5,x10/4,pg/i,x14/12,s4,x8/1,s13,x3/13,pj/b,x5/0,s3,x6/14,pg/m,x7/3,s4,x10/1,pb/l,s12,x8/15,s6,pm/f,x6/9,s14,x14/3,pg/k,x5/12,pd/n,x6/14,pj/f,x10/12,s1,x14/1,pc/g,x10/7,s11,x4/14,s9,x3/15,s12,x12/11,s8,x5/1,s6,x2/13,s5,x6/8,pm/k,x14/5,pf/p,x0/11,s12,x7/13,s3,x3/14,pj/h,x6/2,pe/k,x4/7,po/h,x3/8,s5,x14/10,s12,x12/4,s7,x13/14,pm/i,x4/0,po/d,x12/7,pp/b,x15/10,s7,x8/5,pl/a,x6/10,s7,x13/15,s6,x3/8,s11,x13/12,s13,x14/6,pb/m,x13/9,pe/j,x15/11,pb/f,x5/13,s3,x4/1,s3,x12/7,s5,pk/c,x15/10,s11,x1/13,s15,x9/5,s1,x14/3,pn/p,s10,x7/15,s2,pl/d,x0/2,pa/m,s7,x1/13,s10,ph/e,x6/12,pn/a,x3/15,pg/i,x10/8,pd/o,x7/13,pc/a,x10/0,pi/b,x3/12,pc/h,x15/1,s1,x0/11,pe/f,x3/15,pm/k,x8/4,pf/b,x7/10,s3,x2/13,po/k,x6/1,pl/h,x7/3,s6,pf/o,x8/1,s10,x14/13,pl/p,x4/8,s5,x14/5,pb/o,x13/2,pf/c,x9/1,pk/o,x6/11,s4,x7/0,s6,x3/11,s3,pc/b,x2/5,s15,x4/15,pm/o,s11,x7/5,pb/n,x12/10,s11,x13/15,pp/c,x8/14,s12,x3/1,s1,pe/g,x4/14,s6,x3/13,pc/p,x10/8,pn/e,s11,x4/11,s1,x7/10,s4,x5/14,pd/g,x2/12,s5,x3/13,s14,pp/b,x14/4,pk/n,x3/1,pd/g,x11/10,pe/p,s6,x9/8,s10,x11/3,s1,x5/10,s13,x8/15,s2,x12/9,s1,x0/10,pa/i,x1/9,pd/o,x5/12,s13,x2/0,s10,x13/9,s14,pb/p,x0/10,pa/h,x9/5,s3,pm/k,x4/8,s10,x6/10,s4,x11/3,s12,x4/7,s13,x9/6,s5,pd/i,x7/10,po/l,x4/14,s1,x0/2,s6,x1/5,s9,pm/c,x14/4,pp/n,x2/5,pl/k,x15/4,s2,x1/14,s9,x0/13,s14,pm/i,s1,x8/2,s10,x12/13,s1,x8/2,s3,x6/1,pb/e,x4/3,s2,x2/12,s6,x0/5,po/j,x8/4,pi/a,x10/2,pp/f,s5,x4/8,pl/g,x1/0,s8,x12/3,s3,x5/15,s4,x3/0,pm/n,x11/6,s5,x14/13,s14,x6/3,s7,x2/1,s15,x7/6,s14,x5/9,s9,x1/15,s9,x6/0,s12,x7/9,s13,x13/12,s14,x14/9,s15,x8/13,s5,x5/14,s8,x11/13,pj/b,x2/3,pn/o,x15/5,s4,x6/13,s6,pd/l,x9/8,s1,x0/14,s10,x6/5,s2,pp/i,x12/9,s7,x14/2,ph/f,s4,pi/l,x15/11,s12,x13/2,pn/h,s6,x4/10,s15,x13/6,s15,x15/8,s5,x4/14,pf/i,x3/7,po/g,x2/4,s5,x14/8,s10,x9/3,s4,x2/13,pf/a,x15/11,pd/c,x12/13,s1,x10/11,s12,x1/7,s10,x14/15,s10,x6/3,s12,x9/15,s14,x3/10,s11,pa/b,x14/2,s12,x5/13,s5,x9/2,pn/k,x7/1,s7,x4/5,s13,x13/6,s5,x15/3,s4,x13/1,pa/h,s8,x3/4,pm/e,x5/10,pb/g,x3/15,pe/i,s7,x4/5,s2,x2/15,s1,pm/a,x6/0,s5,x13/11,pp/b,x5/9,s6,x2/10,pk/o,x1/13,s3,x10/14,s1,x6/5,s11,x2/7,pg/i,s12,x13/9,s8,x2/10,s11,pm/a,x5/14,pg/o,x11/4,s11,x6/13,pd/p,x4/5,s1,x10/13,s15,x0/2,s1,x3/10,s4,x5/9,s11,x3/13,s13,x5/9,s1,x11/8,s14,x14/4,s9,x12/6,pm/f,s15,x7/2,pc/k,x5/6,s14,x13/1,pa/i,s10,x4/9,ph/c,x6/5,s1,x11/14,s1,x9/13,s14,pa/j,x7/14,pi/b,x12/10,pd/a,x0/11,s15,x12/7,pb/i,s12,x9/15,pe/f,x5/3,s7,x10/4,pg/i,s2,x1/6,s15,x8/14,po/j,s10,x9/11,pe/d,x2/3,s11,x14/10,s5,x13/3,pm/l,x7/15,pn/e,x12/6,s12,x8/5,s1,x1/14,s5,x6/7,s2,x3/12,s3,x5/15,s4,x13/3,s2,x11/2,pd/b,x7/0,s10,x13/8,s6,x6/5,s13,x7/8,pg/l,s10,x11/9,pn/a,x8/1,pm/f,s14,x15/14,s14,x2/9,s12,x13/11,s8,x5/2,pk/o,x7/11,pf/j,x15/13,pi/m,x1/7,s15,x13/14,s3,x12/0,s4,x6/1,s9,ph/l,x8/2,s4,x12/10,pm/n,x11/1,pl/j,x2/6,s7,x8/5,s7,x15/13,s6,x8/7,s2,x2/3,pk/p,x0/9,s9,x6/10,po/e,x3/14,pa/p,x8/15,s6,x3/7,s12,x14/9,s13,x2/8,pi/c,x13/15,s6,x1/3,pp/j,x5/10,s8,x15/1,po/f,x13/6,s13,x10/12,pp/j,x2/7,s14,x5/4,pe/a,x3/11,s9,x13/9,s10,x5/11,pg/n,x9/7,pa/l,x1/14,s6,x9/10,s14,x13/3,pn/o,x15/9,s3,x11/10,s7,x13/3,s7,x12/10,s1,x7/14,s4,x9/15,s8,x8/7,s3,x5/14,s7,x11/13,pc/g,x4/9,pi/n,x2/3,s11,x11/10,s13,x5/12,pf/e,x3/2,s4,x10/1,s12,po/m,x9/0,s6,x2/14,pl/f,x12/3,s6,x9/2,s10,x15/6,pi/c,x2/7,s7,x14/0,pl/m,x13/1,pe/p,x9/2,pb/j,x8/1,s11,x3/11,s4,x15/12,s7,x14/9,pg/l,x3/0,pa/p,x13/4,s5,x1/8,s10,x10/3,s6,x6/12,s8,x10/7,s1,x9/13,pk/h,x2/7,s15,pi/b,s5,pe/j,x12/6,pn/k,s14,x4/5,pi/b,x14/15,s15,x7/1,pc/a,x8/10,s6,x0/1,s4,x7/9,s10,x13/1,ph/l,x15/11,pg/a,x7/3,s4,x15/1,s1,x14/7,s13,x6/15,s8,x0/10,pm/o,x4/6,s8,x3/13,s2,x9/6,pg/p,x3/11,pi/k,x6/14,s7,x7/10,pe/l,x8/15,s9,pg/c,x7/11,pf/d,x2/8,s12,x15/11,s6,x5/9,pk/i,s5,x7/10,pa/g,x12/8,s5,x7/15,s6,x13/1,pf/b,x3/7,ph/n,x15/13,s4,x9/4,pc/g,x3/2,s12,x11/12,pm/o,x14/6,s6,pj/i,x3/4,s7,x12/0,pk/b,s11,x15/1,s14,pn/d,x11/0,pg/m,x12/1,s4,x5/7,s8,x9/15,s3,pj/h,x0/1,s10,x2/4,pd/m,x13/14,s11,pb/p,x3/10,s5,x15/8,pm/c,x4/14,s4,x5/8,s2,pa/h,x14/2,pe/i,x15/10,pp/b,x14/5,s15,x13/7,s12,x5/6,pa/c,x11/12,s9,x10/5,s7,x0/13,ph/f,s10,x3/12,s8,x15/2,pp/a,x5/0,s14,x13/11,s2,pn/e,x15/0,s11,x4/13,po/c,x2/5,s13,x11/1,s5,x12/2,s15,x15/13,s14,x9/5,s10,x13/12,pn/e,x10/8,pk/i,x0/9,s8,x2/10,s1,x8/0,po/c,x10/14,pb/h,x0/5,pn/i,x14/10,s2,x3/6,s8,x1/10,s15,x2/0,s13,x15/8,pc/h,x2/3,s15,x5/9,s11,pb/a,x14/4,s10,x13/7,s11,x6/2,s1,x5/4,pj/e,x9/3,ph/l,x15/4,s3,x5/0,s4,x10/3,s4,x4/14,pm/d,x13/9,s3,x15/7,s6,x9/14,s8,x2/10,s7,x0/4,s4,x11/6,pp/a,x13/4,s4,x0/12,s9,x14/8,pc/n,x4/2,s14,x11/9,pj/k,s14,x15/10,pd/g,x6/7,s8,x8/15,s8,pm/j,x11/1,pg/a,x5/8,pk/i,x10/2,s13,x5/14,s15,x1/15,pl/m,x5/14,s3,x10/3,pj/g,x13/9,ph/p,x5/2,pi/o,x15/12,s11,x6/10,pg/l,x8/5,s8,x4/13,pe/k,x3/0,pn/j,x2/5,s3,x10/8,pd/m,s10,x2/12,s14,x0/7,s10,x15/3,s15,x6/13,s14,x4/0,s15,x11/6,s2,x3/13,s8,x4/14,ph/k,s2,x15/6,pe/o,x3/14,s11,x1/7,s7,x2/11,pa/l,x3/0,pf/o,x4/7,s10,x11/6,pg/i,s6,pj/n,s14,x9/4,ph/d,x2/12,s13,x13/0,s13,x3/8,po/p,x14/11,s1,x0/10,pj/m,x12/1,s10,x15/11,pn/a,x2/14,ph/j,s3,x10/11,s12,x6/15,s3,x11/14,pp/c,x5/6,s4,x14/12,s8,x7/15,s2,x10/2,pl/m,x0/12,po/n,x8/5,s3,x4/14,pi/a,s13,x12/5,pd/j,x15/2,s13,x14/7,s5,x5/3,s13,x11/6,pa/c,x4/12,pp/e,x14/0,s13,x8/11,s6,x14/13,s10,x2/11,pk/i,s9,ph/f,x5/9,s5,x7/12,pk/a,x11/8,pb/n,x15/0,s3,x6/4,pl/m,x12/11,s10,x4/15,s15,x13/10,pj/p,x8/14,pg/m,x4/3,s10,x0/2,s15,x6/4,s14,pd/f,x3/12,s3,x14/9,pp/l,x3/15,s10,x4/14,pi/d,x12/1,s1,x4/11,s3,x14/3,s2,x5/8,s12,pj/p,x2/10,s3,x3/12,s14,x11/1,s1,x13/3,s5,x6/0,pl/g,x4/2,s6,x14/10,s11,x0/11,ph/j,x14/2,s13,x3/11,s5,x10/7,s8,x15/12,s8,x4/5,s10,x13/14,s11,x5/8,pg/p,x1/7,s13,x11/8,s8,x1/4,pf/h,s5,x9/12,po/k,x1/4,s10,x3/7,s8,x9/8,s13,x5/1,s11,x13/14,s2,x8/10,pf/e,s1,x12/9,po/k,s10,x11/15,s6,x7/1,s6,x8/9,pe/p,s13,x10/3,s2,x8/9,pb/c,x2/15,s11,x7/11,s3,x9/10,s15,x6/7,s5,x10/13,pa/e,x7/11,s10,x12/10,pm/l,x8/13,s9,pj/n,x15/11,pf/i,s11,x7/2,s14,x0/10,s15,x1/5,s7,x8/3,s8,x5/11,s15,pl/h,x4/2,s10,x6/8,s8,pb/g,x12/2,s11,x6/11,s6,pc/j,x14/12,s5,x6/8,s9,x11/9,s13,x12/5,s5,x3/14,s12,x1/0,pd/b,x4/5,s3,x0/6,s5,x14/15,pa/e,x7/1,s6,x11/15,s13,x14/1,s15,x10/6,pm/i,x13/2,pl/n,x6/15,pj/i,x5/7,s3,x0/8,s4,x2/9,s11,x1/3,pg/c,x11/15,pf/k,x0/9,s11,x10/7,pl/d,s11,x14/1,s1,x0/7,s12,pp/e,x10/6,pf/d,x9/4,pj/c,x7/0,s12,x14/3,s1,x9/12,s2,x15/11,s2,x12/14,s12,x4/5,pp/d,x15/12,po/h,x13/9,s4,x3/6,pa/g,x8/10,po/d,x12/14,s7,x13/9,s4,x7/12,s7,x1/6,pg/m,x2/4,s11,x5/9,s7,pc/i,x13/2,s4,x6/15,pg/o,x8/11,s15,x4/6,s5,x10/12,pe/b,x9/14,pc/a,x4/6,s10,pg/f,s5,x12/9,s9,x13/15,s9,x0/5,s10,x8/10,s1,x6/5,s9,x2/0,ph/e,x4/14,s12,x2/11,pd/k,x13/9,s4,x7/4,ph/n,s11,x8/13,pp/i,x6/11,s2,x5/15,s4,pl/c,x12/3,s10,x1/15,pg/n,s9,x11/4,s3,x9/8,s7,x11/15,s10,po/f,x5/0,s15,pa/g,x14/3,ph/m,x15/12,s8,x8/2,s3,x1/6,s1,pf/b,x7/3,s12,x11/12,po/g,x13/4,s4,pi/n,x6/9,s4,x5/13,pj/f,x6/10,s7,x3/11,s3,pg/p,x1/15,po/k,x6/0,s11,x13/2,pe/m,x0/5,s15,x1/14,s7,x2/6,pf/l,s6,x15/9,s15,x8/12,pg/o,x10/1,s8,x7/9,pa/e,s9,x0/13,pj/d,x15/9,s5,x11/4,s4,x5/7,s15,x12/1,s14,x11/15,s3,x10/0,s13,x9/14,s11,pb/h,x8/12,pn/f,x0/14,pp/l,x8/13,s10,x2/1,s11,po/f,x14/8,pn/j,x2/5,pc/h,x7/10,pn/e,x8/15,s15,x12/11,pd/l,x13/3,s9,x1/11,s3,x12/13,pb/k,x2/9,pd/m,x7/5,pf/g,x13/11,s12,x14/2,s10,x3/13,pj/e,x7/15,s2,x9/10,pc/d,x6/8,s10,x7/9,pm/e,x12/6,s10,x7/8,pp/a,x0/9,s2,pj/i,x8/1,s15,x7/10,s10,x0/3,po/g,x13/14,s4,x15/3,s11,x4/8,s2,pp/d,x7/11,s1,x9/8,s3,x15/5,s15,x3/12,s12,x9/14,pa/j,x8/0,s7,x4/5,pk/o,x7/3,s9,x6/0,s10,x4/7,pe/i,s8,x13/8,s4,x9/0,pd/k,x5/13,s8,x10/15,pf/a,x11/9,s5,x6/7,s3,x5/11,s3,x15/1,pb/d,s11,x2/8,s15,x3/15,pg/c,x2/8,pl/k,x0/9,s9,pg/h,x7/4,pa/f,s3,x13/3,pd/i,x6/12,s2,x13/9,pa/n,x0/5,s5,x3/12,s15,pl/k,x7/6,s1,x2/11,s14,x3/4,s9,x14/12,s15,pj/i,x4/3,pg/p,x15/0,po/a,x7/3,pp/n,x15/4,pd/o,s4,x5/13,ph/c,s3,x1/3,pj/i,x7/11,pd/g,x9/10,po/i,x11/5,pk/h,x8/2,s4,x0/12,pf/l,x9/5,pa/g,s2,x13/3,pk/c,x11/0,s10,x3/8,s10,x10/1,pg/o,x3/11,s11,x9/12,s4,pm/n,x3/14,s5,x15/0,s4,x10/12,ph/b,x15/0,pj/o,x2/1,s6,x9/10,s11,x7/12,pm/l,x1/8,pi/e,x2/12,pb/f,x1/10,pm/j,x14/4,pf/h,x2/3,pc/d,x13/1,s4,x4/7,pk/g,x3/6,s9,x0/14,s6,x6/11,s1,x10/1,s5,x11/12,pp/o,x14/3,s13,x7/5,s8,x11/4,s12,pk/e,x6/5,po/m,x1/15,s3,x8/4,s15,x1/5,s4,x4/15,s9,x13/3,pg/d,s2,x7/5,s9,x13/2,pk/n,s3,x9/4,s1,x0/6,s15,pb/i,x14/10,pl/j,x1/12,pp/i,x14/15,s14,pn/m,s9,pj/b,x6/3,s12,pe/k,x1/10,po/b,x13/6,ph/l,x5/8,pk/e,x6/15,pn/b,x13/7,pe/f,x10/15,s14,x8/5,ph/b,x15/2,pj/k,x9/5,s12,pi/o,x0/2,s13,x4/12,pe/c,x9/5,pg/h,x3/2,pa/m,x0/10,s10,x12/9,pc/g,x1/5,s15,x6/12,pl/m,x1/8,s4,x11/10,pb/k,x12/14,pg/i,x0/7,pj/e,s1,x12/8,s12,x7/11,pm/p,x14/8,pl/e,s14,x9/2,pk/d,x8/10,s9,x6/4,s5,x2/1,pn/j,x5/7,s2,x9/10,s12,x8/12,s7,x3/10,s2,pp/l,x7/11,pf/a,x14/8,s15,x15/4,po/k,x14/2,s7,x11/5,pc/b,x1/9,s1,x8/11,s13,x1/15,pj/p,x9/7,pe/a,x11/0,pg/i,x9/15,s13,x4/8,pa/l,x13/14,pg/d,x15/1,s10,x7/11,s3,x4/3,s9,x7/14,pi/k,x15/9,s3,x8/6,s6,x14/5,pa/m,x8/9,pc/f,s5,x5/6,s11,pi/l,x11/4,s13,x8/7,pm/c,x12/15,pl/g,x0/2,s3,x11/8,ph/m,s3,x3/14,s3,pn/j,x10/4,s5,x6/5,s9,x9/10,pm/i,x0/7,s5,x8/6,pg/e,x11/12,s7,x14/4,s7,x1/8,pn/d,x12/3,pl/f,x5/10,s12,x0/11,s8,x7/3,pg/j,x0/13,s15,x14/9,s2,x8/4,po/p,x13/10,pn/f,x15/9,s8,x5/2,s2,pg/o,x9/11,s7,x12/0,pl/c,x13/11,s11,x7/9,po/j,x5/13,s4,x9/6,s9,x11/5,s1,x1/2,s15,x3/5,s8,x10/15,pb/n,x2/1,s7,x10/4,s1,x3/5,pd/p,x12/1,s1,x11/8,s1,x6/10,s3,x15/1,pf/k,x5/2,pn/h,x3/12,pp/o,x11/5,s11,x3/10,s3,x8/0,s13,pc/d,x15/11,po/a,x13/2,ph/l,s8,pb/i,x1/12,pe/o,x13/5,ph/n,s6,x2/3,s7,x14/1,s13,x8/15,s5,x4/13,pi/b,x8/2,s10,x10/9,ph/k,x6/14,pc/n,x9/12,ph/a,x7/8,s4,x11/1,s10,x12/2,s1,x0/5,po/l,s11,pa/d,x1/14,s13,x10/13,pg/e,s4,x1/7,s5,x4/13,pf/h,x2/6,pi/p,x10/3,s13,x0/5,pg/l,x10/8,s4,x15/2,s15,x13/4,pk/c,x3/14,s5,x4/11,s13,x8/6,s7,x5/2,pi/g,x14/13,s8,x11/5,s9,x10/15,pc/b,x8/2,s15,x5/0,pm/p,x13/4,s11,x5/9,pe/c,x11/0,po/d,x7/9,s6,x11/0,s5,x13/12,ph/k,x3/15,s6,x2/6,s13,x1/10,s14,x9/5,s9,x10/7,s1,x15/6,s7,x4/11,s7,x7/6,pa/j,x0/14,pe/g,x9/6,s7,x10/3,pi/l,x15/12,pk/g,x6/13,s15,x15/1,s3,x11/8,s8,pa/n,x7/15,s10,pi/p,s15,x1/13,s13,pc/a,x8/12,s9,x11/4,pl/m,x14/8,s10,x9/15,pj/p,x7/3,s4,x9/15,pn/b,x6/8,s4,x11/1,pa/g,s9,pk/i,x4/12,s8,x0/13,pn/j,x14/10,s2,x15/7,s5,x9/8,s15,x5/1,s15,x4/11,s6,x8/15,s12,x10/14,s14,x6/1,po/m,x10/3,s6,pe/i,x1/13,pc/l,x4/9,s2,pg/p,x2/13,s9,x3/6,s13,x10/13,s11,x0/8,pe/m,s5,x2/9,pi/c,x13/6,pm/h,s14,x5/4,pa/e,x15/7,s12,x13/2,s6,x1/4,s4,x11/5,s5,x9/14,pn/f,x12/5,s12,x9/0,s3,x15/3,s4,x10/9,po/j,x7/4,s12,x14/5,pb/h,x10/11,po/j,x14/4,s4,x11/5,s12,x12/15,pb/n,x5/13,pl/e,x14/12,pj/m,x3/6,s2,x4/12,s3,x9/5,ph/o,x1/4,s7,x6/5,s2,x0/8,pc/m,x12/4,s13,x7/1,s14,x9/4,s13,ph/k,x10/3,pe/d,x5/7,pb/n,x1/11,s7,x14/12,s4,x5/8,s15,x9/2,s2,x8/10,s15,x4/1,pd/a,x8/3,pk/b,x2/11,pg/o,x15/5,s2,x1/6,pp/n,x0/5,pf/g,s1,x14/12,s11,x2/6,pj/l,x3/7,s1,x4/15,ph/a,x3/6,s14,x2/12,pi/p,x15/13,pd/m,x3/2,pg/l,x5/13,s9,x4/14,pj/c,x5/13,s6,x0/7,s10,x8/10,pm/i,x12/4,s13,x10/0,s2,x5/6,s4,x3/7,pl/j,x12/10,s6,x9/6,s5,x14/8,s2,x1/2,s12,x6/12,pn/m,x11/7,s3,x0/12,s11,pb/p,s15,x10/8,s12,x4/1,s6,x15/5,pi/a,x9/1,s14,x15/5,s11,x8/12,po/g,x4/9,s3,pn/m,s14,pl/f,x3/2,pa/p,x14/4,s9,pe/n,x11/2,pc/b,x13/10,s14,x3/11,s3,pp/d,x14/15,s13,x11/9,s14,x0/12,s7,x6/14,s2,x8/9,s2,x2/10,s13,x14/11,pe/n,x9/6,s5,x5/0,s9,x11/14,ph/d,x1/12,s3,x9/0,pb/c,x6/1,pl/m,x7/0,s5,x2/8,pc/e,x9/11,pk/m,x0/4,pi/p,x7/9,s3,x11/4,s5,x9/15,s10,x7/14,ph/n,s8,x9/5,s14,x8/12,s3,x5/7,s7,x12/3,s7,x13/7,pi/d,x8/2,s15,x3/13,s11,x8/15,s2,x12/7,s13,x3/4,s11,x15/0,pl/o,x4/2,s10,pb/d,x7/8,s12,x10/3,s3,x5/0,pl/k,x9/2,s11,x10/7,s11,pi/h,x13/0,pm/j,x11/14,s8,x7/13,pk/c,s2,x6/14,pn/i,x5/1,s5,x10/8,s11,x9/13,s1,pb/c,x8/2,s13,pd/j,x15/5,s2,x3/2,s8,x11/7,s8,x2/1,s5,x9/10,s6,x4/7,s14,x11/15,s3,x1/14,s7,x7/9,s1,x8/13,pb/e,x6/11,pp/i,x2/5,s13,pa/n,x12/13,s2,x11/7,pi/k,x1/5,s3,x11/9,s2,x2/6,pc/l,x12/9,s6,x2/15,pi/a,x6/10,pn/d,x0/1,s11,x15/6,s13,x4/11,pg/f,s7,x6/9,s14,x1/11,po/m,x14/9,s9,x15/6,s10,x5/0,s12,x3/8,s12,x10/4,s13,pb/d,x11/9,pf/e,x8/6,s10,x9/14,s10,x1/10,s5,pl/n,x12/4,pp/f,x15/8,s5,x0/4,s11,x10/12,s13,x11/1,s6,pm/l,x5/2,s9,pf/a,x10/12,s5,x0/13,pk/p,x10/7,s8,x14/11,pj/f,x0/8,pl/b,x3/9,pe/n,x8/5,pm/d,x15/6,s13,x2/13,pp/n,x6/4,s4,x7/13,s1,x2/11,s3,x14/7,pi/a,x4/3,s3,x15/7,s1,x14/4,s6,x7/5,s13,x0/12,s10,ph/b,x3/10,pn/d,x2/1,pk/f,x3/5,pd/e,s3,x11/7,s8,x14/3,s3,x7/8,s2,x4/1,pm/f,x6/11,s4,x10/7,s9,x11/0,pj/i,s5,x3/1,s6,x5/0,pc/d,x11/13,s14,pf/j,x4/12,s6,x14/0,pm/n,x3/5,po/i,x13/12,pk/b,x0/15,s9,x2/5,s9,pa/j,s6,x3/12,s12,x8/2,pe/m,x13/5,s13,x7/4,s2,x2/15,po/h,x8/0,s15,pj/g,x9/12,s10,x13/6,s13,pl/n,x2/10,s6,x5/12,pe/p,x4/11,s13,x2/14,s14,x10/4,pj/h,x2/11,pi/p,x13/5,s12,x9/0,s14,x2/11,s8,x12/15,s7,x8/10,pe/j,x6/11,s12,pp/m,x5/4,pn/k,x7/6,s13,x12/5,s10,x10/0,s11,x1/6,pm/h,x13/9,pa/d,x10/3,s15,x0/13,s11,x6/1,s2,x0/7,s2,x13/14,pp/h,x0/5,pj/d,x7/9,pb/i,s2,x0/14,s4,x4/5,s11,x11/10,s14,x7/12,s8,x5/6,s12,x8/3,pg/m,x2/13,s12,x9/5,pc/o,x3/6,pe/b,x14/2,s4,x0/1,s14,x13/4,s2,x11/9,pa/k,x12/14,s4,x13/4,pg/p,x5/11,pb/d,x8/7,pa/n,x13/6,pd/g,x10/0,s8,pm/n,x13/4,pk/d,s9,x3/5,s6,x1/4,s15,x9/12,pm/b,x5/11,pl/a,x3/8,s2,x2/1,s11,x7/10,s8,po/c,x12/5,s4,x6/9,pl/p,x1/11,s8,x14/12,pa/i,x10/8,pl/e,x7/13,s14,x10/0,s9,x6/4,s14,x10/11,ph/g,x0/9,s4,x6/2,s10,x3/7,s14,x6/5,pj/k,s2,x3/10,s3,x5/8,pp/d,x9/3,s11,x12/6,s11,x8/10,s6,x5/6,ph/n,x4/1,s13,x2/8,pl/p,s7,x6/5,s5,x3/4,s4,x7/11,s15,x13/14,pb/g,x9/8,po/n,s14,x2/15,s13,x12/3,s15,x9/13,pa/f,x3/6,s13,x1/4,pn/b,x7/0,pl/f,x1/10,pa/c,x2/7,s5,x15/14,pj/g,s13,x3/0,s7,pc/d,x12/6,pa/p,x15/8,s13,x0/9,pm/l,x4/12,pk/a,x0/3,pg/i,x2/12,s13,x4/1,pe/p,x6/0,pm/a,x15/2,pe/l,x0/6,po/f,x11/10,s5,x6/0,s9,x11/15,s5,x1/7,s8,x9/3,pg/i,s4,pb/e,x11/6,pl/k,s3,x2/3,pf/b,x1/13,pk/h,x2/5,s6,x3/6,pn/f,x5/1,pe/h,x14/12,pn/j,x10/2,s3,x1/15,s12,x13/3,s12,x1/6,pm/k,x8/15,s5,x10/14,pg/c,s6,x8/2,s14,x4/12,pj/i,x8/0,s14,x13/15,po/e,s15,x7/1,s11,pj/h,x3/5,pb/n,x11/1,s13,x8/9,s10,x0/14,s8,x9/7,s7,x4/12,s6,pc/m,x13/0,s1,x8/15,s1,x0/2,s6,x10/3,s5,x7/12,s4,x1/2,s12,x13/4,s14,x12/2,pe/n,x0/9,s5,x5/15,s8,x3/0,s4,x5/1,pg/k,x4/6,s9,x13/3,s15,x10/7,s6,x9/15,pp/n,x6/11,pd/j,s10,x1/7,s10,x13/10,s15,x4/1,s6,x2/9,pp/h,x11/14,s6,x4/0,s1,x1/5,pn/c,x8/11,s6,pp/f,x0/13,pe/m,x3/8,s9,x2/6,s12,x8/7,s14,x12/1,s1,x13/3,s1,x4/11,s9,x7/2,pn/j,x15/6,s9,x13/9,s9,x3/0,pk/c,x14/10,pf/e,x13/3,s7,x7/4,pk/p,s8,x14/2,s9,x15/3,s13,x5/6,pd/l,x8/2,s5,pm/c,x11/3,pe/g,x6/5,s4,x15/0,s10,x14/9,pc/l,x7/12,pf/i,x14/2,s2,x11/6,s10,x15/12,pg/l,x3/14,pp/h,x9/8,pl/a,x0/14,pi/m,x7/9,s8,pg/c,x2/0,pe/l,s7,x5/6,s15,x9/0,s12,pf/d,x4/11,s12,x15/1,pi/e,x4/14,pb/k,x3/0,s4,x2/14,s9,x1/6,s7,x11/7,s12,x1/10,pp/n,x15/6,ph/k,x4/11,s11,x7/0,po/g,x15/8,s3,x12/14,pl/j,x11/5,pe/d,x6/13,ph/k,s8,x10/4,s7,x14/11,pn/b,x7/1,s3,x10/3,pj/k,x11/4,s4,x13/5,s14,x1/9,s12,x0/6,s8,x15/11,s1,x5/4,po/c,x14/0,pe/k,x5/8,pb/j,x15/14,s2,x0/10,s9,x11/9,s7,x3/0,s12,x5/14,s11,pc/p,x7/2,s3,x12/1,s5,x6/0,s13,x11/5,pm/b,x14/13,pd/j,x7/1,s10,x11/14,s5,x4/13,s12,x10/8,s14,x5/12,s6,x9/4,pm/c,x10/15,s6,x3/0,pk/o,x6/13,s11,x4/11,ph/e,x1/13,s6,x2/0,s13,x3/13,s7,x14/12,s10,pk/p,x8/9,s11,x10/2,s2,x7/6,pa/l,x14/13,s11,x3/15,s3,x12/11,s10,pb/c,x0/6,pe/n,x10/4,pf/c,x2/5,pj/e,x14/13,s12,x7/3,pd/n,x10/1,pc/b,x4/3,ph/k,x9/13,s2,x14/6,s2,x5/9,s5,x2/14,s7,pa/m,x11/0,s13,x7/3,s2,x4/1,pd/l,x7/13,pp/b,x8/4,s6,x10/5,pe/g,s14,x1/12,s12,x11/6,s6,x5/8,s5,x11/15,ph/c,x6/0,po/m,x4/10,s2,pe/d,s15,x11/15,ph/c,x1/9,s6,x3/8,pf/b,x10/11,pp/n,x5/13,pj/g,s4,x12/9,s14,x4/15,s6,x1/9,s1,pp/f,s4,x15/11,pa/g,x14/2,pn/o,s9,x8/3,s12,x6/13,pa/j,x1/10,pc/h,x3/12,s14,x2/5,pk/l,x12/7,pg/i,x2/15,pk/f,x14/5,pd/g,x4/6,pj/n,x10/13,s1,x15/3,s11,x4/8,s5,x15/12,s14,x9/10,pf/b,x8/3,s2,x0/15,s14,x14/7,po/d,x5/0,s5,x8/14,s2,x3/4,s4,x0/2,s2,x5/4,s9,pb/j,x15/9,pe/p,x0/5,s12,x2/12,s15,x13/0,s15,x10/9,s8,x4/6,po/g,x11/15,pc/f,x10/2,s11,x5/11,s12,x2/1,pd/j,s14,x12/5,s14,x11/6,pi/l,x7/5,s9,x6/2,s3,x7/15,s14,x3/2,s10,x0/10,pp/f,x11/14,s9,x10/13,s3,x9/2,po/e,x12/10,s2,x7/6,s10,x8/3,s11,x11/10,pf/j,x1/5,s9,x15/4,pb/g,x11/0,pk/f,x12/14,s10,x8/2,s5,x6/10,pi/n,s12,x0/8,pm/g,x4/13,s3,x6/3,pn/p,x8/9,s15,x3/4,s1,x5/9,pm/a,x1/4,pe/b,x8/13,s7,x6/7,pk/j,s11,x3/1,s4,x2/9,s14,x6/4,s14,pb/l,s13,x0/3,pf/j,x1/10,s8,x12/11,s12,pe/h,x14/15,s10,x13/3,s11,x6/12,s10,x5/0,s7,x10/14,s11,x4/3,pk/j,x13/0,s8,x14/9,s12,x3/13,pi/m,s11,x9/11,s9,x4/3,s9,x12/7,s3,x0/11,s14,x2/8,pl/h,x5/14,s12,x11/7,s13,x12/2,po/c,x11/8,s3,pm/n,s15,x15/10,pl/c,x8/0,s6,x1/6,pb/p,x4/0,s1,x5/3,pd/i,x2/1,pl/k,x4/13,s8,x3/1,s2,ph/p,x11/4,s5,x9/10,s13,x15/14,pl/f,x2/6,pi/e,x10/0,s3,pn/k,x15/5,s6,x10/9,s8,x8/0,pi/l,x7/1,pg/a,x9/8,pb/p,x7/5,pj/h,x10/0,s9,x11/1,s8,x15/8,s8,x3/9,pd/a,x14/2,pf/c,x10/3,s5,x6/5,s8,x0/10,pd/j,x15/2,s4,pn/o,s13,pj/i,x0/9,pl/b,s12,x11/1,po/g,x13/9,pe/k,x0/15,pl/m,x9/14,po/i,s7,x6/13,s8,x8/1,s3,x12/11,s15,x3/13,s12,x5/0,pk/c,s7,x10/9,pf/m,x3/8,s3,x9/7,s8,x0/4,s7,x14/3,s1,x1/9,pg/a,s3,x5/15,pe/f,x6/13,pb/k,x4/3,po/n,x8/14,pg/i,x11/15,pd/c,s14,x1/0,s13,x15/14,s4,x12/5,s5,x15/7,ph/e,s2,x5/13,s4,pg/k,x2/3,pa/n,x15/5,ph/l,s9,x13/9,s13,x0/8,pb/p,x13/2,s9,x11/4,pk/j,x6/5,s7,x7/1,s5,x5/2,pm/p,x9/14,s11,x2/10,pg/c,x8/9,s5,x4/11,s13,pn/a,x9/0,s13,x5/8,s1,x9/0,s2,pi/p,x4/8,s13,x12/0,pb/m,x4/3,s6,pk/i,x7/12,s11,x11/9,pc/e,x15/14,pn/m,x4/8,pc/e,x9/11,pi/a,x14/6,pl/o,x0/12,pa/g,x9/7,s1,x6/5,s1,x9/3,ph/k,x7/5,s10,x11/1,s4,x5/13,s13,x7/9,pb/c,x5/13,pd/a,s5,x1/6,s5,x13/5,s8,x0/12,pj/g,x13/2,s12,po/e,x5/4,pk/d,x9/13,pp/a,x10/5,pg/n,x0/7,s4,x12/2,pi/k,x5/15,pb/e,s13,po/g,x7/11,pd/a,x12/9,ph/e,x8/2,po/n,x12/7,pg/k,x6/5,s5,x12/4,s2,x10/5,pf/e,s4,x8/2,s5,x5/14,s10,x7/15,s5,x2/9,s8,x3/6,s11,x0/8,s8,pm/a,x3/13,pb/l,x8/4,pa/j,x11/6,s6,pn/k,x7/15,s14,x6/8,pj/a,x14/0,s3,x13/8,ph/i,s13,x3/1,pj/d,x10/14,s10,x7/4,pm/h,x13/10,pp/j,x14/9,pa/h,x2/15,s7,x6/1,s4,x0/4,s6,pj/p,x7/9,s13,x6/4,ph/b,x12/11,pd/f,x4/10,pb/h,x13/7,s8,x11/15,pn/d,x14/3,s11,x12/15,s2,x2/6,s5,x15/3,pk/l,x5/12,s2,x14/8,pc/g,x6/7,pf/p,x8/3,s12,x10/11,pm/o,x7/6,s10,x2/1,pp/j,x15/10,pa/n,x1/0,s9,x8/13,pg/e,x0/4,pd/m,x15/14,pc/j,x1/7,s4,x0/6,pb/o,x9/15,s15,x10/13,s2,pj/d,s9,x12/6,s5,x11/15,s7,x1/0,s6,x4/6,s2,x11/5,ph/n,x6/12,s14,x4/5,s6,x15/6,s8,x12/2,pb/i,x6/9,s15,x8/13,s2,x5/1,s6,x0/10,pe/d,x7/8,s10,x14/1,s13,x8/4,s12,x11/5,pb/m,x7/9,s2,x11/6,s11,x12/9,po/k,x11/4,pc/m,x1/8,pf/o,x3/13,s8,x10/9,s3,x13/12,pb/g,s8,x7/9,s9,x11/4,s4,x10/8,pi/m,x13/3,pa/d,x0/15,s6,x11/10,s14,x8/4,s13,x5/15,ph/n,x10/8,s4,x0/12,s1,x11/14,s5,x6/0,pa/b,s12,x1/11,s7,x3/9,pf/e,x13/15,pm/l,s1,x8/5,ph/f,x6/0,pe/m,x7/14,s1,x5/1,s11,x14/12,po/j,x13/15,pk/f,x4/11,ph/j,x5/8,s11,x15/1,s14,x2/13,s5,x14/1,pl/g,x11/2,s9,x8/7,pb/c,x2/14,s9,x9/12,s3,x4/3,s3,x10/11,s6,x1/15,pl/f,s13,x7/11,pm/n,x3/6,pl/p,x10/4,s10,x7/6,s6,x3/11,s8,x5/2,s1,x15/8,pj/g,x10/0,pa/e,x4/2,pp/c,x12/13,s3,x8/15,s5,x4/2,pf/l,x14/5,s1,x12/10,s4,pi/a,x3/2,po/e,x8/7,pi/c,x5/6,s11,x9/7,s3,x13/12,s15,x10/3,s3,x0/7,s7,x6/8,pj/l,x15/11,s14,x9/7,pp/a,s4,pk/g,x1/2,s7,x14/6,ph/i,x0/9,pp/f,s8,x5/3,s15,pc/b,x10/2,s15,x1/3,s6,x15/12,s6,x9/1,pm/f,x12/11,s3,x10/15,pj/k,x3/5,s5,x4/6,s15,x12/1,s11,x14/2,s14,x1/15,pb/d,x2/10,s4,x14/4,s5,x2/7,s15,pk/l,x10/14,pd/b,x0/1,s11,x14/7,pi/l,s3,x1/11,pb/m,x5/7,s12,x4/1,pk/c,s8,x11/2,s8,x1/13,s11,x3/14,pp/m,s15,x8/10,pk/b,x6/7,pf/j,x14/8,s7,x12/7,s6,x4/11,pe/n,s5,x1/3,s13,x5/14,pm/d,s9,x11/12,s8,x2/1,s2,x0/12,pg/p,x15/13,s14,x3/12,s8,x14/6,pe/j,x0/11,s10,x3/4,pp/b,x6/12,s6,x5/2,pc/h,x8/4,pp/k,x14/5,s14,x7/13,s3,x2/10,s3,x11/1,s4,pl/b,s9,x0/12,ph/i,x15/8,s12,pl/p,x5/0,s1,x2/9,s4,x15/4,s14,po/m,x2/14,s1,x4/7,s14,x8/6,s13,x5/10,s4,x3/11,s5,x9/2,s6,x5/10,pd/a,s11,x8/0,s6,x7/13,s4,pg/i,x11/3,s15,x15/13,pk/d,x7/8,pi/l,x1/2,pk/a,x9/13,s2,x12/14,s8,x13/9,s2,x0/15,pg/f,x11/4,pi/o,x0/7,s7,x6/4,pk/n,x14/5,s10,x13/12,pf/l,x3/14,s13,x8/11,pg/n,x1/9,s12,x5/14,s8,x7/3,s11,pf/j,x10/12,pd/e,x13/11,s13,x1/4,pc/n,x7/8,s9,pa/k,s9,x9/1,s9,x7/11,s10,x9/2,s7,x10/15,ph/d,x7/6,pl/m,x3/2,ph/f,x5/10,pp/g,s13,x12/6,pj/c,x10/8,s3,x6/11,pk/o,x12/15,s12,x10/0,pf/l,x6/1,pc/g,x0/4,s1,x15/7,s10,x9/12,pj/n,s12,x4/5,s7,x9/6,s10,x15/10,s10,x4/9,s10,x0/8,s6,x7/3,pm/g,x15/1,s13,x2/7,s12,x6/15,s2,x5/2,s3,x15/14,s5,x4/3,pc/l,x10/9,pa/e,x3/11,s4,x0/13,s2,x15/10,s8,x0/4,pp/j,x14/13,pl/d,s6,x1/6,pe/o,x14/13,ph/c,x0/6,s3,x1/2,pb/e,x4/5,s11,x1/3,pc/o,x2/9,s14,x12/11,pm/j,x1/7,s11,pi/l,x5/6,s12,x15/8,pj/f,x5/1,s9,x11/12,s3,pb/n,x10/2,s10,x1/4,s11,x12/0,s7,x13/7,s14,x0/3,s9,x8/15,pi/j,x0/11,s5,x13/15,s11,x7/11,ph/f,x8/10,pm/n,x13/12,ph/j,x8/10,s6,x7/5,s7,x4/3,pa/o,x8/15,s4,x3/1,s8,x6/10,s9,ph/c,s6,x12/14,s12,pp/i,s8,x4/9,s1,x8/12,s3,x2/6,s14,x4/11,s2,x8/5,s10,x7/4,s14,x8/12,s4,x5/2,s1,x8/9,s5,x7/12,pb/a,x11/3,s14,x13/12,s4,x9/6,pi/l,x15/2,pk/c,x12/7,pa/d,x9/4,s14,x1/14,pm/e,x6/9,s3,x7/8,s7,x6/14,s12,x3/7,s15,ph/d,s9,x6/12,pc/a,x7/11,s6,x8/12,s1,x3/5,s1,pm/p,x8/15,s14,x0/2,pn/d,x14/8,ph/c,x13/12,pg/i,s5,x8/14,pk/m,x15/2,pp/l,x0/12,s5,x2/7,pk/e,x1/13,pi/h,x6/9,s1,x2/12,s13,x7/10,s12,x12/14,po/k,x11/4,s1,x3/8,s1,x10/2,s9,x5/4,pj/h,x13/10,s8,x8/2,pd/p,x6/3,pi/n,s9,x4/12,pj/e,s5,x8/0,s9,x4/5,s12,x10/7,pm/d,x6/8,pe/i,x0/4,pb/j,s11,x3/13,s8,pg/c,x4/11,s9,x14/5,pl/n,x10/11,s6,x5/0,pk/b,x1/3,s13,x13/4,ph/n,x2/8,s10,x11/3,s6,x7/10,po/c,x3/14,pa/k,s1,x11/8,pb/n,x0/12,s4,x5/9,s6,x2/1,s6,x6/8,s3,x5/13,ph/f,x10/1,pb/l,s9,x12/11,s15,x5/15,s8,x3/1,pd/p,x11/0,s7,x9/15,s5,x0/7,pc/n,x12/10,ph/j,x14/9,s2,x15/0,s1,x7/10,pa/n,x2/15,s1,x11/4,s14,x2/6,pj/i,x13/11,s7,x14/10,pb/f,x8/6,s11,x7/12,pm/i,x13/14,pk/o,x7/12,s12,x3/8,pj/g,x13/7,s15,x1/4,ph/n,x0/15,pl/g,x12/5,s15,pd/h,s11,x9/3,pa/n,s2,x12/6,pk/j,x10/0,s7,x3/8,s13,x0/7,pa/i,x12/11,pj/f,x5/1,s11,x13/12,s9,x15/3,pp/m,x9/5,s8,x8/2,pd/e,s8,pm/n,x10/13,s7,pd/h,x4/9,pj/c,x3/7,s10,pa/l,x12/1,s3,x2/3,pi/o,x10/5,s7,x14/0,pl/m,x2/13,s1,x5/7,s7,x14/1,pi/e,s6,x2/15,s12,x9/3,pf/n,s2,x12/13,s2,x8/1,pa/k,x7/14,pe/p,x11/6,s8,x0/9,s6,x2/15,s13,x7/9,s3,x2/10,pc/o,x3/11,s15,x15/9,pp/k,x4/12,s14,x9/11,pl/i,s13,x6/0,s9,x2/14,pc/g,x9/11,s9,x2/12,s2,x0/3,pd/j,s5,pg/p,x9/6,s8,x10/12,s9,x7/5,s8,x14/13,s13,x8/11,pa/l,x1/0,s8,x11/5,pm/n,x3/10,s2,pc/g,x2/4,pj/d,x15/7,pc/b,s5,x10/12,s8,x15/14,pj/i,x4/11,s8,x1/7,s2,x13/3,pe/p,x15/2,ph/i,x7/10,s12,x13/11,s15,x14/1,s9,x6/11,s12,x1/12,s11,x4/9,s2,x12/8,pd/p,x5/3,po/f,s3,x14/1,s1,x0/3,s9,x8/9,s14,x4/0,s5,x2/6,s2,x0/14,s2,x3/12,s2,x15/9,s6,x6/3,s3,x4/7,pd/g,x2/3,s2,x7/0,s7,x11/6,s10,x9/15,s10,x5/3,s6,x9/2,pf/p,s9,pl/c,s14,x7/11,s3,x5/15,s1,x9/11,s6,x0/13,ph/g,x12/14,s12,x7/4,pm/k,x12/11,s4,x3/7,pl/h,x10/14,s2,pj/g,x0/11,s10,x9/15,s7,x1/7,s14,x3/10,s8,x12/1,s12,x2/5,pp/i,x4/6,s9,x8/2,s14,x0/4,s11,x11/9,s11,x13/6,s8,x0/1,pb/e,x10/5,s3,x2/13,s7,x7/15,s6,x6/8,pn/d,x10/14,s7,x13/5,pf/m,x7/0,pg/l,x8/2,s4,x9/0,pa/m,x2/7,s8,x10/0,pb/f,x15/1,s3,x9/10,pk/d,x14/0,s7,x12/1,pf/h,x9/7,s9,x4/11,pi/n,x0/14,s3,x5/2,s8,x11/0,s11,x15/5,pg/a,x4/6,pk/m,s4,x2/11,s4,x3/8,pi/o,x13/4,s6,x14/9,s14,x3/15,pl/j,x0/9,s12,x2/12,s8,x13/8,ph/n,x10/9,s9,x0/1,s1,x12/5,s3,x3/15,s14,x10/2,pi/p,x1/12,pd/b,s3,x11/2,s13,x10/15,s6,x12/3,s10,x6/15,s3,x10/3,s1,x4/13,s6,x14/5,po/m,x7/0,s6,x5/2,s11,x3/13,pb/d,x7/12,s15,x4/15,pp/c,x5/1,pg/n,x14/15,s13,x12/4,s3,x5/7,s15,x11/4,s3,x13/7,pl/k,x4/0,s3,x1/3,s3,x10/12,s7,pe/i,x11/6,s6,x0/15,s7,x14/12,s9,x10/3,pf/p,x1/11,po/c,s10,x3/15,s10,pi/k,x6/4,pm/g,s11,x1/10,s8,x6/13,s7,x2/14,s11,x15/13,s14,x5/2,pf/b,x13/0,pm/i,s7,x1/2,s13,x11/7,s9,x5/9,s10,x11/15,pb/o,x13/10,s11,x2/6,s4,x8/12,s3,x10/13,pc/n,s14,x7/9,pf/m,x6/8,pi/g,x13/9,s1,x15/3,pl/m,x1/5,s5,x3/4,pd/j,x14/9,s15,pe/f,x6/5,s11,x10/11,s11,x7/15,pp/a,s9,x11/14,po/c,s13,x8/13,s7,x7/11,pi/f,x14/6,s6,x10/15,pj/a,x13/6,s14,x7/1,pl/b,x2/14,s10,x3/15,s2,x9/8,po/d,x12/15,pn/h,x4/1,s5,x2/15,pp/f,s6,x10/7,s8,x3/1,s13,x11/5,s5,x2/1,pb/h,x15/0,s12,x10/4,s13,x9/6,s4,x3/4,s9,x9/8,s15,pj/e,s13,x12/11,s1,x8/14,s7,x12/11,po/g,x4/14,pa/e,s12,x6/2,pp/o,x7/10,s1,x11/5,ph/m,x7/1,pn/o,x5/15,pm/i,s12,x9/0,s3,x5/7,pa/n,x10/11,pk/b,s2,x6/14,pi/f,s2,x9/4,s4,x12/2,s6,x13/14,s13,x10/1,pk/e,s10,x6/3,s5,pd/n,x4/5,s10,pe/i,x1/14,s5,x12/10,pj/f,x0/9,pc/d,x13/14,s11,x3/5,pn/l,x6/2,s10,x1/3,s15,x2/14,s1,x4/10,s13,x7/13,s5,x3/1,s8,x7/2,pi/a,s15,x9/14,s14,x11/0,s5,x1/5,pj/c,x10/6,pp/k,x3/13,s5,x11/12,s13,x15/0,pl/c,x4/11,s2,x10/5,po/b,x8/2,pa/m,x0/11,s14,x6/15,s14,x5/12,pg/j,s5,x9/4,s4,x3/12,po/n,x15/11,ph/m,x4/13,pi/e,s12,x3/6,s13,pd/n,x8/11,s11,x3/0,s12,pc/b,x12/1,pf/d,x3/6,s4,x5/13,s2,x2/4,s2,x15/10,po/g,x14/6,s5,x12/8,s12,x3/7,s7,x14/8,pf/j,s5,x15/11,s8,x3/7,s12,x0/8,po/g,x3/10,pe/m,s13,x15/9,s7,x10/8,s8,x14/15,s13,pl/a,x6/2,s9,x7/9,pe/b,x2/15,s14,x3/13,s7,x14/7,s13,x0/4,s14,x13/9,pk/l,x15/6,s4,x13/4,po/c,x2/1,pa/p,x4/9,s14,x15/10,ph/c,x14/12,pj/g,s8,x2/6,s9,x0/1,s9,x7/11,s10,x5/15,pm/e,x9/14,pb/c,x3/15,s9,x6/7,pk/f,s8,x9/4,pg/b,x0/7,pn/j,x11/15,pf/e,x5/13,pb/m,x12/0,s6,x2/9,s7,x5/6,ph/l,s5,x1/0,pg/f,x8/6,pn/d,x0/14,po/a,x2/15,pb/c,s10,x13/4,po/l,x6/1,pc/h,s10,x2/3,pe/b,x12/7,s15,x9/0,s5,x13/8,s1,x5/6,pk/c,x13/11,s10,x7/14,s2,x10/1,s13,x5/14,pe/l,x8/13,po/b,x11/7,s10,x2/0,s4,x9/13,s13,x3/14,s13,x4/10,s14,x14/2,pj/g,x3/1,s15,x11/6,s3,x13/4,s1,x6/1,s14,x4/14,s6,pk/a,x12/11,s11,x9/15,s6,x12/2,ph/j,x0/1,pe/b,x14/6,s10,x13/7,pi/f,x14/2,s14,x12/0,s7,x1/9,pj/h,x14/13,pg/d,x6/12,s15,x1/7,s5,x9/0,s10,x1/7,pc/e,x15/14,s5,x13/0,s10,x15/7,pj/i,s3,x4/0,s14,x7/3,s15,x14/5,pf/m,x2/1,pb/a,x3/6,pe/n,x9/2,pk/i,x10/15,s2,x4/7,s13,x15/13,s11,x2/6,pp/j,x15/11,s15,x14/5,pn/i,x4/12,s13,x2/6,pg/p,x0/3,pd/a,x15/8,pk/b,x9/14,pf/n,s11,x10/12,pl/a,x2/1,s8,x11/8,pf/h,x12/2,pc/e,x11/5,s6,po/m,x13/9,s5,x0/6,s1,x5/14,s5,x2/8,s11,pj/n,x11/15,s2,x2/3,pe/f,x4/15,s15,x3/6,s14,x0/1,s15,x12/11,pa/c,x5/1,s2,x14/9,pn/p,x0/7,s5,x14/5,s7,pd/c,x11/9,s15,x2/8,pi/b,x15/9,pk/g,x7/3,s15,x2/1,ph/o,x14/6,s7,x12/2,s7,x6/3,s4,x2/8,s3,x4/11,s3,x6/8,s5,x14/15,pe/p,x4/10,s3,x2/6,s2,x15/7,pg/o,x8/11,pc/a,x12/15,s14,x7/13,s4,x14/8,pl/h,s14,pb/p,x12/5,pe/a,x4/7,ph/c,x10/2,pj/m,x6/7,pd/b,s6,x4/9,s12,x10/12,pl/p,x3/8,s13,x10/6,pj/b,x14/15,pn/a,x1/8,s13,x14/6,po/h,x12/9,s7,x5/2,s3,x8/12,s14,x5/14,pe/a,x0/1,s1,x12/3,pl/p,s9,x9/2,s13,x11/1,pg/d,x12/2,ph/f,s10,x11/3,s9,x4/2,pd/e,x14/9,pn/l,x13/6,pi/k,x15/1,s14,x6/12,s6,x15/0,s4,x8/11,pp/j,x9/0,pd/e,x11/4,s15,x8/9,pj/i,x15/10,s3,x5/2,pl/h,x15/8,pe/p,x12/4,s9,x8/2,s5,x10/6,s14,x0/9,s14,x5/3,pm/c,x11/1,pd/o,x9/15,s10,x4/8,s14,x6/7,s12,x14/5,s9,x12/11,s2,x10/13,pi/m,s15,x15/5,s7,x10/2,s6,pk/l,x12/6,pd/h,x11/10,s9,x1/14,s3,x7/12,pf/e,s14,x3/2,s5,x0/12,s8,pc/b,x1/8,s5,x6/9,s3,x10/8,po/m,x14/9,s4,x13/15,pn/f,x3/8,s6,x15/0,ph/d,x13/3,pi/l,s13,pa/p,x12/8,pb/j,x5/13,s2,x3/15,s5,ph/p,x4/1,pj/k,x11/2,s1,pl/o,x7/1,s4,x15/12,s3,x10/4,s10,x0/2,s7,x5/4,s10,x10/1,pb/c,s8,x13/8,s3,pd/p,x6/15,s1,x13/4,s3,x0/7,s8,x8/6,s4,x2/3,s5,x9/4,s4,x3/14,s15,x15/1,s12,x2/5,pg/i,x11/9,pc/d,x3/2,s14,x15/10,pj/p,x7/13,pg/f,x12/15,po/n,x5/1,s14,x6/3,s6,x5/4,s13,x0/7,s1,x1/5,s15,x3/8,s1,x14/11,s11,x5/3,s1,x11/4,s10,x14/9,s4,x13/11,s12,x12/10,s2,x9/2,s6,x12/6,s1,x9/1,pd/f,x10/4,pe/p,x12/3,s9,x2/11,s12,x1/12,s3,x3/4,s1,x9/12,pj/n,x11/10,s3,x6/14,s2,x4/8,s7,x11/14,s3,x9/1,s7,x5/13,po/d,x9/10,pj/e,x1/6,s5,x13/3,pc/d,s8,x4/1,pp/n,x10/11,pd/o,x5/13,s4,x10/8,s13,x12/1,s14,x9/2,s9,x4/0,s6,x11/10,s12,x15/5,s9,x12/6,s7,x15/1,s6,x9/8,s1,x5/15,pm/c,x6/14,s1,x1/10,s2,x11/5,s5,x0/3,s6,x14/1,pl/o,x8/10,s1,x2/14,s6,x15/5,pg/i,x3/8,s1,x0/6,s10,x1/14,s10,x13/2,s7,x6/10,s3,x2/15,s14,x11/0,pk/h,x10/12,s3,x1/6,s8,x10/9,pp/m,x5/7,s14,x8/15,s14,x0/9,pa/l,x13/15,pc/g,s13,x1/14,s5,x15/7,s7,x12/3,s5,x15/4,s8,x13/11,pk/d,x2/15,pp/l,x14/1,s4,x8/5,pm/i,x9/11,po/g,x1/7,s15,x9/13,s12,x3/6,s15,pa/n,x7/1,s14,x15/11,pm/p,x14/6,ph/b,x15/2,s3,x4/9,s4,x5/7,s5,x3/13,s6,x11/14,s8,x2/8,s6,x6/0,s5,x1/10,s6,x14/13,s1,x7/8,pm/e,x1/3,pb/j,x15/4,s10,x6/12,s9,x0/10,s15,pk/p,x5/4,s2,x3/9,pb/l,x10/13,s8,x2/15,pa/f,s14,x12/1,pe/k,x4/14,ph/j,x1/3,pd/l,x0/4,pb/k,x7/11,s12,x4/12,s4,x0/14,s8,x1/15,s9,x13/9,s2,x6/7,s3,x12/13,pg/e,x4/6,pf/c,x0/1,s10,x12/13,s2,x9/10,pe/g,x6/2,pl/f,x7/12,s2,x6/10,pj/g,s11,x3/2,s11,x11/0,po/a,x14/9,pg/l,x4/12,s7,x5/11,pm/b,s11,x12/10,po/a,x5/3,s3,x0/9,s6,x15/4,s3,x6/11,s1,x9/2,s9,x10/6,pe/g,s7,x9/2,s8,x10/13,s11,x6/15,s14,x12/11,pm/a,x7/14,po/c,x9/3,s13,x2/5,pd/f,x13/12,s10,pe/n,x4/9,pk/c,x2/5,s3,x8/10,s1,x1/7,s9,x6/14,s6,x8/4,pf/n,x0/9,s13,x14/2,pl/c,x11/8,pd/a,x2/9,s9,x7/5,pm/b,x1/11,s8,x0/4,pc/f,x12/13,s12,x11/6,s4,x4/3,ph/i,x15/1,pm/g,x4/3,s3,x2/8,s13,x14/0,pj/b,x7/2,pg/i,x11/13,pa/f,x15/7,s11,pn/i,x11/6,pd/g,x9/3,s14,x1/4,s6,x6/11,s10,x15/2,s11,x11/1,s10,x6/4,s6,x14/7,s9,ph/n,x5/11,s8,pj/e,x7/9,s6,x6/11,s2,pc/h,x10/7,s14,x9/1,s7,x15/5,pk/o,s3,x14/7,s7,x0/2,s12,x1/14,pp/a,s8,pk/m,x12/8,s12,x9/13,s6,pj/i,x10/6,s12,x4/15,pp/g,x7/5,s7,x14/15,s6,x5/13,s4,x9/8,pe/a,x0/11,s14,x15/2,pm/o,x11/7,s10,pi/g,x8/5,po/m,x3/12,s5,pg/c,x1/8,pd/o,x11/10,s2,x6/5,ph/p,x14/11,po/b,x9/2,s15,pj/i,s15,x12/14,s10,x11/7,pm/p,s5,x10/3,s10,x7/8,s15,x11/5,po/b,s5,x15/14,s10,x3/6,pd/f,x2/10,pm/e,x4/14,s12,x5/11,s8,x12/8,s11,x10/5,s12,x0/8,s3,x5/2,s10,x11/14,s4,x4/7,pl/n,s10,x14/8,s13,pm/k,x10/15,pi/f,s1,x0/14,s11,x2/13,pc/o,x10/4,pi/g,s1,x13/14,pa/j,x9/5,s1,x4/7,s5,x1/13,s4,x5/9,pi/b,x8/11,pj/a,x2/10,pe/f,x4/12,s10,x0/3,s5,x7/12,s11,x11/6,pi/k,x5/1,s1,x0/2,pl/f,x5/15,pp/c,x14/10,pa/k,s14,x7/11,ph/b,x0/5,pe/a,x14/7,ph/i,x0/13,s9,pb/j,x1/9,pc/k,x3/8,ph/n,x10/6,pi/o,x15/7,s15,x0/14,pj/f,s1,x4/5,s11,x12/11,s4,x3/6,s5,x1/12,pp/l,x2/4,s15,x8/3,s7,x7/12,pj/o,x4/13,pe/d,s2,x6/3,s15,x5/8,s14,x3/9,s1,x7/0,s11,x2/8,pp/i,x12/13,s15,x9/11,s4,x3/4,po/n,s12,x2/11,s14,x7/6,s4,x9/14,pm/a,x2/13,s12,x9/14,s14,x5/3,pp/j,x15/7,pd/k,x0/6,s9,x12/11,pn/i,s8,x5/14,s11,x4/10,s7,x11/6,s7,x5/2,s6,x11/7,s2,x0/9,ph/d,x1/2,s7,x3/8,s11,x6/9,po/e,x0/2,s9,x8/7,s12,x4/0,pb/n,x5/11,s4,x8/1,pm/p,x12/5,s6,x2/7,s9,x6/13,pk/f,x15/3,s15,x0/5,pi/j,x11/14,pl/e,x8/4,s10,x12/9,s3,x6/1,s3,x8/9,pg/k,x6/10,s3,x15/3,s1,x8/0,s1,x6/13,pa/h,x8/7,s4,pb/f,x9/2,s10,pi/a,x1/0,pl/j,x14/3,pf/d,x9/1,pe/i,x8/4,pa/f,x7/12,pc/h,x1/10,s13,x9/15,pb/f,x5/1,ph/j,x14/12,s10,pf/p,x8/1,s4,x6/2,pa/b,x3/7,pp/k,x5/11,ph/f,x10/12,s3,x0/8,pk/d,x10/4,pb/c,x0/13,pg/o,x10/2,s14,pb/k,x5/1,s3,x10/9,ph/j,x4/8,s7,x9/7,s6,x1/5,s9,x14/13,s3,x11/6,s15,x13/9,s4,x5/7,pn/b,x10/12,s8,x1/8,s7,x3/0,s9,pj/f,x7/6,s4,x8/1,s7,x12/5,pe/b,s13,x9/13,pn/d,x14/8,pb/f,x4/7,s9,x9/14,s13,x2/11,s15,x6/4,pn/g,x3/9,s5,x8/14,pp/m,x11/7,s6,pi/e,x15/1,s9,x10/8,s1,x6/1,s6,ph/n,x4/8,pd/k,s10,x9/0,s8,pf/g,x4/8,pk/l,s4,x7/0,s2,x1/10,s9,x8/6,pf/b,x3/11,ph/j,x6/14,pk/l,x2/1,pp/m,x4/10,pa/k,x11/8,pg/j,x6/13,pe/k,x11/9,pg/o,s2,x13/6,s1,x14/4,s2,x3/9,s6,x11/13,s7,x14/15,pe/l,x11/6,pf/d,x9/15,pn/h,x2/4,s7,pg/m,x3/15,s10,x4/11,s1,x7/10,po/d,x12/11,s1,x10/9,s1,x8/7,s6,x1/2,s10,x8/5,s14,x13/9,s10,x2/1,pl/p,x7/4,s12,x0/3,pm/k,x8/1,pp/d,x14/15,s15,x6/11,s4,x9/4,s8,x1/12,pj/a,x8/9,s14,x13/5,pd/f,x8/4,s1,x0/15,pm/p,x4/7,pf/e,x3/5,pp/k,x12/10,s11,x4/14,pn/f,x11/13,s3,x8/2,pi/j,x14/13,s1,x12/15,pd/l,x14/4,po/b,x9/6,s4,x10/2,s2,x1/0,s9,x5/7,pk/g,s7,x14/15,s13,x9/4,s9,pa/m,x1/3,pf/e,x6/2,pd/l,x13/9,s5,pj/n,s11,x4/7,pi/f,x10/3,pb/l,x4/7,pj/g,x15/13,s5,x8/7,s4,pk/l,x9/12,s4,x2/0,s9,po/g,x6/4,pb/k,x5/0,s4,x13/4,pe/l,s11,x14/1,s4,x7/11,s11,x10/6,s10,pj/h,s14,x13/9,s15,x4/1,pe/c,x11/15,s15,x5/2,pd/i,x1/3,pb/a,x2/11,s6,x0/12,s9,pj/i,x1/3,pb/e,s13,x6/15,s7,x7/14,pp/h,s11,x3/15,s6,x7/12,s9,x1/14,pl/m,x6/8,pd/j,x2/11,s7,x15/1,s8,x3/6,s1,x15/9,pi/g,x7/1,pd/b,x6/5,s3,x13/4,s1,x0/2,pp/e,x9/15,pa/n,x8/2,s4,x1/7,s14,x11/6,pg/f,x3/1,pl/o,x6/15,pg/p,x1/12,s12,x0/6,pe/b,x15/10,s6,x3/2,s14,x14/1,s6,x9/12,s2,x14/2,s11,x3/5,ph/a,x10/2,s15,x12/13,pg/n,s2,pe/a,x4/11,s15,x15/7,s7,x14/0,s15,x10/9,pd/l,x12/4,s4,x15/5,pn/i,x10/1,pc/j,x5/12,s13,x2/9,s10,x15/10,s12,x11/9,s13,x13/14,pe/a,x15/8,s7,pj/h,x0/11,s3,x10/6,pe/m,x13/5,pc/k,x11/0,pf/j,x6/4,pe/o,x8/0,pj/c,x15/13,s7,x10/8,s10,x5/6,s1,x2/15,s6,x9/4,pb/h,x8/12,pe/o,x7/9,pp/k,s9,x0/2,s5,x8/14,s2,x0/3,pj/m,x4/12,pg/n,s8,x5/1,s7,x4/14,s15,x5/8,s5,x0/14,s9,x9/2,s4,x14/15,pj/l,x0/13,s4,x14/15,pn/k,x1/8,s15,x2/5,po/c,x6/7,ph/a,s6,x8/1,pm/b,s2,x7/13,s7,x6/5,s14,x0/7,s9,x2/1,s7,x15/14,po/e,x3/13,s8,x14/7,pk/c,x15/4,s14,x5/10,s6,pp/m,x11/6,s10,x5/9,s6,x10/11,s4,x13/14,pa/h,s2,x3/5,s10,x6/11,pm/e,s4,x8/3,s14,pj/l,x1/0,s9,pn/i,x11/3,pg/j,x4/10,pk/n,x0/8,pc/p,x3/15,pd/j,x9/7,pg/i,x12/1,s11,x3/8,pp/a,x0/14,pf/j,x12/13,s14,x8/9,pi/m,x13/3,s3,x7/6,pd/h,s2,x8/0,s5,pa/p,x4/12,s13,x1/2,s1,x8/5,pf/k,x11/1,s12,x10/7,s11,x13/1,s3,x2/6,pc/i,x15/8,s6,x14/7,s7,x11/1,pn/h,x13/5,s10,pj/c,x9/3,po/l,x14/0,pj/p,x8/3,s13,x0/7,s13,x1/14,pl/m,x11/10,s15,x4/2,s11,x13/7,s1,pd/j,x1/4,s4,x6/3,s13,x15/7,s9,x0/3,pi/n,x4/5,pm/e,x14/13,po/n,x5/12,pd/i,x7/3,s2,x8/11,ph/a,x3/14,s4,x5/4,pd/c,x12/3,s15,x10/7,s9,x8/11,pf/n,x5/15,s4,x7/10,pm/c,s14,x15/9,pg/o,x1/7,s6,x9/5,s15,x2/3,pp/d,x13/7,pb/c,x1/8,s5,x2/12,s13,x14/13,s10,x15/9,s10,x8/3,s1,x1/11,s10,x3/9,pi/l,x7/5,s10,x14/1,pn/p,s1,x0/4,s14,x12/11,s6,pg/h,x2/4,pc/a,x14/13,s3,x11/6,pl/k,x3/14,s9,x10/2,pm/o,x3/5,pd/k,x13/4,s7,x3/14,ph/i,x13/4,s6,x5/12,s15,x8/15,s11,x9/3,pc/g,x10/14,s9,x8/5,pe/m,s10,x15/11,pk/h,x4/10,pi/a,x0/11,s4,x3/9,ph/e,x11/8,pn/f,x10/1,pb/h,s12,x2/9,s7,x10/15,pp/d,x11/7,s12,x5/15,pk/h,x8/1,s1,x14/15,s7 \ No newline at end of file diff --git a/csharp/BScottDay17.cs b/csharp/BScottDay17.cs new file mode 100644 index 0000000..cd8a645 --- /dev/null +++ b/csharp/BScottDay17.cs @@ -0,0 +1,51 @@ +using System; + +namespace AOC2017 +{ + class BScottDay17 : BScottSolution + { + public override string Name => "Day 17: Spinlock"; + + public override void Run() + { + int input = 355; + + Console.WriteLine($"Part 1 Example Answer: {SpinlockPart1(3, 2017)}"); + + Console.WriteLine($"Part 1 Answer: {SpinlockPart1(input, 2017)}"); + Console.WriteLine($"Part 2 Answer: {SpinlockPart2(input, 50000000)}"); + } + + private int SpinlockPart1(int input, int count) + { + int pos = 0, size = 1; + int[] buffer = new int[count+1]; + + for (int i = 0; i < count; i++) + { + pos = (pos + input + 1) % size; + // move everything over 1 + for (int j = size - 1; j > pos; j--) + buffer[j + 1] = buffer[j]; + // set value, increase size + buffer[pos + 1] = size++; + } + + return buffer[Array.IndexOf(buffer, count) + 1]; + } + + private int SpinlockPart2(int input, int count) + { + int pos = 0, size = 1; + int value = 0; + for (int i = 0; i < count; i++) + { + pos = (pos + input + 1) % size; + if(pos + 1 == 1) + value = size; + size++; + } + return value; + } + } +} diff --git a/csharp/BScottDay18.cs b/csharp/BScottDay18.cs new file mode 100644 index 0000000..86fe893 --- /dev/null +++ b/csharp/BScottDay18.cs @@ -0,0 +1,251 @@ +using System; +using System.Collections.Generic; +using System.IO; + +namespace AOC2017 +{ + class BScottDay18 : BScottSolution + { + public override string Name => "Day 18: Duet"; + + public override void Run() + { + string[] exampleInput = new[] + { + "set a 1", + "add a 2", + "mul a a", + "mod a 5", + "snd a", + "set a 0", + "rcv a", + "jgz a -1", + "set a 1", + "jgz a -2" + }; + + Console.WriteLine($"Part 1 Example Answer: {DuetPart1(exampleInput)}"); + + string[] exampleInput2 = new[] + { + "snd 1", + "snd 2", + "snd p", + "rcv a", + "rcv b", + "rcv c", + "rcv d" + }; + + Console.WriteLine($"Part 2 Example Answer: {DuetPart2(exampleInput2)}"); + + string[] input = File.ReadAllLines("BScottDay18.txt"); + Console.WriteLine($"Part 1 Answer: {DuetPart1(input)}"); + Console.WriteLine($"Part 2 Answer: {DuetPart2(input)}"); + } + + private long DuetPart1(string[] instructions) + { + Dictionary registers = new Dictionary(); + + // initialize registers + for(char i = 'a'; i <= 'z'; i++) + registers.Add(i,0); + + long snd = 0, rcv = 0; + + for(int i = 0; i < instructions.Length; i++) + { + string[] args = instructions[i].Split(' '); + long value = 0; + switch (args[0]) + { + case "snd": + snd = registers[args[1][0]]; + break; + + case "set": + if (long.TryParse(args[2], out value)) + registers[args[1][0]] = value; + else + registers[args[1][0]] = registers[args[2][0]]; + break; + + case "add": + if (long.TryParse(args[2], out value)) + registers[args[1][0]] += value; + else + registers[args[1][0]] += registers[args[2][0]]; + break; + + case "mul": + if (long.TryParse(args[2], out value)) + registers[args[1][0]] *= value; + else + registers[args[1][0]] *= registers[args[2][0]]; + break; + + case "mod": + if (long.TryParse(args[2], out value)) + registers[args[1][0]] %= value; + else + registers[args[1][0]] %= registers[args[2][0]]; + break; + + case "rcv": + if (registers[args[1][0]] > 0) + rcv = snd; + break; + + case "jgz": + if (!long.TryParse(args[1], out value)) + value = registers[args[1][0]]; + + if (value > 0) + { + if (!long.TryParse(args[2], out value)) + value = registers[args[2][0]]; + i += (int)(value-1); + } + break; + } + + // recover operation ran + if (rcv > 0) + break; + } + return rcv; + } + + private long DuetPart2(string[] instructions) + { + Queue programQueue0 = new Queue(); + Queue programQueue1 = new Queue(); + + Program program0 = new Program(0, instructions, programQueue0, programQueue1); + Program program1 = new Program(1, instructions, programQueue1, programQueue0); + + while (!program0.Finished && !program1.Finished) + { + program0.RunInstruction(); + program1.RunInstruction(); + + if (program0.PendingReceive && program1.PendingReceive) + break; + } + + return program1.SendCount; + } + + class Program + { + Dictionary registers = new Dictionary(); + private long pc = 0; + private long sendCount = 0; + private string[] instructions; + private Queue inputQueue; + private Queue outputQueue; + private bool pendingReceive = false; + private bool finished = false; + + public bool PendingReceive + { + get { return pendingReceive; } + } + + public bool Finished + { + get { return finished; } + } + + public long SendCount + { + get { return sendCount; } + } + + public Program(int programId, string[] instructions, Queue inputQueue, Queue outputQueue) + { + for (char i = 'a'; i <= 'z'; i++) + this.registers.Add(i, 0); + + this.registers['p'] = programId; + this.instructions = instructions; + this.inputQueue = inputQueue; + this.outputQueue = outputQueue; + } + + public void RunInstruction() + { + string[] args = instructions[pc].Split(' '); + long value = 0; + switch (args[0]) + { + case "snd": + sendCount++; + if (long.TryParse(args[1], out value)) + outputQueue.Enqueue(value); + else + outputQueue.Enqueue(registers[args[1][0]]); + break; + + case "set": + if (long.TryParse(args[2], out value)) + registers[args[1][0]] = value; + else + registers[args[1][0]] = registers[args[2][0]]; + break; + + case "add": + if (long.TryParse(args[2], out value)) + registers[args[1][0]] += value; + else + registers[args[1][0]] += registers[args[2][0]]; + break; + + case "mul": + if (long.TryParse(args[2], out value)) + registers[args[1][0]] *= value; + else + registers[args[1][0]] *= registers[args[2][0]]; + break; + + case "mod": + if (long.TryParse(args[2], out value)) + registers[args[1][0]] %= value; + else + registers[args[1][0]] %= registers[args[2][0]]; + break; + + case "rcv": + if (inputQueue.Count == 0) + { + pendingReceive = true; + return; + } + + registers[args[1][0]] = inputQueue.Dequeue(); + break; + + case "jgz": + if (!long.TryParse(args[1], out value)) + value = registers[args[1][0]]; + + if (value > 0) + { + if (!long.TryParse(args[2], out value)) + value = registers[args[2][0]]; + pc += value; + return; + } + break; + } + + if (++pc > instructions.Length) + { + finished = true; + return; + } + } + } + } +} diff --git a/csharp/BScottDay18.txt b/csharp/BScottDay18.txt new file mode 100644 index 0000000..46cac61 --- /dev/null +++ b/csharp/BScottDay18.txt @@ -0,0 +1,41 @@ +set i 31 +set a 1 +mul p 17 +jgz p p +mul a 2 +add i -1 +jgz i -2 +add a -1 +set i 127 +set p 735 +mul p 8505 +mod p a +mul p 129749 +add p 12345 +mod p a +set b p +mod b 10000 +snd b +add i -1 +jgz i -9 +jgz a 3 +rcv b +jgz b -1 +set f 0 +set i 126 +rcv a +rcv b +set p a +mul p -1 +add p b +jgz p 4 +snd a +set a b +jgz 1 3 +snd b +set f 1 +add i -1 +jgz i -11 +snd a +jgz f -16 +jgz a -19 \ No newline at end of file diff --git a/csharp/BScottDay19.cs b/csharp/BScottDay19.cs new file mode 100644 index 0000000..6c6adb9 --- /dev/null +++ b/csharp/BScottDay19.cs @@ -0,0 +1,167 @@ +using System; +using System.Collections.Generic; +using System.IO; + +namespace AOC2017 +{ + class BScottDay19 : BScottSolution + { + public override string Name => "Day 19: A Series of Tubes"; + + public override void Run() + { + + string[] input = File.ReadAllLines("BScottDay19.txt"); + + char[][] map = new char[input.Length][]; + for (int i = 0; i < input.Length; i++) + map[i] = input[i].ToCharArray(); + + Console.WriteLine($"Part 1 Answer: {TubesPart1(map)}"); + Console.WriteLine($"Part 2 Answer: {TubesPart2(map)}"); + } + + private const int NORTH = 0; + private const int EAST = 1; + private const int SOUTH = 2; + private const int WEST = 3; + + private string TubesPart1(char[][] map) + { + int currentX = 0, currentY = 0; + int direction = SOUTH; + List letters = new List(); + + // get entry position + currentY = 0; // first row + currentX = Array.IndexOf(map[currentY], '|'); + direction = SOUTH; + + if (currentX == -1) + return String.Empty; + + while (true) + { + switch (direction) + { + case NORTH: + currentY--; + break; + case EAST: + currentX++; + break; + case SOUTH: + currentY++; + break; + case WEST: + currentX--; + break; + } + + if (currentX < 0 || currentY < 0) + break; + + char c = map[currentY][currentX]; + switch (c) + { + case ' ': + return new string(letters.ToArray()); + case '-': + case '|': + break; + case '+': + direction = FindNextDirection(currentX, currentY, direction, map); + break; + + default: + letters.Add(c); + break; + } + + } + + return new string(letters.ToArray()); + } + + private int TubesPart2(char[][] map) + { + int currentX = 0, currentY = 0; + int direction = SOUTH; + int distance = 1; + + // get entry position + currentY = 0; // first row + currentX = Array.IndexOf(map[currentY], '|'); + direction = SOUTH; + + if (currentX == -1) + return 0; + + while (true) + { + switch (direction) + { + case NORTH: + currentY--; + break; + case EAST: + currentX++; + break; + case SOUTH: + currentY++; + break; + case WEST: + currentX--; + break; + } + + if (currentX < 0 || currentY < 0) + break; + + char c = map[currentY][currentX]; + switch (c) + { + case ' ': + return distance; + case '+': + direction = FindNextDirection(currentX, currentY, direction, map); + break; + } + + distance++; + } + + return distance; + } + + private int FindNextDirection(int x, int y, int currentDirection, char[][] map) + { + char north = map[y - 1][x]; + char south = map[y + 1][x]; + char east = map[y][x + 1]; + char west = map[y][x - 1]; + + switch (currentDirection) + { + case NORTH: + if (east == '-') return EAST; + if (west == '-') return WEST; + break; + case EAST: + if (north == '|') return NORTH; + if (south == '|') return SOUTH; + break; + case SOUTH: + if (east == '-') return EAST; + if (west == '-') return WEST; + break; + case WEST: + if (north == '|') return NORTH; + if (south == '|') return SOUTH; + break; + } + + return -1; + } + } +} \ No newline at end of file diff --git a/csharp/BScottDay19.txt b/csharp/BScottDay19.txt new file mode 100644 index 0000000..a31fb28 --- /dev/null +++ b/csharp/BScottDay19.txt @@ -0,0 +1,201 @@ + | + +-----------------------------------+ +-+ +-------------------------------------------------------------------------------------------+ +-+ + | | | | | | | | | + +-----------------+ | +-----+ | +-----+ | | +---------------------------------------------|---+ | + | | | | | | | | | | | + +-------------+ +-+ | | | +---------------+ | | | + | | | | | | | | | | | + +---------------------------------------------------------------------|---------|-----------+ | | +---------------------|-----+ + | | | | | | | | | | | | | + | | +-----+ +-------------------+ +-+ +-------------------------------------------------------------------------------------------+ + | | | | | | | | | | | | | + | +-------|-------+ | +-|-+ +---|-------------------------------------------------------|---------------------------------------------|---+ | + | | | | | | | | | | | | | | | + | | | | | +-|-----|---------+ +-----------------------------------------------------------------|-------------------------|---+ | + | | | | | | | | | | | | | | | | | + | +-----------------------------|---|---|-----|---|-------------------------------------------+ | +-------------------|-------------------------+ +-+ | + | | | | | | | | | | | | | | | | | | | + | +---------------|-------------|-------|-------------|-----------|-----|-------------------------------------|-----------------------------------|---------------------------+ +-+ | + | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | +---|---+ +-----------+ +-+ + | | | | | | | | | | | | | | | | | | | | | + | | +-------------|---------------------|-------|-----|-----------|-----|---------------------|---------------|---------------|-------+ | | | | | + | | | | | | | | | | | | | | | | | | | | | | | + | +---|-|---------------------------|---------------|---+ | | +---|-----|-----------------+ | | +---|-------------+ | | | | | +-+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | +-------------------+ +-+ | +-----------------------------------+ | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | +---------------|-------------|---------------|-------|---------|-----|-+ | | | | | | | | | +-----------|-------------+ | | | + | | | | | | | | | | | | | | | | P | | | | | | | | | | | | + | | | | | | | | | +-|-------------------------|-|---------------|-|---------|-----------|-------|-------|-----------+ | +-------+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + +-------------+ | | | +---------|---------------|-------|-|-----|-----------------|-|-|---+ | | | | | | | | | | +-----+ | +-+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + +-----+ | | | | | | | | +---------------|-----------------|-|-|-------------------------------------------|---|---|---------------------|-------+ | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | +---------------|-------------|---------|-|-----|-------+ | | | | | | +---|-------------+ | | | | | | +-+ | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | +-------|---------------------|---|-+ +---+ | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------|---|-+ | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + +---------------------|-------------|-----|-----|-|-------|-------|---------------|-|-----|-|-----|---------|---|---|-------------|-+ | | | | +---|---|-------------|-----+ | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +---------+ | | | | | +---|-+ | | | | | | | | | | | | | | | | | +---------|---+ | +---|-+ | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +-----------------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | +-----------|-----|-----|-----|---|-|-----|---------------|-------|-|-----------------------|---------------------+ | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | +-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---|-|-----------|-----+ | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | +---+ | | | | | | | +-----+ | | +-|-+ +-------------|-|---|-----------|-------|---|---+ | | | | | +-+ | | | +---------+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | +-|-|---|---|-|---------------------|-----|-|---------------------|-----------------|-----|---------+ | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | +---+ | | | | | | | | | | | | | | | | | | +-|-------------------|-----------|-+ | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-----------------|-------|-----------+ | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | +-----------|-----------------|---|-|-------------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | +-------|-|-|---|-----------------|---------|---------------|-+ | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | +---|-------------|---|-|---|---------------|---|-|-----+ | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | +---------------|-----------|-----|-+ | | | | | | | | | | | | +-|-----------|-------|---|-|-+ | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | +---|-------------------------+ | +-----|-----------|-------|-----------|-|-|-------|---------------|-+ | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | +-------------|---|-------------|-|---|-|---------+ | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | +---------------|-------------|---|-----+ +-------|-------|-----|---------|-----------|---|-|-------------|-|-|-|-----|-------------|-|-|-|-----------|-----|-------+ | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +---|-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | +---|-----|-----|-----------------+ | | | +---------|-+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | +-+ | | | | | +-----+ | | | | | | | | | | | | | +-|-+ | +-+ | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | +-------|-------------------|-----------|---|------------Y--|-------------|---------------|-----|---|-----|---------|---|-----------+ | | | | | | | + | | | | X | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | +---------|---------------------------------------|-----|-----------|---|---------|-|-----------+ | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | +-|-------------------------|-----|-----------|-|-----------|---|-------------|---------|-|---|-|-----------|---------|-|---------------------|-|---------|-------|-----------|-+ | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | +-|---------|-------------|-|-|-------------|---------|-|-----------------|-------+ | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +-----------|-----------------------|-|---+ | +---------------|-------------|---|-|-+ | | | | | | | +-------|---|-----|-|-+ | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | O | | | + | | | | | | | | | | | | | | | | | | | +-|-----|-----------------|-|---|-+ | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | +---------|-------|-|---|-----------------------|-|-|-|---+ | | | | | | | | | | | | | + | | | | | | | | | | | | R | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | +-|---------|-|---------------|-------------|-+ | | | | | | | +-----|-|-|-|-|-------|-|-|-----------|-|-----|-|---+ | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | +---|-|---+ | +---------|-----------|-----------------|---------|-----------------------|-----|-+ | | | | +---------|---|---+ | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | +-----|---------|-|---------------|-------------|-----------|---|-----|-----------|---------|-|---+ +-+ +-----|-|---------------+ | | | | | | + | | | | | | | | | | | | | | | | | | W | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | +---|-----|-------|---|---+ | +-|-|---|-------|-|-------|-----|-+ | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | +-------+ | | | | | | | +-|---------------------|---|-|-|---|-+ | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------------|-|---|---|-|-------+ | | +-----+ | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | +-|-------|---------|-+ | +---+ | | | +-|-----|---------+ +-|-------------+ | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | +-|-|-------|---------------|-------|-|-----------------|-------------|---|-----|-----------------|-|-|-|-----|-----------|-----|---|---|---|-|-----------|-----|-|-------------------------+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | +-------+ | | | | +-+ +-------|---------|-------------|---|-----------------------|-----|-----|-------|---|-----|-----|---+ | | +---|-+ | | | | | | | | +-------+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | +-----|-------|---+ | | | | | +---+ | | | | | | +---|-|---|-------|---|-----|-|---|---------|-----------+ | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | +-|-------------|-----------|---------------+ +-|-----|-+ +---|-----|---|-|-------------|---|-+ | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | +---------|-------------|-----------------------------------------------|-----|-------|---|-----|-----------|---|-------|-----|-|---|---+ | | | +-|-|---|---|---------------|-+ | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | +-----------------------|-|-|-----------------------|---|-|-----|-----------|-|-----------------------|-|-------+ | | | +-----|---|-|---|---+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | +---+ | | +-|-------------+ | | | | | | | +-----+ | | | | | | | | | | | | | | | | | | | | + | | E | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | +-----------+ | +-+ | | | | | | | | | | | | +-+ | | | | | | | | | | | +---|---|-+ | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | +-----------------------|---|-------|-----|-----------------------------------|-|---------------|-------|-----|---|---------|-|-----------+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +-|---------|---|---------------------|---|-------|-----------------------+ | | +-------------|---------+ | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | +-----------+ | +-----|-----|---+ | +-|-------|-|-----------------|-|---------|-------|-|-------------------|---|-------+ | +-+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------|---|---------|-|-|---------|-|-|-----|-----|-|-+ | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | +-----|-------------|-------------|-----------|-|-|---|---|---------|---|---------|---|-|-----+ | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | +-----------|-----|-----|---------+ | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | +-----------------------------------------------|-------|---|-----|-----------------------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | +-------------------------------------------------------|-|-------|---+ | | | +-|-----|-------------|-|---|-|---|---------------|-|---|---|-------------|-+ | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | +-|-----------|-----------|-----|---+ | | | | | | | +-----|-|-----------+ | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +---|---------------------------------|---|-+ +---|---|-|-------|-|-----------|-|-|--H--------|---|-------------------|---|-|-----------------------+ | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | +-----|-|-|-------|-|---------|-|---------|---|---|-------|---|-------------|-----|-------------------|-----|---------|-|-------|-----|-----+ | | | +-|---+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------------+ | | | | +-+ | | | | +-|---|-|-------|---|-------|-|-+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | +---------------------|---|-|-----|-------------|-------------------------------|-|-------------|---------|---------------------------|---+ | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | +-----|-----|-------|---|-----------------|-|---|---|-|-----------------------------------|---------|---|-------|---+ | | | | | +-----+ | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | +-|---------------|-+ | | | +-------|---|-----------|-----------+ | | | +---------|-----|---|-------|-|-+ | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | +-------------|---|-------------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | +---------|-|-|-------------------------|-----------------|---|-------|-|-------------|-|-----|---------|-----|---------|---|-------|-+ | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +-|-|-------|-------|-------------|-------|---+ | | | | +-----------+ | | | | | | | | | | | | | | | | | | | | | +-----+ | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | +-|-----------+ | | | | | | | | | | +-+ | | | | | | | +-|-------+ | | | +-------|---------------|---------|---+ | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | +-----------+ | | | | | | | | | +---|-------------|-----------|-------------|-----------|-|---|---------+ | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | +-|-----+ | | | | | | | | +---------------------|---|-|---|-|---|-------------|-----|---|-----|-------|-|-|---------------|---------------|-----------------|---+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | +-|-------|---|-----------|---------------+ | +---|-|-+ +-+ | | | +-------+ +-+ | | | | | | | +-------+ | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | +-|-|-----------------+ +---+ | | | | | +---|-|---|---------------------|-------|-------------------------------|---|-|-----|---|-------|-+ | | | +---|-----|-+ | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | | | | | | | +-|-----|---------|-------------|-|-------------------------|-|-------------|-------------|---------|-----|-|---|---|-----+ | +-|-+ | | | +---+ | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +-|-|---|-|---------|-------------|---|-----------|---|-----------|-----------------+ | | | +-|---------+ | | | +-----|-----|-|---|-----------|---|-------|---|-|-----+ | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +-|-|-+ | | | | +-----|-|-------|---------------------------------|-------|-------+ +---------+ +---|-----|---|-|-|---+ | +---------+ | | | | | +-|---+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +-|-+ +-----|-------------------------|---|-------+ | | | | +---------|-----+ | | +---------------|---|-------|-------|---|-----------|-------------|-----|---+ + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +---+ | +---------|---------------------|-----------------------|---|---------------|-----|-----------------+ | | +---------+ | | | | | | | | | | | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | +-|-|-------|-------+ | | +-----------|---------|-|---|-----------------------|-----|-----------|---------|---|---------|---|-------------------|-------------|-----------+ | | + | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + +---+ | | | +-------------+ +-----------------------|-+ | | +---|---+ +-----------|-------|-----|-----------|-|-------+ +---|-------+ | +-----------+ | | + | | | | | | | | | | | | | | | | | | | | | | | + +---+ +-----------+ | | +---------------+ +-+ +-----------------+ | | +-----------|-------------------+ | | | | | + | | | | | | | | | | | | | + +-----------|-----------------------------------------------------------------|-|-------------|---|-----------------+ +---+ | | | | + | | | | | | | | | | | | | + +-----------+ +-------------------------------------------------------+ +---N +-+ +-----------------------+ +-------------+ +---+ + \ No newline at end of file diff --git a/csharp/BScottDay2.cs b/csharp/BScottDay2.cs new file mode 100644 index 0000000..2e21459 --- /dev/null +++ b/csharp/BScottDay2.cs @@ -0,0 +1,63 @@ +using System; +using System.IO; +using System.Linq; + +namespace AOC2017 +{ + class BScottDay2 : BScottSolution + { + public override string Name => "Day 2: Corruption Checksum"; + + public override void Run() + { + string[] input = File.ReadAllLines("BScottDay2.txt"); + + Console.WriteLine($"Part 1 Answer: {CalculateChecksumPart1(input)}"); + Console.WriteLine($"Part 2 Answer: {CalculateChecksumPart2(input)}"); + } + + static long CalculateChecksumPart1(string[] rows) + { + long checksum = 0; + for (int i = 0; i < rows.Length; i++) + { + int min = int.MaxValue, max = 0; + int[] cols = Array.ConvertAll(rows[i].Split(new char[] {'\t'}), s => int.Parse(s)); + for (int j = 0; j < cols.Length; j++) + { + if (cols[j] < min) + min = cols[j]; + if (cols[j] > max) + max = cols[j]; + } + checksum += Math.Abs(max - min); + } + return checksum; + } + + static long CalculateChecksumPart2(string[] rows) + { + long checksum = 0; + for (int i = 0; i < rows.Length; i++) + { + int value = 0; + int[] cols = Array.ConvertAll(rows[i].Split(new char[] { '\t' }), s => int.Parse(s)); + for (int j = 0; j < cols.Length; j++) + { + for (int k = 0; k < cols.Length; k++) + { + if (cols[j] > cols[k] && (cols[j] % cols[k]) == 0) + { + value = cols[j] / cols[k]; + break; + } + } + if (value > 0) + break; + } + checksum += value; + } + return checksum; + } + } +} \ No newline at end of file diff --git a/csharp/BScottDay2.txt b/csharp/BScottDay2.txt new file mode 100644 index 0000000..d66042f --- /dev/null +++ b/csharp/BScottDay2.txt @@ -0,0 +1,16 @@ +116 1470 2610 179 2161 2690 831 1824 2361 1050 2201 118 145 2275 2625 2333 +976 220 1129 553 422 950 332 204 1247 1092 1091 159 174 182 984 713 +84 78 773 62 808 83 1125 1110 1184 145 1277 982 338 1182 75 679 +3413 3809 3525 2176 141 1045 2342 2183 157 3960 3084 2643 119 108 3366 2131 +1312 205 343 616 300 1098 870 1008 1140 1178 90 146 980 202 190 774 +4368 3905 3175 4532 3806 1579 4080 259 2542 221 4395 4464 208 3734 234 4225 +741 993 1184 285 1062 372 111 118 63 843 325 132 854 105 956 961 +85 79 84 2483 858 2209 2268 90 2233 1230 2533 322 338 68 2085 1267 +2688 2022 112 130 1185 103 1847 3059 911 107 2066 1788 2687 2633 415 1353 +76 169 141 58 161 66 65 225 60 152 62 64 156 199 80 56 +220 884 1890 597 3312 593 4259 222 113 2244 3798 4757 216 1127 4400 178 +653 369 216 132 276 102 265 889 987 236 239 807 1076 932 84 864 +799 739 75 1537 82 228 69 1397 1396 1203 1587 63 313 1718 1375 469 +1176 112 1407 136 1482 1534 1384 1202 604 851 190 284 1226 113 114 687 +73 1620 81 1137 812 75 1326 1355 1545 1666 1356 1681 1732 85 128 902 +571 547 160 237 256 30 496 592 385 576 183 692 192 387 647 233 \ No newline at end of file diff --git a/csharp/BScottDay20.cs b/csharp/BScottDay20.cs new file mode 100644 index 0000000..87f8dd0 --- /dev/null +++ b/csharp/BScottDay20.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace AOC2017 +{ + class BScottDay20 : BScottSolution + { + public override string Name => "Day 20: Particle Swarm"; + + public override void Run() + { + string[] input = File.ReadAllLines("BScottDay20.txt"); + + Console.WriteLine($"Part 1 Answer: {ParticleSwarmPart1(input)}"); + Console.WriteLine($"Part 2 Answer: {ParticleSwarmPart2(input)}"); + } + + private List LoadParticles(string[] input) + { + List particleList = new List(); + int index = 0; + foreach (string s in input) + { + string[] args = s.Split(new string[] {", "}, StringSplitOptions.None); + + string[] positionArgs = args[0].Substring(3, args[0].Length - 4).Split(','); + string[] velocityArgs = args[1].Substring(3, args[1].Length - 4).Split(','); + string[] accelerationArgs = args[2].Substring(3, args[2].Length - 4).Split(','); + + particleList.Add(new Particle( + index++, + new Vector3D(long.Parse(positionArgs[0]), long.Parse(positionArgs[1]), long.Parse(positionArgs[2])), + new Vector3D(long.Parse(velocityArgs[0]), long.Parse(velocityArgs[1]), long.Parse(velocityArgs[2])), + new Vector3D(long.Parse(accelerationArgs[0]), long.Parse(accelerationArgs[1]), long.Parse(accelerationArgs[2])) + )); + } + return particleList; + } + + private int ParticleSwarmPart1(string[] input) + { + List particleList = LoadParticles(input); + for (int i = 0; i < 2000; i++) + { + foreach (Particle p in particleList) + p.Tick(); + } + + var test = particleList.ToList().OrderBy(p => p.Position.Distance).First(); + return test.Index; + } + + private int ParticleSwarmPart2(string[] input) + { + List particleList = LoadParticles(input); + for (int i = 0; i < 2000; i++) + { + foreach (Particle p in particleList) + p.Tick(); + + // finds anything that duplicates, removes anything with that position. + particleList.GroupBy(txt => txt.Position.ToString()) + .Where(grouping => grouping.Count() > 1) + .ToList() + .ForEach(groupItem => particleList.RemoveAll(item => item.Position.ToString() == groupItem.Key)); + } + + return particleList.Count; + } + + class Vector3D + { + public long X { get; set; } + public long Y { get; set; } + public long Z { get; set; } + public long Distance => Math.Abs(X) + Math.Abs(Y) + Math.Abs(Z); + + public override string ToString() + { + return $"{X},{Y},{Z}"; + } + + public Vector3D(long x, long y, long z) + { + X = x; + Y = y; + Z = z; + } + } + + class Particle + { + public int Index { get; private set; } + public Vector3D Position { get; private set; } + public Vector3D Velocity { get; private set; } + public Vector3D Acceleration { get; private set; } + + public Particle(int index, Vector3D position, Vector3D velocity, Vector3D acceleration) + { + Index = index; + Position = position; + Velocity = velocity; + Acceleration = acceleration; + } + + public void Tick() + { + Velocity.X += Acceleration.X; + Velocity.Y += Acceleration.Y; + Velocity.Z += Acceleration.Z; + Position.X += Velocity.X; + Position.Y += Velocity.Y; + Position.Z += Velocity.Z; + } + } + } +} diff --git a/csharp/BScottDay20.txt b/csharp/BScottDay20.txt new file mode 100644 index 0000000..687ff72 --- /dev/null +++ b/csharp/BScottDay20.txt @@ -0,0 +1,1000 @@ +p=<-717,-4557,2578>, v=<153,21,30>, a=<-8,8,-7> +p=<1639,651,-987>, v=<29,-19,129>, a=<-5,0,-6> +p=<-10482,-248,-491>, v=<4,10,81>, a=<21,0,-4> +p=<-6607,-2542,1338>, v=<-9,52,-106>, a=<14,2,4> +p=<-4468,1178,-6474>, v=<146,44,66>, a=<0,-5,9> +p=<1298,-3391,-2843>, v=<-44,26,113>, a=<0,6,-1> +p=<-36,-1100,4900>, v=<62,22,56>, a=<-4,1,-15> +p=<-357,911,-1551>, v=<-1,16,141>, a=<2,-7,-6> +p=<-582,1505,-1092>, v=<97,-55,30>, a=<-7,-3,3> +p=<-2436,-2689,1860>, v=<-28,83,-39>, a=<17,7,-7> +p=<-483,119,240>, v=<6,22,-25>, a=<2,-3,1> +p=<-546,2,33>, v=<95,-95,15>, a=<-7,10,-2> +p=<-3417,-1789,1419>, v=<112,33,33>, a=<8,7,-12> +p=<-321,1388,-588>, v=<-3,-58,78>, a=<2,-2,-5> +p=<1119,-358,-696>, v=<-83,20,46>, a=<2,0,-1> +p=<-469,3696,-2490>, v=<47,-22,85>, a=<-2,-7,0> +p=<-4152,3464,-2954>, v=<-6,-44,131>, a=<10,-5,-2> +p=<53,-770,-4114>, v=<-91,42,141>, a=<6,-1,0> +p=<-34,-3003,2440>, v=<2,164,35>, a=<0,-4,-8> +p=<691,-6396,4151>, v=<-53,41,-9>, a=<2,12,-9> +p=<5584,3049,-3324>, v=<-38,4,154>, a=<-13,-9,-2> +p=<-4166,-1943,-3545>, v=<13,88,122>, a=<11,-1,1> +p=<826,-4218,4021>, v=<-44,27,-7>, a=<1,10,-11> +p=<306,-3867,-2245>, v=<-51,27,72>, a=<3,9,1> +p=<-2047,-877,-711>, v=<-55,-34,13>, a=<10,5,1> +p=<909,-3612,1692>, v=<73,0,-59>, a=<-12,19,-3> +p=<3094,-306,-1348>, v=<-22,-14,41>, a=<-14,3,3> +p=<3056,-2472,1274>, v=<-130,20,-67>, a=<-3,11,0> +p=<2296,1119,3744>, v=<-60,1,-17>, a=<-6,-6,-18> +p=<1695,-1852,-2665>, v=<-69,21,69>, a=<-2,8,7> +p=<1714,-180,109>, v=<-90,73,33>, a=<0,-6,-4> +p=<-1820,-1719,1648>, v=<96,34,-38>, a=<0,6,-5> +p=<2265,865,4042>, v=<-9,-12,-94>, a=<-11,-3,-12> +p=<802,542,3130>, v=<-42,45,-166>, a=<0,-7,0> +p=<-2800,118,-9698>, v=<7,-76,115>, a=<4,4,9> +p=<-2975,6838,12107>, v=<84,-34,-58>, a=<0,-9,-16> +p=<7875,-7022,137>, v=<26,92,-94>, a=<-14,6,5> +p=<-8785,5298,6402>, v=<178,-98,69>, a=<4,-3,-14> +p=<4480,8203,2517>, v=<-3,-109,144>, a=<-7,-7,-12> +p=<-9275,1903,-633>, v=<156,-19,-36>, a=<6,-2,3> +p=<-3885,-4817,-2418>, v=<92,65,51>, a=<1,4,1> +p=<-2485,4738,-5883>, v=<106,-82,42>, a=<-2,-3,7> +p=<2940,7153,-3188>, v=<41,-133,37>, a=<-7,-4,3> +p=<-3636,4776,-2208>, v=<96,-41,40>, a=<7,-17,6> +p=<1068,-3225,1887>, v=<-18,65,-133>, a=<-3,8,4> +p=<-738,-2238,-423>, v=<-75,-4,109>, a=<10,10,-8> +p=<1257,-138,-3258>, v=<-38,-16,46>, a=<-2,2,10> +p=<-3888,-1776,2895>, v=<108,95,-126>, a=<7,-1,-1> +p=<2832,-117,-402>, v=<-14,-28,53>, a=<-11,3,-3> +p=<81,2067,1740>, v=<-4,33,-27>, a=<0,-12,-5> +p=<-1557,2067,1026>, v=<-25,-66,-48>, a=<9,-3,0> +p=<-689,-910,1754>, v=<31,28,-105>, a=<4,7,-6> +p=<-449,-1216,494>, v=<24,73,-13>, a=<2,4,-4> +p=<-245,-694,1838>, v=<7,-3,-112>, a=<2,9,-6> +p=<-881,1754,1448>, v=<99,-116,-112>, a=<-4,-5,-1> +p=<25,-208,-268>, v=<82,-11,18>, a=<-13,4,1> +p=<-656,788,1357>, v=<9,-73,-80>, a=<5,2,-2> +p=<1577,-1977,-78>, v=<-68,27,60>, a=<-6,15,-7> +p=<2368,-444,517>, v=<-57,-45,-110>, a=<-15,10,10> +p=<1024,-129,-750>, v=<-81,90,3>, a=<1,-11,7> +p=<-3036,-297,-855>, v=<149,42,33>, a=<9,-3,4> +p=<-2929,3781,-2048>, v=<-25,-22,-5>, a=<13,-12,8> +p=<-3228,377,-3750>, v=<72,-150,33>, a=<6,11,11> +p=<3189,-2015,-1151>, v=<-63,74,16>, a=<-6,1,3> +p=<2545,-359,2529>, v=<61,26,12>, a=<-14,-1,-10> +p=<3856,-2567,4093>, v=<-44,110,-32>, a=<-10,0,-12> +p=<-3504,3528,-507>, v=<156,-59,-96>, a=<0,-8,10> +p=<3626,-4867,965>, v=<38,210,-148>, a=<-16,0,9> +p=<111,599,-736>, v=<-64,-25,43>, a=<6,-1,0> +p=<3765,-40,542>, v=<-96,58,-28>, a=<-12,-6,0> +p=<-3174,428,1982>, v=<147,-6,-184>, a=<3,-2,8> +p=<822,-553,533>, v=<1,134,20>, a=<-5,-11,-5> +p=<417,482,-52>, v=<52,-123,100>, a=<-8,10,-10> +p=<2955,4208,-475>, v=<-32,-178,-19>, a=<-14,-6,5> +p=<8787,-4348,-4882>, v=<-140,75,62>, a=<-9,4,6> +p=<-5070,-256,419>, v=<35,87,-13>, a=<8,-5,0> +p=<1223,-1217,822>, v=<-104,-26,-74>, a=<4,4,3> +p=<-3551,1201,1380>, v=<34,8,-44>, a=<5,-3,0> +p=<448,1790,326>, v=<-47,85,-106>, a=<2,-9,6> +p=<-2032,2875,-1224>, v=<49,-46,-24>, a=<1,-3,4> +p=<541,6502,4263>, v=<-66,45,23>, a=<3,-16,-10> +p=<107,3061,8293>, v=<-52,-36,-171>, a=<3,-4,-6> +p=<2370,-3386,-5303>, v=<-29,94,-38>, a=<-2,0,10> +p=<5268,-4034,-3953>, v=<57,38,91>, a=<-11,4,1> +p=<-5298,-218,1573>, v=<-38,43,-7>, a=<10,-2,-2> +p=<-11040,8818,-2207>, v=<140,-97,98>, a=<9,-8,-2> +p=<1110,10762,-5573>, v=<-105,-114,-49>, a=<4,-10,11> +p=<1902,-9902,-8669>, v=<58,127,0>, a=<-6,8,13> +p=<3450,-3962,1303>, v=<-96,-1,130>, a=<0,6,-9> +p=<-313,-1252,-409>, v=<28,41,-37>, a=<0,12,12> +p=<-929,1003,-860>, v=<54,-26,88>, a=<5,-11,-2> +p=<1524,-592,724>, v=<-61,-1,-38>, a=<-13,9,-5> +p=<-1040,-4812,3618>, v=<32,-92,61>, a=<0,14,-10> +p=<1699,831,-5952>, v=<-68,43,113>, a=<1,-4,4> +p=<-8267,3141,5169>, v=<47,-27,-20>, a=<12,-4,-8> +p=<-4142,1755,1968>, v=<-10,-19,43>, a=<8,-2,-6> +p=<3514,-1083,-375>, v=<-21,33,29>, a=<-5,0,-1> +p=<-2921,1953,-2850>, v=<4,-93,87>, a=<5,2,0> +p=<-1436,567,12957>, v=<-109,-17,-188>, a=<9,0,-12> +p=<-5792,-654,-7866>, v=<108,3,154>, a=<4,1,5> +p=<-264,-2379,-269>, v=<116,-5,-18>, a=<-11,16,4> +p=<926,1684,1329>, v=<-71,-64,-49>, a=<2,-4,-3> +p=<3051,222,3505>, v=<-88,4,-15>, a=<-10,-2,-21> +p=<42,2143,54>, v=<53,53,17>, a=<-6,-20,-2> +p=<-1539,2551,-1034>, v=<74,-115,9>, a=<2,-4,6> +p=<1640,324,-2258>, v=<-5,16,108>, a=<-10,-4,3> +p=<1028,2398,2196>, v=<-50,-25,-55>, a=<-1,-13,-8> +p=<732,686,-2723>, v=<12,-126,83>, a=<-5,9,6> +p=<1245,1389,-1735>, v=<-75,47,-9>, a=<1,-12,10> +p=<3582,116,-2932>, v=<-158,14,44>, a=<-3,-2,11> +p=<-940,-3323,-500>, v=<60,95,136>, a=<-1,8,-11> +p=<1568,1997,-1602>, v=<-32,-75,-36>, a=<-5,-3,12> +p=<95,-1729,1134>, v=<-13,59,-20>, a=<1,9,-8> +p=<-1928,903,-1981>, v=<94,-69,150>, a=<6,1,-1> +p=<1012,462,-77>, v=<-86,30,29>, a=<2,-8,-3> +p=<-129,1190,-665>, v=<3,-82,41>, a=<1,0,1> +p=<-843,532,203>, v=<84,-5,9>, a=<-3,-4,-3> +p=<3776,-816,-327>, v=<-130,-17,-4>, a=<0,3,1> +p=<-1705,-2150,7213>, v=<89,104,-99>, a=<-2,-2,-10> +p=<-4286,1823,485>, v=<-92,-63,28>, a=<16,0,-3> +p=<258,-2634,5128>, v=<-60,98,-87>, a=<4,1,-10> +p=<-3042,918,376>, v=<40,75,36>, a=<7,-9,-4> +p=<-270,-522,-620>, v=<137,-90,-85>, a=<-10,9,9> +p=<354,-390,1348>, v=<36,-8,-67>, a=<-4,2,1> +p=<-1614,5802,-2024>, v=<118,-66,86>, a=<-4,-14,0> +p=<894,894,-3668>, v=<26,76,17>, a=<-5,-9,11> +p=<3246,-4938,4696>, v=<-122,69,-44>, a=<-1,11,-12> +p=<-450,-2574,1792>, v=<-18,108,-148>, a=<3,0,6> +p=<-2934,354,352>, v=<148,61,-88>, a=<-2,-6,6> +p=<-491,266,673>, v=<59,-32,-100>, a=<-1,1,6> +p=<-341,501,-952>, v=<55,-72,35>, a=<-3,4,11> +p=<919,-754,-592>, v=<-126,15,32>, a=<7,11,5> +p=<-981,811,1228>, v=<75,-114,-117>, a=<5,6,-1> +p=<-76,356,328>, v=<-21,3,17>, a=<6,-7,-9> +p=<599,-389,488>, v=<-39,61,-43>, a=<-3,-4,-1> +p=<-1216,943,3461>, v=<-43,-8,-53>, a=<14,-6,-19> +p=<1936,335,637>, v=<-53,13,-38>, a=<-8,-4,0> +p=<-1544,2295,-211>, v=<37,-118,32>, a=<7,-3,-2> +p=<-24,1975,365>, v=<-75,-30,13>, a=<9,-11,-4> +p=<-912,2175,1069>, v=<57,-136,-133>, a=<0,0,8> +p=<-2064,-681,-355>, v=<95,68,-78>, a=<4,-3,12> +p=<1000,-1185,-379>, v=<-20,57,0>, a=<-5,2,3> +p=<1856,2591,3797>, v=<-14,8,-159>, a=<-12,-20,-9> +p=<-1072,4215,1421>, v=<-1,-187,-36>, a=<8,-9,-6> +p=<1431,-11643,-115>, v=<3,58,-17>, a=<-2,12,1> +p=<-1065,9846,782>, v=<-93,-33,0>, a=<6,-11,-1> +p=<-207,-9108,-2845>, v=<-15,-7,13>, a=<1,12,3> +p=<10518,-5208,-8422>, v=<-70,133,96>, a=<-10,0,6> +p=<2874,-10512,-2026>, v=<26,69,52>, a=<-5,10,0> +p=<-7305,330,-3586>, v=<87,-89,-68>, a=<5,4,8> +p=<-5940,-3882,2537>, v=<-8,-41,-5>, a=<8,7,-3> +p=<-5784,-2400,1133>, v=<48,-79,-29>, a=<5,7,0> +p=<-5394,13863,5306>, v=<58,-156,-56>, a=<4,-10,-4> +p=<651,7935,1601>, v=<-17,56,-21>, a=<0,-13,-1> +p=<4379,6523,353>, v=<-53,13,12>, a=<-3,-9,-1> +p=<-5917,9526,-4327>, v=<111,-124,72>, a=<2,-6,2> +p=<401,-5372,5111>, v=<-11,158,10>, a=<0,-1,-7> +p=<6095,4612,2927>, v=<-17,-58,106>, a=<-7,-3,-9> +p=<3131,-9467,6515>, v=<-81,103,-86>, a=<0,7,-4> +p=<-17,1152,2743>, v=<2,-47,-40>, a=<0,0,-6> +p=<1327,-1296,3667>, v=<-54,5,-16>, a=<0,4,-11> +p=<-1553,-804,-185>, v=<-34,-3,-68>, a=<8,3,6> +p=<-2393,-5892,-1601>, v=<1,84,66>, a=<8,13,0> +p=<2431,-2232,2695>, v=<-50,19,-38>, a=<-4,6,-6> +p=<-4349,-3948,-365>, v=<70,128,52>, a=<9,3,-3> +p=<-41,-3516,-317>, v=<-72,85,-50>, a=<6,5,5> +p=<-1037,2592,-869>, v=<-68,-82,23>, a=<9,-2,1> +p=<7279,-468,-893>, v=<-102,33,-51>, a=<-16,-1,7> +p=<-53,-1668,163>, v=<-84,83,-70>, a=<7,-1,5> +p=<3444,399,262>, v=<-42,-64,-1>, a=<-11,4,-1> +p=<-1281,-42,430>, v=<-4,-87,-20>, a=<6,8,0> +p=<2016,-1701,-347>, v=<81,91,-49>, a=<-16,-1,6> +p=<1050,420,-11>, v=<39,45,12>, a=<-8,-6,-1> +p=<1722,84,-2699>, v=<-59,-5,107>, a=<-2,0,2> +p=<-231,-1596,-2174>, v=<100,108,-94>, a=<-8,-3,18> +p=<-1056,-1831,1015>, v=<64,-3,0>, a=<-1,9,-5> +p=<454,-3731,-755>, v=<-64,71,-27>, a=<4,11,6> +p=<2754,739,-555>, v=<-95,89,-16>, a=<-4,-12,4> +p=<3254,-1731,2755>, v=<-36,55,-45>, a=<-12,3,-9> +p=<5596,1082,-2740>, v=<-70,-12,-49>, a=<-5,-1,7> +p=<1081,-11833,-3300>, v=<5,87,57>, a=<-2,14,2> +p=<-3609,11722,-570>, v=<31,-118,105>, a=<4,-12,-5> +p=<-2524,-598,2090>, v=<162,18,47>, a=<-5,0,-6> +p=<2201,-633,480>, v=<9,-35,-33>, a=<-4,3,1> +p=<-9489,627,7795>, v=<1,-125,-134>, a=<15,6,-5> +p=<1991,2167,-45>, v=<-75,47,-90>, a=<1,-6,5> +p=<-8194,-1088,-2180>, v=<36,68,43>, a=<11,-2,1> +p=<2936,7522,-395>, v=<-48,2,64>, a=<-2,-12,-3> +p=<2271,-6303,3945>, v=<-119,91,-6>, a=<3,5,-6> +p=<-84,4399,5563>, v=<-52,0,-51>, a=<3,-7,-6> +p=<-714,-4736,1118>, v=<2,-63,-32>, a=<1,11,0> +p=<4256,3804,698>, v=<22,-1,-38>, a=<-8,-6,1> +p=<21,1914,12668>, v=<-1,-19,-38>, a=<0,-2,-18> +p=<1549,662,1018>, v=<-67,-42,-70>, a=<-1,1,2> +p=<2289,172,-1492>, v=<-125,77,87>, a=<1,-8,-1> +p=<-1701,1612,1048>, v=<1,-79,65>, a=<8,0,-11> +p=<-1741,1532,3718>, v=<45,-96,-79>, a=<4,2,-10> +p=<3319,-3068,-1942>, v=<-19,50,57>, a=<-14,10,4> +p=<89,-2428,1658>, v=<-36,102,66>, a=<3,2,-14> +p=<-226,-6162,5431>, v=<102,-61,81>, a=<-5,12,-12> +p=<-6109,5419,-3338>, v=<128,-13,-43>, a=<2,-7,7> +p=<366,4050,806>, v=<10,-52,130>, a=<-1,-3,-8> +p=<-2076,-1241,-3301>, v=<38,34,32>, a=<1,0,3> +p=<588,-1241,-3597>, v=<-15,34,-36>, a=<0,0,7> +p=<2888,-529,-2519>, v=<-60,106,138>, a=<-6,-7,-2> +p=<-1479,1473,-3971>, v=<-11,-8,112>, a=<7,-5,6> +p=<1755,-12,-792>, v=<-89,-44,2>, a=<1,4,3> +p=<-775,3277,2013>, v=<3,-113,47>, a=<3,-3,-12> +p=<-511,-3598,770>, v=<14,27,-23>, a=<1,12,-1> +p=<-940,1847,1177>, v=<45,-71,-30>, a=<0,-1,-2> +p=<2767,2617,-1001>, v=<-20,-14,46>, a=<-9,-9,0> +p=<1345,-325,-1246>, v=<-24,55,83>, a=<-8,-4,0> +p=<-1940,1670,599>, v=<67,-46,16>, a=<8,-8,-7> +p=<250,1805,3029>, v=<41,-47,-58>, a=<-7,-9,-18> +p=<-710,-190,-961>, v=<-7,158,-48>, a=<7,-18,14> +p=<-1358,-1282,-777>, v=<-107,31,-88>, a=<14,2,10> +p=<22,167,-4250>, v=<1,-8,27>, a=<0,0,13> +p=<321,-1535,672>, v=<-12,-18,-55>, a=<0,7,2> +p=<91,351,-64>, v=<-50,20,1>, a=<4,-3,0> +p=<-484,4652,-1697>, v=<23,-83,0>, a=<0,-10,6> +p=<1172,-1627,-1007>, v=<-49,58,-78>, a=<0,1,10> +p=<-1519,-1811,2098>, v=<-4,66,-33>, a=<6,1,-5> +p=<528,-1788,-1536>, v=<3,77,65>, a=<-2,0,0> +p=<804,-1995,-3445>, v=<15,86,136>, a=<-4,0,1> +p=<-4095,1846,3087>, v=<132,-9,20>, a=<4,-6,-13> +p=<5642,-3127,-1820>, v=<-110,89,87>, a=<-9,3,-1> +p=<1567,823,505>, v=<-25,-17,-19>, a=<-3,-1,0> +p=<-4883,873,4105>, v=<77,-71,-33>, a=<9,3,-10> +p=<917,-2127,5130>, v=<-38,192,-61>, a=<0,-8,-11> +p=<-2667,1121,-10527>, v=<-98,31,147>, a=<11,-4,11> +p=<-347,4833,6129>, v=<44,-52,-93>, a=<-2,-6,-6> +p=<-7035,-2655,-8079>, v=<121,-49,120>, a=<6,8,8> +p=<-6603,-319,3089>, v=<-8,43,35>, a=<13,-2,-8> +p=<3845,5169,-5199>, v=<-120,20,-69>, a=<0,-11,14> +p=<533,2257,2897>, v=<-99,-21,-124>, a=<5,-3,2> +p=<-1556,-1315,518>, v=<69,-15,-12>, a=<4,13,-3> +p=<-446,1550,-1567>, v=<27,-14,7>, a=<0,-11,12> +p=<-1873,-1402,-2361>, v=<127,68,67>, a=<-4,-1,2> +p=<-1998,1873,1164>, v=<-11,-50,-74>, a=<7,-2,2> +p=<3377,-2902,-436>, v=<73,89,-10>, a=<-16,2,2> +p=<-3923,-877,3089>, v=<66,47,-112>, a=<7,-1,-1> +p=<-1673,-1077,-1311>, v=<54,107,12>, a=<1,-5,3> +p=<2877,-2177,-6486>, v=<28,21,115>, a=<-11,5,11> +p=<-1798,4548,2914>, v=<-19,-40,25>, a=<7,-11,-11> +p=<-498,-1802,1464>, v=<111,-20,-73>, a=<-7,7,1> +p=<-773,273,89>, v=<-8,118,8>, a=<3,-10,-1> +p=<2102,-2427,1664>, v=<-6,109,-68>, a=<-6,-1,0> +p=<124,-4624,-2317>, v=<-96,81,22>, a=<7,9,6> +p=<2812,5852,-181>, v=<17,-168,-17>, a=<-11,-6,2> +p=<2152,-6592,-3769>, v=<-93,138,45>, a=<0,11,9> +p=<-4100,1580,3395>, v=<5,-90,-66>, a=<13,2,-6> +p=<352,2876,-2461>, v=<7,-119,3>, a=<-2,0,8> +p=<-1448,-1204,-757>, v=<-43,51,-43>, a=<8,0,6> +p=<88,368,3935>, v=<93,23,-51>, a=<-8,-3,-9> +p=<-5516,212,-3061>, v=<39,-33,53>, a=<15,2,6> +p=<503,16,27>, v=<-46,5,42>, a=<-1,-2,-8> +p=<733,1801,-128>, v=<-36,-179,30>, a=<-7,-1,-3> +p=<-1257,576,-413>, v=<163,-18,31>, a=<-7,-8,2> +p=<1563,526,-498>, v=<-86,9,34>, a=<-13,-12,3> +p=<-962,1211,717>, v=<40,-109,-16>, a=<10,-3,-10> +p=<553,1201,542>, v=<-51,-42,-26>, a=<-1,-15,-5> +p=<-672,-1029,587>, v=<33,82,-58>, a=<6,3,0> +p=<1433,-1649,92>, v=<-95,133,8>, a=<-9,5,-3> +p=<128,596,197>, v=<19,-9,3>, a=<-6,-10,-4> +p=<-7716,-6974,-3884>, v=<52,30,62>, a=<10,10,3> +p=<-3704,2937,6214>, v=<-31,-69,-165>, a=<8,-1,-1> +p=<-1868,-480,-3187>, v=<90,49,94>, a=<-2,-2,0> +p=<-5863,-6090,1114>, v=<50,74,-15>, a=<7,6,-1> +p=<6309,-2384,-2201>, v=<77,-105,-75>, a=<-15,10,8> +p=<2824,-1160,6554>, v=<-13,69,0>, a=<-4,-2,-11> +p=<-2905,-2928,-1725>, v=<68,121,16>, a=<1,-2,2> +p=<-6118,4348,910>, v=<145,-23,-44>, a=<2,-6,1> +p=<239,731,5939>, v=<-66,32,-166>, a=<4,-4,-3> +p=<2465,2915,2985>, v=<-73,-75,12>, a=<-1,-2,-8> +p=<-853,-1593,-2195>, v=<-85,-1,23>, a=<8,4,4> +p=<-3961,-2349,3839>, v=<-32,-90,-62>, a=<12,12,-5> +p=<-4367,-4211,-2363>, v=<-119,49,0>, a=<19,7,6> +p=<-3751,-571,647>, v=<33,-52,-6>, a=<7,5,-1> +p=<925,-137,1081>, v=<-76,-53,51>, a=<3,4,-6> +p=<-4563,997,325>, v=<4,37,49>, a=<11,-5,-4> +p=<8290,3219,2571>, v=<-167,-50,-52>, a=<-10,-5,-3> +p=<-2267,384,-3369>, v=<0,-29,14>, a=<6,1,8> +p=<-134,7863,-5151>, v=<61,-68,-4>, a=<-4,-16,14> +p=<-2024,1572,-21>, v=<75,53,30>, a=<0,-8,-2> +p=<2242,708,276>, v=<-83,43,-65>, a=<0,-5,4> +p=<-1916,3651,-1209>, v=<-69,-10,-66>, a=<10,-9,8> +p=<-2483,-3018,762>, v=<8,83,71>, a=<6,2,-7> +p=<-566,-2856,1167>, v=<-63,21,-56>, a=<6,6,1> +p=<4537,708,-3693>, v=<-56,-83,54>, a=<-8,4,6> +p=<3133,-4908,-318>, v=<10,69,-15>, a=<-9,8,2> +p=<3347,388,1387>, v=<19,-29,54>, a=<-11,1,-8> +p=<6,-1055,1101>, v=<-1,67,-16>, a=<0,-2,-2> +p=<-501,1142,-2019>, v=<140,-112,104>, a=<-9,5,-2> +p=<-1645,2221,-3254>, v=<-59,76,111>, a=<9,-12,1> +p=<2307,921,1114>, v=<5,18,-111>, a=<-7,-4,5> +p=<305,609,1660>, v=<-26,3,3>, a=<1,-2,-5> +p=<2749,1051,5846>, v=<69,-68,31>, a=<-13,2,-19> +p=<669,-2420,-433>, v=<-94,106,43>, a=<5,-1,-2> +p=<1280,778,-5776>, v=<-104,172,100>, a=<4,-15,9> +p=<-6335,3961,-5062>, v=<73,-70,121>, a=<9,-4,3> +p=<2635,3511,9938>, v=<22,-148,-100>, a=<-7,2,-15> +p=<-154,-2963,-2334>, v=<-92,119,79>, a=<9,2,3> +p=<-5551,1720,186>, v=<110,-27,-8>, a=<14,-5,0> +p=<-49,1300,1866>, v=<-64,26,-22>, a=<6,-8,-6> +p=<2282,754,2937>, v=<-21,-25,-62>, a=<-8,-1,-7> +p=<-6580,-422,2349>, v=<93,-35,-144>, a=<20,5,3> +p=<-1603,-821,-2355>, v=<-1,28,91>, a=<7,1,2> +p=<1064,-1346,2139>, v=<-51,-79,31>, a=<0,13,-12> +p=<-3745,-3467,3168>, v=<178,22,-150>, a=<0,13,0> +p=<-2464,-2249,2055>, v=<40,162,-42>, a=<7,-5,-5> +p=<2253,351,6442>, v=<-68,-15,-109>, a=<-3,0,-16> +p=<-1421,362,2009>, v=<122,-50,12>, a=<-5,3,-9> +p=<-3918,-2927,788>, v=<-6,88,79>, a=<16,4,-10> +p=<-354,-2344,2383>, v=<-7,73,-28>, a=<2,3,-7> +p=<273,3486,260>, v=<-24,-54,-35>, a=<1,-9,2> +p=<-1465,-991,-2083>, v=<55,23,14>, a=<1,2,7> +p=<-859,66,2146>, v=<63,-14,17>, a=<-2,1,-10> +p=<-2355,1210,1761>, v=<85,-66,0>, a=<2,1,-7> +p=<-8594,-1368,-6168>, v=<48,112,69>, a=<11,-4,6> +p=<-5024,-8823,-3473>, v=<-18,109,46>, a=<9,8,3> +p=<-7684,-108,-6938>, v=<4,4,-71>, a=<12,0,15> +p=<4146,-10118,-8653>, v=<-100,20,86>, a=<-1,15,9> +p=<5686,-2978,-5573>, v=<-54,-4,214>, a=<-6,5,-3> +p=<3516,4197,-5013>, v=<-28,61,36>, a=<-4,-10,6> +p=<-8664,-5393,8637>, v=<-40,-25,-12>, a=<16,10,-13> +p=<2247,-3295,-1474>, v=<0,38,98>, a=<-7,7,-3> +p=<322,-645,5901>, v=<-79,-29,-80>, a=<5,4,-12> +p=<284,-5126,6311>, v=<-48,-8,-42>, a=<2,7,-6> +p=<-3616,1426,-13189>, v=<-8,-76,18>, a=<5,2,16> +p=<323,-2045,12317>, v=<31,-107,-56>, a=<-2,8,-13> +p=<-1315,-4307,1670>, v=<-127,51,57>, a=<8,3,-5> +p=<-4279,8251,-1489>, v=<69,-211,-42>, a=<2,0,4> +p=<-9232,-3098,-1801>, v=<56,-40,46>, a=<9,6,0> +p=<-10051,8953,-1723>, v=<-3,31,64>, a=<13,-13,-1> +p=<-5098,-1967,4790>, v=<-50,71,-43>, a=<9,-1,-4> +p=<5003,-758,2060>, v=<-49,40,67>, a=<-4,-1,-6> +p=<692,-175,-1125>, v=<-38,19,49>, a=<0,-1,1> +p=<350,-441,433>, v=<-50,53,57>, a=<3,-3,-8> +p=<1072,-2303,3606>, v=<-68,101,-130>, a=<1,2,-6> +p=<2155,-1315,2105>, v=<-135,-1,-21>, a=<2,7,-9> +p=<-8320,-209,-6594>, v=<47,-96,33>, a=<16,7,13> +p=<2236,4837,-3288>, v=<-122,-105,99>, a=<3,-4,1> +p=<10327,487,-272>, v=<-86,60,-65>, a=<-18,-5,5> +p=<-1157,3010,-1142>, v=<-155,18,70>, a=<13,-8,-2> +p=<409,864,-1345>, v=<1,-28,32>, a=<-1,0,1> +p=<3454,-5429,10748>, v=<31,-6,-70>, a=<-10,13,-20> +p=<2845,-5226,1004>, v=<-98,32,-64>, a=<0,10,2> +p=<6093,-1717,-2360>, v=<-45,31,142>, a=<-11,2,-4> +p=<-6754,3126,-2679>, v=<-22,-61,-27>, a=<17,-3,8> +p=<-3854,-4936,-5376>, v=<13,37,66>, a=<8,9,8> +p=<-7696,-1387,315>, v=<187,-24,60>, a=<6,5,-5> +p=<788,1189,441>, v=<29,0,70>, a=<-4,-3,-6> +p=<326,83,-357>, v=<-56,25,-3>, a=<3,-2,1> +p=<7592,-253,-259>, v=<-98,8,95>, a=<-12,0,-6> +p=<-6254,-729,917>, v=<150,54,-92>, a=<5,-2,4> +p=<-4028,-71,-1043>, v=<85,-13,7>, a=<4,1,2> +p=<-598,-5139,903>, v=<35,139,10>, a=<-1,3,-3> +p=<2384,-8429,-1337>, v=<-144,97,-55>, a=<4,14,7> +p=<-1158,2911,-4767>, v=<55,-76,-5>, a=<-1,-2,12> +p=<-2573,-317,-2472>, v=<-5,19,30>, a=<13,0,9> +p=<-1993,-597,838>, v=<-76,12,1>, a=<17,2,-4> +p=<3157,293,-262>, v=<-92,-64,-70>, a=<-6,5,8> +p=<1657,333,248>, v=<-59,-3,-64>, a=<-2,-1,5> +p=<-2033,-3167,1398>, v=<52,109,-111>, a=<5,5,4> +p=<1287,4793,-1572>, v=<-30,-58,90>, a=<-3,-17,-1> +p=<-2077,703,4366>, v=<34,81,-72>, a=<1,-5,-2> +p=<17735,664,-6125>, v=<-134,22,97>, a=<-16,-2,3> +p=<-5236,-6590,1636>, v=<-25,-12,78>, a=<8,9,-6> +p=<146,-8501,-2849>, v=<-23,117,13>, a=<1,5,3> +p=<2369,-12323,-5696>, v=<-60,55,86>, a=<0,13,3> +p=<2603,157,1987>, v=<54,55,-171>, a=<-6,-3,6> +p=<-1178,449,2482>, v=<-20,72,-129>, a=<10,-11,-2> +p=<-651,1843,3179>, v=<-123,-55,-107>, a=<18,-6,-9> +p=<-2181,-129,-3502>, v=<30,43,115>, a=<11,-4,10> +p=<1168,3560,119>, v=<-95,-93,-8>, a=<3,-13,0> +p=<2732,-1846,289>, v=<-43,117,-54>, a=<-13,-1,4> +p=<1219,-2577,1139>, v=<-8,151,13>, a=<-7,0,-9> +p=<1610,2234,17>, v=<-103,-51,-2>, a=<1,-9,0> +p=<2222,177,-3230>, v=<-148,-20,135>, a=<2,1,6> +p=<-1790,2625,-1309>, v=<106,-110,76>, a=<0,-5,0> +p=<2091,-2084,648>, v=<-104,150,-49>, a=<-14,6,-1> +p=<-659,-1490,-1233>, v=<44,132,80>, a=<3,0,6> +p=<276,622,-364>, v=<25,0,-11>, a=<-8,-10,8> +p=<-87,-1787,-1904>, v=<28,153,165>, a=<-3,1,2> +p=<-5280,3092,-2282>, v=<-15,18,-21>, a=<14,-9,7> +p=<-5994,2210,-5810>, v=<112,-110,47>, a=<7,2,11> +p=<1720,726,-1414>, v=<-33,-28,64>, a=<-2,0,-1> +p=<768,1370,1190>, v=<-28,36,29>, a=<0,-6,-5> +p=<1818,1356,3864>, v=<-22,-7,-23>, a=<-3,-3,-8> +p=<292,2364,-1470>, v=<105,15,66>, a=<-8,-7,-1> +p=<4541,-3761,-5620>, v=<-47,76,144>, a=<-8,4,4> +p=<-5049,6515,-4682>, v=<78,-146,38>, a=<7,-6,9> +p=<-7681,2287,5790>, v=<27,-24,-104>, a=<17,-4,-7> +p=<-2837,-2333,932>, v=<28,83,-3>, a=<5,0,-2> +p=<1111,-4951,-2302>, v=<3,-12,40>, a=<-3,13,3> +p=<-2473,-2053,-552>, v=<73,-101,79>, a=<1,12,-4> +p=<-2725,-2725,-2036>, v=<53,10,45>, a=<3,6,2> +p=<453,-191,3368>, v=<-46,-37,-61>, a=<2,3,-4> +p=<-5595,-191,5412>, v=<141,-37,-18>, a=<4,3,-12> +p=<649,-1087,-3100>, v=<-24,-92,54>, a=<0,9,4> +p=<-13,518,-583>, v=<36,0,50>, a=<-6,-8,0> +p=<-838,1277,-517>, v=<99,-63,68>, a=<-4,-9,-4> +p=<-1223,-164,-429>, v=<116,-10,36>, a=<-1,4,0> +p=<-299,518,484>, v=<-10,-36,-47>, a=<6,-2,0> +p=<999,1464,550>, v=<-26,-128,-11>, a=<-11,-1,-7> +p=<-1575,298,132>, v=<118,-40,33>, a=<4,2,-8> +p=<-1520,78,1375>, v=<95,-8,-116>, a=<7,0,-2> +p=<6540,-8827,3415>, v=<-134,-21,86>, a=<-2,13,-9> +p=<3595,3048,926>, v=<41,37,-63>, a=<-7,-6,2> +p=<-5943,5100,11205>, v=<97,22,-119>, a=<3,-8,-9> +p=<2417,1148,-8574>, v=<-45,-30,31>, a=<-1,0,10> +p=<-104,-1501,-329>, v=<35,16,-99>, a=<-3,7,12> +p=<2821,-1078,625>, v=<-23,116,19>, a=<-14,-6,-6> +p=<-1265,533,-2453>, v=<71,-40,57>, a=<0,1,8> +p=<-1841,-3418,994>, v=<103,94,8>, a=<0,10,-7> +p=<-428,-907,-689>, v=<-23,59,54>, a=<5,-1,-2> +p=<1120,3089,-230>, v=<-147,-68,-76>, a=<9,-11,9> +p=<-660,-26,-315>, v=<16,41,-12>, a=<9,-7,7> +p=<755,-196,-780>, v=<-54,36,40>, a=<-4,-3,6> +p=<350,-201,1050>, v=<-63,53,-55>, a=<5,-6,-10> +p=<100,-661,1205>, v=<-49,88,-120>, a=<7,-4,-1> +p=<-210,-511,115>, v=<-7,-4,11>, a=<5,10,-5> +p=<-355,-336,380>, v=<24,39,-21>, a=<2,-1,-4> +p=<-416,1014,-128>, v=<35,-134,-19>, a=<0,7,5> +p=<915,310,-612>, v=<-74,-28,79>, a=<-2,0,-4> +p=<-1098,-229,1115>, v=<67,21,-102>, a=<5,0,0> +p=<486,-1428,-1316>, v=<-59,70,71>, a=<2,10,8> +p=<-2642,-3809,11319>, v=<0,32,0>, a=<4,4,-17> +p=<-4604,-1883,-2559>, v=<-1,-40,71>, a=<7,5,0> +p=<-230,-4133,-8625>, v=<44,41,36>, a=<-2,4,11> +p=<-10454,-1541,4317>, v=<106,43,-120>, a=<10,0,0> +p=<3190,-9389,-4017>, v=<-14,2,56>, a=<-4,14,3> +p=<-5036,7261,1455>, v=<196,-72,-96>, a=<-3,-7,3> +p=<-9320,367,3669>, v=<56,-10,-28>, a=<11,0,-4> +p=<-68,7549,-5889>, v=<-16,-80,71>, a=<1,-7,5> +p=<4144,9115,-6735>, v=<-133,-31,-146>, a=<1,-12,18> +p=<3445,-507,-1701>, v=<-158,5,-61>, a=<-5,3,18> +p=<-516,785,-1531>, v=<30,73,127>, a=<0,-13,-4> +p=<-1434,275,-4387>, v=<-15,22,115>, a=<11,-4,16> +p=<1252,-643,441>, v=<-128,13,20>, a=<6,3,-5> +p=<2000,190,-69>, v=<-127,72,23>, a=<1,-9,-2> +p=<351,-201,3399>, v=<-21,5,-172>, a=<0,1,-3> +p=<7379,-3883,7167>, v=<-42,62,0>, a=<-10,3,-12> +p=<-2821,6028,2679>, v=<13,-72,-78>, a=<4,-6,0> +p=<4064,-925,-12485>, v=<-102,45,123>, a=<-1,-1,14> +p=<171,-3339,-1180>, v=<-5,46,-52>, a=<0,3,5> +p=<2466,-7963,-4937>, v=<50,-63,41>, a=<-7,17,6> +p=<-1971,-126,-6875>, v=<-47,-66,63>, a=<6,4,8> +p=<-6034,-2438,3903>, v=<20,72,-44>, a=<9,0,-4> +p=<1254,855,-1555>, v=<-134,38,89>, a=<7,-9,0> +p=<3324,1791,2279>, v=<-40,-90,-48>, a=<-15,-1,-8> +p=<-1581,-1620,-295>, v=<14,109,-19>, a=<8,-2,4> +p=<1326,-2898,461>, v=<90,9,-61>, a=<-17,16,4> +p=<-1194,3285,1991>, v=<21,-154,-108>, a=<5,-3,0> +p=<-2274,2664,209>, v=<24,-148,10>, a=<11,0,-2> +p=<-672,-495,-1393>, v=<11,-20,42>, a=<3,5,4> +p=<-3263,-2300,1414>, v=<93,101,-45>, a=<8,2,-3> +p=<-318,664,1509>, v=<-52,65,-80>, a=<7,-10,0> +p=<-166,873,4321>, v=<40,-56,-148>, a=<-3,1,-8> +p=<-679,322,-239>, v=<67,13,-38>, a=<-3,-3,5> +p=<2019,-704,3181>, v=<-125,87,-108>, a=<2,-5,-6> +p=<-793,-3345,2060>, v=<-67,116,-109>, a=<11,6,0> +p=<898,474,-2310>, v=<-16,5,121>, a=<-3,-3,0> +p=<3938,-856,597>, v=<-136,5,-72>, a=<-7,4,4> +p=<-622,132,996>, v=<-36,63,-3>, a=<7,-7,-5> +p=<-5270,5028,4150>, v=<28,9,-13>, a=<12,-14,-10> +p=<-1085,-561,1531>, v=<41,-8,-56>, a=<0,2,0> +p=<1707,419,1602>, v=<-129,-60,-143>, a=<-8,3,-3> +p=<812,194,1532>, v=<-56,-32,-114>, a=<-5,2,-7> +p=<542,909,-693>, v=<15,-65,15>, a=<-13,-5,10> +p=<-1718,-691,907>, v=<153,51,-24>, a=<3,3,-12> +p=<62,184,1167>, v=<-36,-20,-50>, a=<5,0,-12> +p=<-1328,1415,-293>, v=<39,-39,5>, a=<4,-4,1> +p=<-1886,1685,1534>, v=<146,3,-144>, a=<-4,-10,6> +p=<3937,-70,-959>, v=<-92,-23,61>, a=<-13,3,-1> +p=<5588,-6338,-3105>, v=<-83,78,-158>, a=<-6,8,16> +p=<11106,-789,-780>, v=<-133,-69,23>, a=<-14,6,0> +p=<-4766,-4881,7869>, v=<59,-49,-80>, a=<6,13,-11> +p=<3480,7116,-2609>, v=<17,-84,66>, a=<-8,-9,1> +p=<-3836,3954,5730>, v=<13,-94,-123>, a=<7,-2,-4> +p=<4546,-6394,-17442>, v=<67,127,192>, a=<-11,3,17> +p=<3811,2111,5098>, v=<-20,-8,-74>, a=<-5,-3,-4> +p=<7486,4225,769>, v=<-68,24,-94>, a=<-8,-8,4> +p=<-2034,2370,9519>, v=<6,95,-2>, a=<3,-9,-15> +p=<6261,-1270,-4971>, v=<-33,-71,-20>, a=<-8,6,9> +p=<-4011,2464,446>, v=<-40,-28,35>, a=<10,-3,-3> +p=<4437,2656,-2690>, v=<-40,-133,67>, a=<-6,3,1> +p=<-475,5888,-1442>, v=<64,-102,61>, a=<-3,-5,-1> +p=<-1195,-5264,-1554>, v=<4,65,-18>, a=<2,6,4> +p=<597,4032,6974>, v=<47,-143,-103>, a=<-4,1,-7> +p=<6805,2592,2318>, v=<-81,-32,-73>, a=<-8,-3,0> +p=<245,8944,-2658>, v=<-107,-49,-33>, a=<6,-14,7> +p=<3653,-6016,3742>, v=<-131,72,-35>, a=<1,7,-5> +p=<1157,864,4478>, v=<79,-11,-58>, a=<-7,-1,-5> +p=<4725,-7552,-194>, v=<-49,21,55>, a=<-6,13,-3> +p=<488,-3068,-768>, v=<0,14,48>, a=<-2,12,-1> +p=<-205,-4412,-3855>, v=<22,122,85>, a=<-1,8,9> +p=<89,2875,303>, v=<-14,-27,-47>, a=<1,-10,3> +p=<551,397,4629>, v=<-36,36,-33>, a=<1,-5,-17> +p=<572,-3131,1395>, v=<7,127,-110>, a=<-3,2,4> +p=<2021,1804,-1356>, v=<48,-20,32>, a=<-13,-6,3> +p=<4454,4528,-2833>, v=<-38,-13,43>, a=<-12,-14,6> +p=<-2062,2476,755>, v=<96,-40,-119>, a=<-1,-5,7> +p=<-520,-1226,-379>, v=<53,91,-5>, a=<-3,-1,4> +p=<-430,-1586,-2449>, v=<7,35,141>, a=<2,9,3> +p=<770,-1016,71>, v=<-129,37,-123>, a=<9,4,15> +p=<-565,-3011,1301>, v=<72,66,-77>, a=<-5,17,-1> +p=<-505,394,-1504>, v=<4,-25,94>, a=<3,0,1> +p=<1430,-2546,-724>, v=<-61,147,58>, a=<-5,3,-1> +p=<-932,143,-1423>, v=<50,-10,107>, a=<1,0,-2> +p=<-2492,-1321,-455>, v=<173,22,4>, a=<-2,7,3> +p=<-4768,-7571,-7177>, v=<46,72,25>, a=<5,8,10> +p=<-358,-2706,-3572>, v=<-80,-13,12>, a=<5,5,5> +p=<27,-8971,-4377>, v=<-1,58,-19>, a=<0,11,8> +p=<1602,-2846,-8927>, v=<-10,45,165>, a=<-2,2,5> +p=<-2913,-4176,4163>, v=<101,47,115>, a=<-1,4,-13> +p=<62,-2671,-2767>, v=<-2,22,-65>, a=<0,3,8> +p=<6327,-8201,-8402>, v=<53,72,-30>, a=<-13,9,15> +p=<-10718,-9636,4023>, v=<-36,113,-61>, a=<19,9,-3> +p=<-11348,2474,3323>, v=<54,-71,-95>, a=<15,0,0> +p=<-2942,-8334,-8533>, v=<100,176,71>, a=<-1,3,9> +p=<892,5202,-4105>, v=<12,-126,-15>, a=<-2,-1,7> +p=<-2312,-2790,6191>, v=<-84,22,-42>, a=<8,3,-7> +p=<-8666,10206,-6481>, v=<0,31,125>, a=<13,-17,3> +p=<-408,2413,7460>, v=<48,3,-69>, a=<-2,-4,-8> +p=<1412,-1227,-3635>, v=<68,89,104>, a=<-6,-3,0> +p=<-1983,-282,-5875>, v=<3,-82,168>, a=<3,5,0> +p=<-7968,-6827,-1850>, v=<48,33,35>, a=<10,9,1> +p=<-3243,-1717,740>, v=<21,-5,123>, a=<4,3,-8> +p=<-9403,5248,6725>, v=<17,-6,-84>, a=<14,-8,-6> +p=<-1152,-947,6381>, v=<-8,47,-212>, a=<3,-1,0> +p=<-6447,-3632,1011>, v=<91,121,-33>, a=<8,0,0> +p=<3138,118,-2724>, v=<66,27,-79>, a=<-11,-2,11> +p=<-13482,28,1296>, v=<124,61,66>, a=<21,-4,-7> +p=<-9417,5098,-2169>, v=<97,-15,-51>, a=<14,-10,8> +p=<-1697,1940,356>, v=<102,-76,-24>, a=<3,-8,0> +p=<746,-48,-1107>, v=<10,6,-32>, a=<-8,0,15> +p=<1411,155,-2409>, v=<0,14,91>, a=<-13,-3,11> +p=<-577,-3212,1518>, v=<112,157,-17>, a=<-9,10,-12> +p=<-570,-1574,1497>, v=<44,100,7>, a=<0,2,-15> +p=<-5629,5318,2899>, v=<69,28,-9>, a=<10,-16,-7> +p=<-4927,2780,199>, v=<155,10,-49>, a=<2,-8,3> +p=<-7330,3266,3142>, v=<104,-36,-102>, a=<12,-6,-1> +p=<1013,917,-1394>, v=<-121,-131,38>, a=<6,7,1> +p=<-1903,-1999,-6956>, v=<-55,-107,104>, a=<9,13,11> +p=<10290,-8142,-234>, v=<8,126,7>, a=<-15,5,0> +p=<10512,4512,3096>, v=<-93,-83,-140>, a=<-10,-2,3> +p=<3113,1116,-14949>, v=<38,-122,86>, a=<-7,5,19> +p=<-1367,1116,-3049>, v=<58,40,34>, a=<-1,-4,3> +p=<-6197,1851,-1544>, v=<106,-35,63>, a=<4,-1,-1> +p=<-737,-564,206>, v=<4,52,-23>, a=<1,-2,1> +p=<-1717,-5289,3566>, v=<-94,151,97>, a=<8,0,-11> +p=<-527,2411,3636>, v=<52,-15,-13>, a=<-2,-3,-5> +p=<488,1186,4826>, v=<-13,-88,43>, a=<0,3,-10> +p=<-11342,3426,4616>, v=<55,-26,-23>, a=<15,-4,-6> +p=<2168,8676,-704>, v=<-61,-104,93>, a=<0,-8,-4> +p=<383,-739,7101>, v=<44,39,-58>, a=<-3,-1,-8> +p=<7081,-997,1057>, v=<-70,-16,-40>, a=<-15,4,0> +p=<1010,5425,-3701>, v=<-120,-74,116>, a=<6,-10,2> +p=<1595,-1699,1382>, v=<-48,-97,42>, a=<-1,12,-7> +p=<3753,4671,3332>, v=<-212,-18,75>, a=<5,-12,-15> +p=<4676,4346,2617>, v=<-153,8,8>, a=<-2,-13,-8> +p=<-2370,3605,-22>, v=<91,-112,15>, a=<0,-2,-1> +p=<5755,-4884,615>, v=<-181,66,-23>, a=<-3,9,0> +p=<4832,693,-2921>, v=<57,54,-22>, a=<-18,-6,10> +p=<-3641,-347,722>, v=<28,-13,-17>, a=<9,2,-1> +p=<-4316,3003,-2778>, v=<-36,9,149>, a=<16,-10,-3> +p=<4984,703,-4053>, v=<-161,-55,83>, a=<-3,2,6> +p=<4396,-167,1440>, v=<20,69,-13>, a=<-10,-4,-2> +p=<3590,-1407,-4977>, v=<-130,45,98>, a=<1,0,4> +p=<-9089,1445,2587>, v=<87,17,-2>, a=<13,-4,-5> +p=<5791,1631,-6899>, v=<-57,-165,16>, a=<-8,7,13> +p=<4706,4638,8725>, v=<-6,-22,-40>, a=<-9,-8,-15> +p=<-3974,794,-4667>, v=<-62,-26,88>, a=<12,0,4> +p=<-6144,1476,1285>, v=<-72,32,88>, a=<17,-5,-8> +p=<-471,5909,-1226>, v=<-95,-63,41>, a=<7,-8,0> +p=<-254,4514,3455>, v=<-22,-146,-14>, a=<2,0,-6> +p=<-1277,-4104,1936>, v=<155,-12,3>, a=<-7,9,-4> +p=<2847,2864,-9499>, v=<51,12,172>, a=<-7,-5,5> +p=<3477,-808,4757>, v=<-22,77,-150>, a=<-4,-3,1> +p=<-3615,3080,-913>, v=<101,-68,-48>, a=<0,-1,4> +p=<-6117,-628,5333>, v=<226,-2,19>, a=<-3,1,-9> +p=<-3327,7454,6035>, v=<93,-60,-56>, a=<0,-8,-6> +p=<-106,-149,922>, v=<9,66,-78>, a=<0,-8,-1> +p=<290,1237,603>, v=<-69,-60,-85>, a=<7,-8,5> +p=<466,555,-2092>, v=<-109,-52,130>, a=<11,1,10> +p=<1280,-1095,-2961>, v=<-117,68,179>, a=<0,6,15> +p=<-546,181,1098>, v=<49,-42,-130>, a=<0,5,5> +p=<-623,852,-1641>, v=<104,-115,35>, a=<-8,7,19> +p=<1181,-523,-1113>, v=<-126,88,107>, a=<3,-6,-1> +p=<-865,-182,-684>, v=<48,-21,68>, a=<5,7,-1> +p=<-612,1578,647>, v=<13,-91,25>, a=<7,-8,-14> +p=<-4362,-1406,388>, v=<130,79,-72>, a=<12,0,5> +p=<3252,1843,-3347>, v=<-122,-111,164>, a=<-6,1,2> +p=<507,3544,-2780>, v=<21,-139,104>, a=<-5,-6,5> +p=<2550,709,-521>, v=<-83,28,45>, a=<-6,-7,-2> +p=<-2122,-462,1771>, v=<-303,-63,249>, a=<21,12,-13> +p=<-2437,1226,1102>, v=<-351,172,158>, a=<30,-10,-8> +p=<2255,-504,868>, v=<322,-73,123>, a=<-22,5,-7> +p=<416,-3032,847>, v=<54,-433,126>, a=<-3,25,-4> +p=<1549,-1605,-2375>, v=<221,-229,-341>, a=<-16,16,20> +p=<-1643,2300,-1819>, v=<-236,331,-263>, a=<16,-26,14> +p=<-2615,402,-507>, v=<-372,59,-70>, a=<24,-10,5> +p=<-2343,811,314>, v=<-335,120,44>, a=<23,-5,-2> +p=<-365,1298,2597>, v=<-51,189,373>, a=<6,-8,-19> +p=<-2005,2107,-1154>, v=<-284,303,-164>, a=<21,-19,12> +p=<-2470,480,1812>, v=<-356,69,261>, a=<19,-6,-17> +p=<1180,463,2048>, v=<168,67,292>, a=<-9,-4,-21> +p=<-1459,-1736,2814>, v=<-208,-248,403>, a=<11,15,-29> +p=<-794,1646,-2698>, v=<-109,235,-382>, a=<2,-11,25> +p=<2736,-241,-850>, v=<392,-40,-119>, a=<-26,3,13> +p=<-1830,2485,-523>, v=<-256,359,-74>, a=<19,-24,4> +p=<-62,-2018,-1982>, v=<-11,-288,-286>, a=<2,20,19> +p=<-422,1299,2794>, v=<-61,186,398>, a=<2,-11,-33> +p=<-660,1383,1899>, v=<-100,200,271>, a=<5,-11,-21> +p=<819,-1235,2372>, v=<115,-180,338>, a=<-6,13,-20> +p=<1981,650,1812>, v=<282,91,258>, a=<-24,-8,-18> +p=<2807,-530,-657>, v=<405,-75,-93>, a=<-28,2,6> +p=<1823,1329,1725>, v=<259,191,243>, a=<-19,-15,-17> +p=<-3227,-1300,1047>, v=<-462,-184,154>, a=<32,10,-11> +p=<1154,2375,1815>, v=<172,332,262>, a=<-12,-18,-13> +p=<-2250,315,-1759>, v=<-321,48,-251>, a=<26,-4,20> +p=<-542,1627,2370>, v=<-73,234,338>, a=<5,-20,-16> +p=<2663,445,577>, v=<381,67,82>, a=<-25,-3,-4> +p=<-2035,2475,353>, v=<-290,353,51>, a=<22,-21,-2> +p=<-46,3186,1025>, v=<-11,459,147>, a=<-4,-32,-7> +p=<-367,2663,-139>, v=<-52,380,-19>, a=<9,-25,6> +p=<1498,-350,-2445>, v=<215,-50,-350>, a=<-9,0,23> +p=<891,2223,595>, v=<127,314,83>, a=<-6,-22,-7> +p=<1808,-2071,496>, v=<259,-295,70>, a=<-15,24,-4> +p=<3104,958,-1127>, v=<447,130,-161>, a=<-32,-6,11> +p=<-691,2655,-1206>, v=<-94,380,-171>, a=<2,-29,17> +p=<-590,1757,2632>, v=<-81,248,376>, a=<0,-16,-29> +p=<-228,-1718,2459>, v=<-28,-242,353>, a=<3,21,-24> +p=<-2385,440,-1088>, v=<-339,69,-158>, a=<24,-6,6> +p=<-1679,2606,1394>, v=<-235,379,201>, a=<15,-28,-9> +p=<1947,2261,-1703>, v=<277,321,-239>, a=<-19,-22,15> +p=<731,-2357,-675>, v=<107,-331,-89>, a=<-7,25,6> +p=<844,-2402,-104>, v=<121,-341,-15>, a=<-7,25,0> +p=<1450,-2653,-74>, v=<211,-381,-12>, a=<-14,21,-2> +p=<2747,31,-945>, v=<394,7,-130>, a=<-23,0,9> +p=<-2503,1032,1102>, v=<-355,151,157>, a=<21,-7,-14> +p=<-819,-1542,2877>, v=<-117,-217,411>, a=<9,14,-31> +p=<1614,-1510,1435>, v=<230,-213,208>, a=<-13,11,-13> +p=<1786,2090,942>, v=<255,299,136>, a=<-17,-19,-8> +p=<-1600,154,2649>, v=<-225,26,379>, a=<14,-1,-28> +p=<-601,1915,-2174>, v=<-85,275,-310>, a=<5,-20,18> +p=<-362,118,-2805>, v=<-51,18,-400>, a=<2,-1,24> +p=<-1321,120,-2416>, v=<-187,15,-345>, a=<13,-4,24> +p=<1522,-426,-2045>, v=<217,-60,-292>, a=<-15,5,20> +p=<2549,1073,-1788>, v=<364,157,-259>, a=<-20,-7,19> +p=<-546,-2359,-1052>, v=<-76,-334,-146>, a=<6,24,11> +p=<-935,3394,102>, v=<-138,486,12>, a=<16,-34,5> +p=<1972,2100,229>, v=<286,297,30>, a=<-16,-29,0> +p=<-1532,-10,-2556>, v=<-219,-1,-358>, a=<17,4,25> +p=<-2589,1080,15>, v=<-369,150,-4>, a=<25,-9,-3> +p=<-1981,-1500,-2143>, v=<-282,-210,-306>, a=<22,17,21> +p=<-1800,-1820,-2465>, v=<-258,-260,-356>, a=<17,22,27> +p=<1610,-2354,787>, v=<230,-334,114>, a=<-18,19,-7> +p=<2836,462,173>, v=<403,68,24>, a=<-24,-3,-1> +p=<1480,782,2326>, v=<216,114,331>, a=<-13,-6,-28> +p=<716,-2041,-2699>, v=<104,-285,-385>, a=<-6,19,30> +p=<19,2156,2499>, v=<2,315,363>, a=<-2,-16,-24> +p=<1654,-2460,-1314>, v=<237,-351,-187>, a=<-16,23,10> +p=<-1024,510,-2461>, v=<-142,73,-348>, a=<12,-7,22> +p=<1598,1995,993>, v=<226,285,138>, a=<-15,-19,-15> +p=<-43,-2734,796>, v=<-8,-389,117>, a=<0,26,-9> +p=<-195,3,3287>, v=<-31,1,468>, a=<1,-3,-25> +p=<2805,1346,611>, v=<399,190,86>, a=<-28,-12,-11> +p=<-511,484,-2893>, v=<-73,66,-411>, a=<5,-2,28> +p=<1404,-92,3043>, v=<204,-13,435>, a=<-9,-1,-29> +p=<1238,913,2670>, v=<178,129,379>, a=<-9,-10,-22> +p=<-2747,1362,1367>, v=<-394,195,195>, a=<26,-17,-17> +p=<2820,-163,1033>, v=<403,-24,151>, a=<-32,0,-12> +p=<-1315,-1314,1905>, v=<-188,-188,272>, a=<15,13,-21> +p=<1949,1801,-1518>, v=<278,257,-220>, a=<-19,-18,15> +p=<-789,139,2982>, v=<-109,15,427>, a=<7,1,-29> +p=<1689,1927,-1008>, v=<241,277,-148>, a=<-22,-20,10> +p=<1344,1683,1384>, v=<198,240,197>, a=<-14,-15,-13> +p=<1209,866,-2200>, v=<168,121,-309>, a=<-9,-6,22> +p=<796,-43,-2620>, v=<119,-8,-372>, a=<-7,2,24> +p=<-1971,1006,1462>, v=<-283,144,209>, a=<15,-10,-18> +p=<201,-2197,-914>, v=<26,-314,-131>, a=<-5,21,9> +p=<-1477,-1943,-514>, v=<-205,-275,-79>, a=<11,19,4> +p=<2455,1143,-1031>, v=<350,166,-146>, a=<-18,-11,14> +p=<1129,-1345,2441>, v=<164,-189,349>, a=<-11,11,-30> +p=<1179,-2706,1364>, v=<169,-386,189>, a=<-10,33,-14> +p=<1741,2448,948>, v=<246,351,135>, a=<-18,-25,-12> +p=<1291,811,2281>, v=<184,115,331>, a=<-15,-8,-16> +p=<2063,-410,-1207>, v=<292,-56,-170>, a=<-17,4,15> +p=<150,-1589,2838>, v=<23,-231,406>, a=<1,13,-29> +p=<34,313,-2616>, v=<2,45,-374>, a=<1,-3,29> +p=<-923,-814,3386>, v=<-130,-117,483>, a=<9,6,-39> +p=<-2929,-1015,-1042>, v=<-418,-145,-151>, a=<29,9,10> +p=<1064,-1032,-3214>, v=<154,-148,-463>, a=<-9,9,32> +p=<-2322,195,-2626>, v=<-328,24,-376>, a=<19,-2,23> +p=<1158,1440,2226>, v=<164,209,324>, a=<-9,-8,-18> +p=<-1421,-1873,1224>, v=<-200,-269,176>, a=<11,16,-8> +p=<2311,2069,120>, v=<330,297,21>, a=<-21,-20,1> +p=<1388,18,-2544>, v=<198,2,-364>, a=<-9,-1,25> +p=<456,-3127,955>, v=<62,-446,139>, a=<-4,32,-9> +p=<3098,930,-276>, v=<443,136,-44>, a=<-29,-9,4> +p=<-1321,-1548,2771>, v=<-190,-219,395>, a=<11,14,-30> +p=<1430,2507,882>, v=<202,359,122>, a=<-11,-25,-12> +p=<-2460,1524,345>, v=<-351,217,47>, a=<22,-11,-5> +p=<-2585,1620,-78>, v=<-369,229,-10>, a=<29,-16,5> +p=<1824,-2621,-349>, v=<254,-373,-49>, a=<-18,26,7> +p=<-650,-527,3276>, v=<-95,-72,468>, a=<2,8,-35> +p=<679,392,2650>, v=<90,56,373>, a=<-7,-2,-24> +p=<507,887,-3359>, v=<70,127,-479>, a=<-5,-9,35> +p=<-1637,-1507,-1213>, v=<-235,-219,-173>, a=<16,13,12> +p=<-1979,-1445,-1290>, v=<-282,-204,-181>, a=<20,13,12> +p=<-1848,474,-2045>, v=<-264,63,-288>, a=<17,-4,15> +p=<-2101,269,-2661>, v=<-300,37,-380>, a=<21,3,26> +p=<689,-810,-2923>, v=<104,-114,-417>, a=<-5,11,31> +p=<1585,431,2142>, v=<225,61,309>, a=<-16,-2,-24> +p=<-1508,-1438,2313>, v=<-210,-201,333>, a=<11,14,-23> +p=<10,1105,3196>, v=<3,156,454>, a=<1,-10,-37> +p=<1270,2495,-987>, v=<180,351,-142>, a=<-13,-25,11> +p=<2626,451,-749>, v=<377,65,-106>, a=<-25,2,7> +p=<-2238,106,1952>, v=<-324,19,280>, a=<21,1,-23> +p=<-2892,-982,1865>, v=<-413,-139,268>, a=<29,7,-17> +p=<1554,-2331,-911>, v=<222,-336,-130>, a=<-15,23,11> +p=<484,2685,973>, v=<69,381,137>, a=<-4,-31,-10> +p=<-831,3375,-748>, v=<-117,482,-105>, a=<6,-32,3> +p=<1028,711,-2525>, v=<149,98,-359>, a=<-8,-14,20> +p=<1487,-441,2012>, v=<212,-66,287>, a=<-10,0,-23> +p=<-1138,-1711,-1205>, v=<-165,-246,-170>, a=<10,21,11> +p=<-1514,-1877,1393>, v=<-213,-271,204>, a=<16,19,-13> +p=<2365,2045,-358>, v=<336,288,-54>, a=<-25,-16,10> +p=<990,-1828,1192>, v=<140,-253,169>, a=<-11,24,-12> +p=<1812,2200,-341>, v=<257,314,-48>, a=<-18,-18,3> +p=<1974,-1123,-1092>, v=<286,-163,-153>, a=<-15,7,8> +p=<9,-1865,1951>, v=<7,-266,275>, a=<-4,20,-19> +p=<-2899,1147,-795>, v=<-419,155,-113>, a=<24,-12,6> +p=<-1672,2718,-1088>, v=<-237,388,-158>, a=<16,-30,10> +p=<-2291,-39,1857>, v=<-334,-5,263>, a=<20,0,-15> +p=<-399,1332,2144>, v=<-58,191,305>, a=<-1,-21,-20> +p=<1551,-2205,351>, v=<216,-320,52>, a=<-15,22,-2> +p=<-2557,-1942,809>, v=<-370,-282,119>, a=<25,20,-8> +p=<-1648,-1639,-1344>, v=<-242,-233,-188>, a=<14,17,13> +p=<-1910,-1956,790>, v=<-271,-278,114>, a=<18,19,-11> +p=<1971,1131,1703>, v=<281,157,244>, a=<-19,-15,-18> +p=<2865,-1439,259>, v=<410,-201,33>, a=<-28,16,-2> +p=<-2992,542,573>, v=<-435,81,81>, a=<29,-5,-5> +p=<2968,226,-1925>, v=<426,26,-275>, a=<-30,-2,16> +p=<449,3307,792>, v=<59,468,111>, a=<-9,-32,-5> +p=<1388,-2741,490>, v=<195,-389,70>, a=<-13,27,-9> +p=<1810,1169,673>, v=<257,165,93>, a=<-17,-11,-6> +p=<2038,-1979,-1241>, v=<291,-275,-177>, a=<-27,18,13> +p=<62,-1698,2227>, v=<8,-245,313>, a=<-2,18,-16> +p=<-105,-2890,732>, v=<-16,-408,107>, a=<2,28,-4> +p=<-717,-2536,-1695>, v=<-102,-362,-240>, a=<7,24,10> +p=<-520,1135,2616>, v=<-72,156,370>, a=<4,-7,-30> +p=<-3048,877,342>, v=<-436,128,48>, a=<27,-13,-3> +p=<-2788,1634,19>, v=<-398,237,2>, a=<33,-16,1> +p=<-655,-2912,-1703>, v=<-95,-417,-242>, a=<5,30,21> +p=<2612,1183,194>, v=<372,166,25>, a=<-25,-10,-8> +p=<-1341,-314,3221>, v=<-188,-39,463>, a=<11,6,-35> +p=<690,-2435,1503>, v=<101,-344,219>, a=<-5,24,-17> +p=<143,-2334,1980>, v=<19,-334,280>, a=<1,23,-23> +p=<255,2935,922>, v=<32,419,134>, a=<-2,-27,-9> +p=<-887,-2118,-1786>, v=<-129,-299,-255>, a=<11,20,12> +p=<-2294,-632,-1841>, v=<-331,-91,-265>, a=<26,6,18> +p=<668,-1926,-2179>, v=<90,-275,-312>, a=<-6,20,21> +p=<-235,-3,-2940>, v=<-35,2,-420>, a=<0,-1,29> +p=<2345,931,-1398>, v=<334,135,-196>, a=<-20,-13,13> +p=<-2372,-2100,191>, v=<-338,-304,24>, a=<19,25,-3> +p=<564,1687,2294>, v=<80,238,330>, a=<-1,-17,-22> +p=<-2071,230,-2123>, v=<-295,30,-302>, a=<20,-2,21> +p=<-1121,2591,-1317>, v=<-161,365,-188>, a=<9,-22,12> +p=<-551,2953,1516>, v=<-78,419,210>, a=<7,-29,-16> +p=<-28,972,2082>, v=<-5,139,294>, a=<-6,-12,-20> +p=<417,-1508,2493>, v=<64,-215,357>, a=<-1,16,-26> +p=<1585,-644,-2184>, v=<228,-93,-311>, a=<-15,2,19> +p=<1773,-573,-2820>, v=<252,-78,-401>, a=<-16,6,29> +p=<181,-2455,2313>, v=<25,-350,330>, a=<-6,25,-23> +p=<1280,-2262,244>, v=<179,-318,31>, a=<-10,22,-2> +p=<1284,2870,-228>, v=<180,409,-32>, a=<-13,-34,2> +p=<-1845,861,-1281>, v=<-258,125,-183>, a=<17,-8,15> +p=<-1466,1044,-2300>, v=<-207,151,-326>, a=<14,-8,20> +p=<-3181,-92,676>, v=<-455,-15,94>, a=<24,-1,-10> +p=<1789,-74,2293>, v=<255,-13,332>, a=<-17,-3,-21> +p=<-1800,-1508,-2081>, v=<-261,-213,-295>, a=<19,14,20> +p=<2515,-2573,50>, v=<365,-363,6>, a=<-23,25,-2> +p=<2456,1265,-1771>, v=<354,178,-253>, a=<-25,-13,17> +p=<-1124,1988,-1426>, v=<-160,284,-203>, a=<6,-23,15> +p=<-1669,2069,-1104>, v=<-232,294,-153>, a=<19,-27,13> +p=<2258,-675,281>, v=<324,-96,44>, a=<-22,4,-2> +p=<3072,-425,1230>, v=<438,-60,171>, a=<-32,7,-12> +p=<-940,3063,1018>, v=<-141,434,146>, a=<8,-30,-13> +p=<821,2908,-1353>, v=<120,415,-194>, a=<-10,-21,17> +p=<-2242,-935,-1405>, v=<-324,-133,-202>, a=<25,14,14> +p=<505,-2164,-2553>, v=<71,-309,-366>, a=<-7,21,28> +p=<-2390,1771,-1053>, v=<-343,253,-158>, a=<21,-17,16> +p=<-2344,-1351,1242>, v=<-337,-196,171>, a=<26,10,-8> +p=<410,2563,-956>, v=<58,369,-136>, a=<2,-33,5> +p=<-1293,-1998,-2130>, v=<-183,-287,-300>, a=<11,14,26> +p=<-87,627,2624>, v=<-11,91,372>, a=<0,-8,-25> +p=<-1793,-1826,-1275>, v=<-249,-261,-177>, a=<18,11,14> +p=<1696,1336,-1959>, v=<241,190,-276>, a=<-13,-9,16> +p=<-606,725,-2543>, v=<-86,103,-363>, a=<6,-13,19> +p=<2511,574,1637>, v=<363,82,234>, a=<-28,0,-14> +p=<1002,2714,-605>, v=<139,385,-85>, a=<-12,-28,9> +p=<1697,857,2389>, v=<245,125,346>, a=<-19,0,-22> +p=<-2852,-488,7>, v=<-407,-66,0>, a=<28,3,0> +p=<-1590,2685,-281>, v=<-227,384,-37>, a=<16,-28,7> +p=<-2437,924,1940>, v=<-350,132,275>, a=<24,-11,-21> +p=<2161,-851,-896>, v=<308,-119,-126>, a=<-20,10,6> +p=<2013,646,2537>, v=<285,98,364>, a=<-18,-6,-26> +p=<3073,-468,-1039>, v=<439,-69,-146>, a=<-28,3,10> +p=<-952,1667,-2345>, v=<-133,238,-337>, a=<9,-13,23> +p=<-11,1283,-2592>, v=<-1,182,-370>, a=<-4,-12,20> +p=<-2645,474,-1289>, v=<-376,67,-186>, a=<24,-4,12> +p=<1566,-2232,1202>, v=<223,-318,175>, a=<-10,25,-9> +p=<-1639,-1476,2362>, v=<-234,-208,337>, a=<13,12,-28> +p=<-1248,-2148,-2192>, v=<-181,-303,-314>, a=<15,21,27> +p=<1426,-544,-2458>, v=<196,-77,-351>, a=<-19,3,21> +p=<-2263,-1814,286>, v=<-323,-259,40>, a=<24,18,-2> +p=<-340,1102,2847>, v=<-50,160,406>, a=<1,-11,-32> +p=<650,301,2888>, v=<90,42,407>, a=<-2,-5,-28> +p=<-1105,-2795,-956>, v=<-157,-399,-137>, a=<10,23,11> +p=<-983,1332,2733>, v=<-140,193,391>, a=<13,-13,-30> +p=<1071,2438,-1715>, v=<156,346,-244>, a=<-12,-23,17> +p=<929,2579,18>, v=<135,365,4>, a=<-8,-26,1> +p=<1785,1698,-932>, v=<255,249,-136>, a=<-19,-22,15> +p=<630,1560,-2584>, v=<90,226,-373>, a=<-8,-16,20> +p=<2477,412,1652>, v=<356,59,237>, a=<-25,-3,-20> +p=<-1871,-1335,54>, v=<-270,-192,14>, a=<15,11,9> +p=<-3166,805,-1347>, v=<-449,118,-198>, a=<34,-8,12> +p=<-1630,2254,155>, v=<-234,320,17>, a=<16,-21,-1> +p=<579,-1816,-1851>, v=<83,-259,-262>, a=<-5,20,17> +p=<-1648,2390,589>, v=<-233,341,87>, a=<9,-22,-2> +p=<-2685,882,1326>, v=<-383,126,189>, a=<27,-8,-13> +p=<2955,1306,-944>, v=<424,185,-134>, a=<-29,-12,7> +p=<2252,-67,-1949>, v=<320,-10,-280>, a=<-22,2,18> +p=<923,-2187,2201>, v=<130,-316,318>, a=<-9,25,-18> +p=<1497,-1515,1909>, v=<213,-222,269>, a=<-11,13,-19> +p=<805,769,2661>, v=<119,103,387>, a=<-7,-9,-29> +p=<-697,1877,-2490>, v=<-100,266,-354>, a=<7,-15,24> +p=<-3230,874,-404>, v=<-461,122,-58>, a=<34,-12,-1> +p=<-470,-1693,1612>, v=<-72,-241,229>, a=<7,14,-16> +p=<-2535,-340,2157>, v=<-365,-44,308>, a=<22,4,-24> +p=<982,-2403,683>, v=<140,-343,99>, a=<-9,22,-6> +p=<-1451,1597,-959>, v=<-207,232,-137>, a=<15,-15,14> +p=<-1621,1781,-1838>, v=<-239,255,-263>, a=<18,-17,18> +p=<-865,1948,-1772>, v=<-121,283,-254>, a=<3,-20,14> +p=<-259,-2815,-1217>, v=<-39,-406,-180>, a=<7,33,20> +p=<922,-2047,-2268>, v=<131,-293,-328>, a=<-7,20,22> +p=<2313,586,-1634>, v=<328,80,-230>, a=<-29,-4,13> +p=<1297,1157,2212>, v=<186,165,319>, a=<-12,-15,-25> +p=<1358,202,2548>, v=<190,22,365>, a=<-11,-2,-25> +p=<2500,-988,2095>, v=<360,-142,300>, a=<-32,12,-23> +p=<994,1256,2245>, v=<143,180,318>, a=<-15,-11,-21> +p=<-1031,1831,-1611>, v=<-150,256,-228>, a=<11,-16,15> +p=<-976,1060,-2935>, v=<-135,157,-412>, a=<11,-10,31> +p=<182,-36,2521>, v=<23,-6,358>, a=<-6,0,-22> +p=<2918,-1187,-702>, v=<415,-171,-94>, a=<-26,12,5> +p=<-1262,-1914,2189>, v=<-180,-272,312>, a=<17,22,-21> +p=<1587,-814,2556>, v=<229,-116,368>, a=<-18,9,-19> +p=<-1159,1932,-2448>, v=<-169,270,-352>, a=<11,-19,24> +p=<1424,-2911,-332>, v=<210,-418,-47>, a=<-19,31,4> +p=<-626,-2290,476>, v=<-88,-325,66>, a=<6,20,-7> +p=<778,-2891,-166>, v=<111,-416,-26>, a=<-7,29,-2> +p=<712,2596,1300>, v=<102,370,193>, a=<-7,-19,-14> +p=<816,3285,-849>, v=<120,468,-120>, a=<-3,-31,8> +p=<175,251,-3047>, v=<26,35,-437>, a=<4,-1,30> +p=<-1556,1380,-2034>, v=<-219,197,-292>, a=<10,-17,20> +p=<193,-1861,-2070>, v=<24,-265,-295>, a=<-2,21,16> +p=<2767,-1685,-452>, v=<391,-239,-62>, a=<-23,19,4> +p=<2025,625,-2565>, v=<289,87,-366>, a=<-19,-2,21> +p=<218,109,-2740>, v=<35,14,-396>, a=<-6,3,31> +p=<1040,-2055,2044>, v=<150,-295,292>, a=<-9,18,-15> +p=<-1581,-2524,-577>, v=<-229,-356,-86>, a=<12,26,7> +p=<-590,549,2679>, v=<-82,78,386>, a=<3,-5,-33> +p=<2496,-324,-1140>, v=<358,-46,-160>, a=<-26,4,11> +p=<3097,26,294>, v=<439,2,44>, a=<-29,1,-7> +p=<2875,-1108,1234>, v=<406,-156,177>, a=<-28,6,-10> +p=<914,3014,116>, v=<130,430,17>, a=<-8,-27,-3> +p=<-2795,362,865>, v=<-400,50,120>, a=<32,-3,-10> +p=<2272,-1671,-1011>, v=<317,-237,-142>, a=<-19,16,9> +p=<-1549,622,-2716>, v=<-219,88,-393>, a=<15,-8,26> +p=<1377,-594,2081>, v=<194,-83,297>, a=<-19,0,-16> +p=<1420,-459,-2722>, v=<204,-66,-388>, a=<-12,4,28> +p=<-846,1705,-2278>, v=<-121,245,-322>, a=<12,-13,18> +p=<-1090,1947,-2685>, v=<-150,275,-389>, a=<8,-19,26> +p=<-551,-2785,-147>, v=<-82,-396,-16>, a=<-1,21,2> +p=<-923,1035,-2649>, v=<-131,145,-382>, a=<11,-17,29> +p=<-281,-1030,2262>, v=<-40,-147,325>, a=<5,14,-27> +p=<-657,2838,-622>, v=<-93,406,-82>, a=<8,-31,3> +p=<1645,-1436,2101>, v=<235,-205,302>, a=<-14,12,-18> +p=<147,-1421,2442>, v=<22,-204,350>, a=<-1,13,-25> +p=<-1524,318,2963>, v=<-216,49,420>, a=<15,-3,-25> +p=<-2028,2156,-1132>, v=<-289,306,-159>, a=<18,-22,8> +p=<553,-2189,-2435>, v=<82,-314,-341>, a=<-1,23,23> +p=<1131,2122,1644>, v=<162,304,234>, a=<-17,-15,-21> +p=<2498,870,1511>, v=<359,126,217>, a=<-26,-8,-21> +p=<1714,1681,-802>, v=<237,243,-109>, a=<-21,-18,6> +p=<-1966,1326,2291>, v=<-282,184,331>, a=<19,-8,-25> +p=<-1247,2501,-688>, v=<-180,353,-95>, a=<17,-28,4> +p=<2603,-338,-133>, v=<373,-48,-21>, a=<-27,1,5> +p=<1737,-2183,-1105>, v=<252,-314,-159>, a=<-18,20,14> +p=<545,2687,353>, v=<77,379,52>, a=<-4,-23,0> +p=<-1933,-2455,-1281>, v=<-278,-350,-183>, a=<17,24,13> +p=<1870,983,1831>, v=<267,145,263>, a=<-25,-8,-16> +p=<-520,-2256,2247>, v=<-75,-320,320>, a=<2,22,-22> +p=<2638,-54,-1010>, v=<379,-4,-147>, a=<-32,4,11> +p=<1555,507,2903>, v=<222,72,417>, a=<-14,-7,-27> +p=<-1355,-2903,308>, v=<-191,-413,49>, a=<13,31,-9> +p=<-222,2087,2127>, v=<-31,298,303>, a=<5,-17,-18> +p=<1724,1781,-897>, v=<244,253,-127>, a=<-11,-19,8> +p=<-676,-2264,1365>, v=<-88,-320,198>, a=<5,24,-15> +p=<-1919,2501,-665>, v=<-275,357,-93>, a=<17,-20,3> +p=<-1931,2494,-445>, v=<-276,356,-63>, a=<18,-24,7> +p=<1190,2716,1444>, v=<171,386,202>, a=<-15,-27,-17> +p=<-2370,732,70>, v=<-331,104,11>, a=<26,-4,3> +p=<1217,2024,-1202>, v=<170,295,-170>, a=<-10,-17,8> +p=<-1986,-313,-1564>, v=<-284,-51,-225>, a=<24,0,13> +p=<-1935,1122,1681>, v=<-274,158,242>, a=<19,-5,-15> +p=<-2186,-1938,-1597>, v=<-312,-272,-226>, a=<21,19,17> +p=<-1320,2050,-22>, v=<-189,292,-3>, a=<15,-21,-2> +p=<1004,-2234,2107>, v=<146,-317,301>, a=<-8,24,-19> +p=<837,-2684,1106>, v=<118,-383,161>, a=<-10,28,-11> +p=<1663,-1698,1607>, v=<238,-246,233>, a=<-13,17,-9> +p=<-2951,-287,1974>, v=<-421,-43,282>, a=<31,3,-19> +p=<-358,-2571,-1263>, v=<-51,-366,-178>, a=<2,23,14> +p=<159,597,-2877>, v=<26,85,-413>, a=<-1,-9,27> +p=<-1908,2797,545>, v=<-274,395,80>, a=<20,-27,-1> +p=<-1367,204,-2579>, v=<-196,29,-370>, a=<13,-1,22> +p=<2276,-34,-749>, v=<325,-8,-104>, a=<-21,0,7> +p=<511,2226,-2452>, v=<71,322,-351>, a=<-9,-21,25> +p=<-2769,66,0>, v=<-389,9,2>, a=<23,0,1> +p=<-542,-1292,-2619>, v=<-75,-186,-377>, a=<5,9,28> +p=<-2209,1507,1449>, v=<-313,216,209>, a=<22,-14,-15> +p=<595,-2182,-2205>, v=<82,-311,-313>, a=<-2,22,26> +p=<-427,2844,-1517>, v=<-56,402,-216>, a=<3,-27,16> +p=<-2659,52,-2009>, v=<-383,11,-287>, a=<32,-2,23> +p=<2368,-56,1981>, v=<340,-4,287>, a=<-26,4,-21> +p=<300,597,3155>, v=<42,81,448>, a=<1,-3,-36> +p=<1142,-1310,-1919>, v=<165,-188,-280>, a=<-9,16,21> +p=<898,3116,-155>, v=<129,448,-25>, a=<-8,-30,-2> +p=<1003,1454,-2368>, v=<149,207,-339>, a=<-13,-13,24> +p=<15,-54,3435>, v=<-1,-7,490>, a=<-4,-3,-31> +p=<-1659,-2579,12>, v=<-236,-371,0>, a=<12,17,2> +p=<368,-2224,1963>, v=<47,-314,286>, a=<2,25,-19> +p=<-2488,-1527,-771>, v=<-355,-218,-106>, a=<23,16,6> +p=<3000,1389,-249>, v=<431,203,-35>, a=<-29,-13,3> +p=<-1859,608,-2480>, v=<-263,86,-354>, a=<22,-8,27> +p=<1732,2615,742>, v=<246,377,107>, a=<-18,-27,-13> +p=<1,-2495,-2304>, v=<0,-356,-329>, a=<-1,26,24> +p=<-1562,-834,2229>, v=<-224,-119,316>, a=<15,5,-25> +p=<-3428,-95,403>, v=<-491,-15,53>, a=<33,0,-1> +p=<-36,-1256,-3067>, v=<-6,-177,-439>, a=<-1,12,31> +p=<-824,2713,-958>, v=<-122,385,-134>, a=<8,-27,9> +p=<179,-1644,-1660>, v=<25,-236,-237>, a=<-1,20,20> +p=<3188,974,628>, v=<451,141,90>, a=<-34,-5,-8> +p=<-2382,-2274,445>, v=<-341,-323,66>, a=<23,18,-6> +p=<2926,1103,-293>, v=<413,155,-36>, a=<-29,-14,3> +p=<647,754,-3103>, v=<95,110,-446>, a=<-6,-5,34> +p=<-284,-2706,-1212>, v=<-40,-387,-174>, a=<-4,25,13> +p=<-598,-1998,1856>, v=<-82,-281,263>, a=<6,20,-17> +p=<-1894,-589,-2444>, v=<-270,-83,-347>, a=<16,2,27> +p=<-2978,1564,-1301>, v=<-427,223,-186>, a=<31,-15,18> +p=<3188,344,786>, v=<447,49,112>, a=<-28,-4,-10> +p=<2169,-33,2289>, v=<307,-4,324>, a=<-21,3,-24> +p=<-1001,1571,-1950>, v=<-147,224,-275>, a=<9,-15,14> +p=<2063,-844,-1719>, v=<296,-121,-244>, a=<-17,11,20> +p=<1203,-2472,-1273>, v=<167,-349,-181>, a=<-12,24,16> +p=<-1951,-1039,-2239>, v=<-277,-148,-319>, a=<23,10,20> +p=<-2373,-1668,1527>, v=<-340,-235,218>, a=<23,12,-11> +p=<1126,-2300,-2008>, v=<165,-331,-289>, a=<-15,22,21> +p=<-899,-1404,2281>, v=<-130,-199,331>, a=<11,10,-18> +p=<2348,-1713,500>, v=<337,-245,72>, a=<-23,19,-3> +p=<757,-1828,2218>, v=<106,-257,316>, a=<-6,23,-23> +p=<-2698,-15,-1300>, v=<-385,-6,-183>, a=<30,2,13> +p=<-844,2876,-393>, v=<-123,410,-57>, a=<8,-25,-2> +p=<-2288,916,-1561>, v=<-327,130,-225>, a=<23,-9,10> +p=<430,2266,-135>, v=<61,323,-19>, a=<-9,-20,1> +p=<354,724,-3228>, v=<52,106,-462>, a=<-3,-3,35> +p=<114,2431,1691>, v=<21,346,240>, a=<3,-22,-18> +p=<-2567,-1005,-499>, v=<-367,-137,-66>, a=<22,8,3> +p=<-2684,-206,-370>, v=<-383,-25,-54>, a=<28,0,7> +p=<-529,-1243,-2730>, v=<-72,-173,-393>, a=<7,8,25> +p=<-218,-2287,-2237>, v=<-31,-321,-323>, a=<2,23,19> +p=<873,-1449,1931>, v=<130,-207,274>, a=<-13,15,-18> +p=<-1391,1683,1302>, v=<-204,244,188>, a=<13,-12,-7> +p=<-2355,377,-1142>, v=<-338,52,-162>, a=<20,-3,11> +p=<-1002,204,-3023>, v=<-143,27,-426>, a=<6,-4,30> +p=<3022,-1753,789>, v=<428,-245,113>, a=<-26,19,-9> +p=<995,-1461,-1906>, v=<143,-205,-269>, a=<-4,14,17> +p=<1446,-513,-2058>, v=<208,-78,-293>, a=<-20,5,25> +p=<659,2186,132>, v=<91,312,22>, a=<-9,-21,-6> +p=<-7,654,2741>, v=<-1,92,391>, a=<1,-6,-27> +p=<402,1644,-1510>, v=<55,236,-212>, a=<-4,-14,15> +p=<20,-3022,-269>, v=<5,-429,-42>, a=<1,29,6> +p=<-2430,1935,-274>, v=<-347,279,-43>, a=<24,-25,10> +p=<1042,-1844,-1253>, v=<142,-261,-178>, a=<-14,17,10> +p=<-2337,2080,-901>, v=<-339,301,-128>, a=<18,-22,6> +p=<776,164,-2398>, v=<112,26,-342>, a=<-4,-3,23> +p=<60,851,-2490>, v=<8,120,-353>, a=<0,-14,24> \ No newline at end of file diff --git a/csharp/BScottDay22.cs b/csharp/BScottDay22.cs new file mode 100644 index 0000000..32ffc1e --- /dev/null +++ b/csharp/BScottDay22.cs @@ -0,0 +1,186 @@ +using System; +using System.IO; + +namespace AOC2017 +{ + class BScottDay22 : BScottSolution + { + public override string Name => "Day 22: Sporifica Virus"; + + public override void Run() + { + string[] exampleInput = new[] + { + "..#", + "#..", + "..." + }; + Console.WriteLine($"Part 1 Example Answer: {SporificaVirusPart1(exampleInput, 10000)}"); + Console.WriteLine($"Part 2 Example Answer: {SporificaVirusPart2(exampleInput, 10000000)}"); + + string[] input = File.ReadAllLines("BScottDay22.txt"); + Console.WriteLine($"Part 1 Answer: {SporificaVirusPart1(input, 10000)}"); + Console.WriteLine($"Part 2 Answer: {SporificaVirusPart2(input, 10000000)}"); + } + + private const int NORTH = 0; + private const int EAST = 1; + private const int SOUTH = 2; + private const int WEST = 3; + + private const int LEFT = 0; + private const int RIGHT = 1; + private const int REVERSE = 2; + + private char[][] CreateGrid(string[] input) + { + int expand = 1000; + int infiniteGridHeight = input.Length * (expand + 1); + int infiniteGridWidth = input[0].Length * (expand + 1); + + // create big grid + char[][] grid = new char[infiniteGridHeight][]; + for (int i = 0; i < infiniteGridHeight; i++) + grid[i] = new char[infiniteGridWidth]; + + // initialize big grid + for (int i = 0; i < infiniteGridHeight; i++) + for (int j = 0; j < infiniteGridWidth; j++) + grid[i][j] = '.'; + + // copy to the center + for (int i = 0; i < input.Length; i++) + for (int j = 0; j < input[0].Length; j++) + grid[i + (input.Length * expand / 2)][j + (input[0].Length * expand / 2)] = input[i][j]; + + return grid; + } + + private int SporificaVirusPart1(string[] input, int bursts) + { + char[][] grid = CreateGrid(input); + + int currentX = 0, currentY = 0; + int direction = NORTH; + int infected = 0; + int centerY = (grid.Length / 2); + int centerX = (grid[0].Length / 2); + + for (int i = 0; i < bursts; i++) + { + if (grid[centerY + currentY][centerX + currentX] == '.') // Clean + { + direction = FindNextDirection(direction, LEFT); + grid[centerY + currentY][centerX + currentX] = '#'; + infected++; + } + else // Infected + { + direction = FindNextDirection(direction, RIGHT); + grid[centerY + currentY][centerX + currentX] = '.'; + } + + switch (direction) + { + case NORTH: + currentY--; + break; + case EAST: + currentX++; + break; + case SOUTH: + currentY++; + break; + case WEST: + currentX--; + break; + } + } + + return infected; + } + + private int SporificaVirusPart2(string[] input, int bursts) + { + char[][] grid = CreateGrid(input); + + int currentX = 0, currentY = 0; + int direction = NORTH; + int infected = 0; + + int centerY = (grid.Length / 2); + int centerX = (grid[0].Length / 2); + + for (int i = 0; i < bursts; i++) + { + if (grid[centerY + currentY][centerX + currentX] == '.') // Clean + { + direction = FindNextDirection(direction, LEFT); + grid[centerY + currentY][centerX + currentX] = 'W'; + } + else if (grid[centerY + currentY][centerX + currentX] == 'W') // Weakened + { + grid[centerY + currentY][centerX + currentX] = '#'; + infected++; + } + else if (grid[centerY + currentY][centerX + currentX] == '#') // Infected + { + direction = FindNextDirection(direction, RIGHT); + grid[centerY + currentY][centerX + currentX] = 'F'; + } + else // Flagged + { + direction = FindNextDirection(direction, REVERSE); + grid[centerY + currentY][centerX + currentX] = '.'; + } + + switch (direction) + { + case NORTH: + currentY--; + break; + case EAST: + currentX++; + break; + case SOUTH: + currentY++; + break; + case WEST: + currentX--; + break; + } + } + + return infected; + } + + private int FindNextDirection(int currentDirection, int turn) + { + switch (currentDirection) + { + case NORTH: + if (turn == RIGHT) return EAST; + if (turn == LEFT) return WEST; + if (turn == REVERSE) return SOUTH; + break; + case EAST: + if (turn == LEFT) return NORTH; + if (turn == RIGHT) return SOUTH; + if (turn == REVERSE) return WEST; + break; + case SOUTH: + if (turn == LEFT) return EAST; + if (turn == RIGHT) return WEST; + if (turn == REVERSE) return NORTH; + break; + case WEST: + if (turn == RIGHT) return NORTH; + if (turn == LEFT) return SOUTH; + if (turn == REVERSE) return EAST; + break; + } + + return -1; + } + } +} diff --git a/csharp/BScottDay22.txt b/csharp/BScottDay22.txt new file mode 100644 index 0000000..0a15fce --- /dev/null +++ b/csharp/BScottDay22.txt @@ -0,0 +1,25 @@ +#.....##.####.#.######### +.###..#..#..####.##....#. +..#########...###...####. +.##.#.##..#.#..#.#....### +...##....###..#.#..#.###. +###..#...######.####.#.#. +#..###..###..###.###.##.. +.#.#.###.#.#...####..#... +##........##.####..##...# +.#.##..#.#....##.##.##..# +###......#..##.####.###.# +....#..###..#######.#...# +#####.....#.##.#..#..#### +.#.###.#.###..##.#..####. +..#..##.###...#######.... +.#.##.#.#.#.#...###.#.#.. +##.###.#.#.###.#......#.. +###..##.#...#....#..####. +.#.#.....#..#....##..#..# +#####.#.##..#...##..#.... +##..#.#.#.####.#.##...##. +..#..#.#.####...#........ +###.###.##.#..#.##.....#. +.##..##.##...#..#..#.#..# +#...####.#.##...#..#.#.## \ No newline at end of file diff --git a/csharp/BScottDay24.cs b/csharp/BScottDay24.cs new file mode 100644 index 0000000..a5e4a93 --- /dev/null +++ b/csharp/BScottDay24.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.IO; + +namespace AOC2017 +{ + class BScottDay24 : BScottSolution + { + private readonly List _components = new List(); + private uint _maxOverallStrength; + private uint _maxLength; + private uint _maxStrengthAmongLongest; + + public override string Name => "Day 24: Electromagnetic Moat"; + + public override void Run() + { + string[] input = { + "0/2", + "2/2", + "2/3", + "3/4", + "3/5", + "0/1", + "10/1", + "9/10" + }; + + ProcessInput(input); + Console.WriteLine($"Part 1 Example Answer: {_maxOverallStrength}"); + Console.WriteLine($"Part 2 Example Answer: {_maxStrengthAmongLongest}"); + + ProcessInput(File.ReadAllLines("BScottDay24.txt")); + Console.WriteLine($"Part 1 Answer: {_maxOverallStrength}"); + Console.WriteLine($"Part 2 Answer: {_maxStrengthAmongLongest}"); + } + + private void ProcessInput(string[] input) + { + _components.Clear(); + for (int i = 0; i < input.Length; i++) + { + string[] values = input[i].Split('/'); + _components.Add(new Component(uint.Parse(values[0]), uint.Parse(values[1]), false)); + } + + _maxOverallStrength = 0; + _maxLength = 0; + _maxStrengthAmongLongest = 0; + + RecursiveComponentScan(0, 0, 0); + } + + private void RecursiveComponentScan(uint ports, uint length, uint strength) + { + _maxOverallStrength = Math.Max(strength, _maxOverallStrength); + _maxLength = Math.Max(length, _maxLength); + + if (length == _maxLength) + _maxStrengthAmongLongest = Math.Max(strength, _maxStrengthAmongLongest); + + foreach (var c in _components) + { + if (c.Used || (c.A != ports && c.B != ports)) continue; + c.Used = true; + RecursiveComponentScan((c.A == ports) ? c.B : c.A, length + 1, strength + c.A + c.B); + c.Used = false; + } + } + + class Component + { + public uint A { get; } + public uint B { get; } + public bool Used { get; set; } + + public Component(uint a, uint b, bool used) + { + A = a; + B = b; + Used = used; + } + } + } +} diff --git a/csharp/BScottDay24.txt b/csharp/BScottDay24.txt new file mode 100644 index 0000000..279b994 --- /dev/null +++ b/csharp/BScottDay24.txt @@ -0,0 +1,54 @@ +48/5 +25/10 +35/49 +34/41 +35/35 +47/35 +34/46 +47/23 +28/8 +27/21 +40/11 +22/50 +48/42 +38/17 +50/33 +13/13 +22/33 +17/29 +50/0 +20/47 +28/0 +42/4 +46/22 +19/35 +17/22 +33/37 +47/7 +35/20 +8/36 +24/34 +6/7 +7/43 +45/37 +21/31 +37/26 +16/5 +11/14 +7/23 +2/23 +3/25 +20/20 +18/20 +19/34 +25/46 +41/24 +0/33 +3/7 +49/38 +47/22 +44/15 +24/21 +10/35 +6/21 +14/50 \ No newline at end of file diff --git a/csharp/BScottDay25.cs b/csharp/BScottDay25.cs new file mode 100644 index 0000000..99e3187 --- /dev/null +++ b/csharp/BScottDay25.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace AOC2017 +{ + class BScottDay25 : BScottSolution + { + public override string Name => "Day 25: The Halting Problem"; + + public override void Run() + { + TuringMachine machine = new TuringMachine(File.ReadAllLines("BScottDay25.txt")); + Console.WriteLine($"Part 1 Answer: {machine.RunPart1()}"); + } + } + + enum InstructionType + { + Write, + Move, + Continue + } + + class State + { + public string Id { get; set; } + public Dictionary> ConditionActions { get; set; } + + public State(string id) + { + Id = id; + ConditionActions = new Dictionary>(); + } + } + + class Instruction + { + public InstructionType InstructionType { get; set; } + public object Value { get; set; } + + public Instruction(InstructionType instructionType, object value) + { + InstructionType = instructionType; + Value = value; + } + } + class TuringMachine + { + private readonly Dictionary _states = new Dictionary(); + private readonly string _initialState = ""; + private readonly long _checksumSteps = 0; + + public TuringMachine(string[] input) + { + State currentState = null; + int currentCondition = -1; + for (int i = 0; i < input.Length; i++) + { + if(input[i].Trim().Length == 0) + continue; + + string[] args = input[i].Trim().Replace(".", "").Replace(":", "").Split(' '); + + if (args[0] == "Begin") + { + _initialState = args[3].Substring(0, 1); + } + else if (args[0] == "Perform") + { + _checksumSteps = int.Parse(args[5]); + } + else if (args[0] == "In") + { + if (currentState != null) + _states.Add(currentState.Id, currentState); + currentState = new State(args[2]); + } + else if (args[0] == "If") + { + currentCondition = int.Parse(args[5]); + currentState?.ConditionActions.Add(currentCondition, new List()); + } + else if (args[0] == "-") + { + if (args[1] == "Write") + currentState?.ConditionActions[currentCondition].Add(new Instruction(InstructionType.Write, int.Parse(args[4]))); + else if (args[1] == "Move") + currentState?.ConditionActions[currentCondition].Add(new Instruction(InstructionType.Move, args[6])); + else if (args[1] == "Continue") + currentState?.ConditionActions[currentCondition].Add(new Instruction(InstructionType.Continue, args[4])); + } + } + + // add final state + if (currentState != null) + _states.Add(currentState.Id, currentState); + } + + public long RunPart1() + { + int[] tape = new int[_checksumSteps]; + int pos = tape.Length / 2; + string state = _initialState; + for (int i = 0; i < _checksumSteps; i++) + { + int value = tape[pos]; + for (int j = 0; j < _states[state].ConditionActions[value].Count; j++) + { + switch (_states[state].ConditionActions[value][j].InstructionType) + { + case InstructionType.Move: + pos += ((string)_states[state].ConditionActions[value][j].Value == "left" ? -1 : 1); + break; + case InstructionType.Write: + tape[pos] = (int)_states[state].ConditionActions[value][j].Value; + break; + case InstructionType.Continue: + state = (string) _states[state].ConditionActions[value][j].Value; + break; + } + } + } + return tape.Sum(); + } + } +} diff --git a/csharp/BScottDay25.txt b/csharp/BScottDay25.txt new file mode 100644 index 0000000..9eeca54 --- /dev/null +++ b/csharp/BScottDay25.txt @@ -0,0 +1,62 @@ +Begin in state A. +Perform a diagnostic checksum after 12656374 steps. + +In state A: + If the current value is 0: + - Write the value 1. + - Move one slot to the right. + - Continue with state B. + If the current value is 1: + - Write the value 0. + - Move one slot to the left. + - Continue with state C. + +In state B: + If the current value is 0: + - Write the value 1. + - Move one slot to the left. + - Continue with state A. + If the current value is 1: + - Write the value 1. + - Move one slot to the left. + - Continue with state D. + +In state C: + If the current value is 0: + - Write the value 1. + - Move one slot to the right. + - Continue with state D. + If the current value is 1: + - Write the value 0. + - Move one slot to the right. + - Continue with state C. + +In state D: + If the current value is 0: + - Write the value 0. + - Move one slot to the left. + - Continue with state B. + If the current value is 1: + - Write the value 0. + - Move one slot to the right. + - Continue with state E. + +In state E: + If the current value is 0: + - Write the value 1. + - Move one slot to the right. + - Continue with state C. + If the current value is 1: + - Write the value 1. + - Move one slot to the left. + - Continue with state F. + +In state F: + If the current value is 0: + - Write the value 1. + - Move one slot to the left. + - Continue with state E. + If the current value is 1: + - Write the value 1. + - Move one slot to the right. + - Continue with state A. \ No newline at end of file diff --git a/csharp/BScottDay3.cs b/csharp/BScottDay3.cs new file mode 100644 index 0000000..de19ea0 --- /dev/null +++ b/csharp/BScottDay3.cs @@ -0,0 +1,108 @@ +using System; + +namespace AOC2017 +{ + class BScottDay3 : BScottSolution + { + public override string Name => "Day 3: Spiral Memory"; + + public override void Run() + { + Console.WriteLine($"Part 1 Example Answer #1 (1): {SpiralMemoryPart1(1)}"); + Console.WriteLine($"Part 1 Example Answer #2 (12): {SpiralMemoryPart1(12)}"); + Console.WriteLine($"Part 1 Example Answer #3 (23): {SpiralMemoryPart1(23)}"); + Console.WriteLine($"Part 1 Example Answer #4 (1024): {SpiralMemoryPart1(1024)}"); + + int value = 325489; // Puzzle Input + Console.WriteLine($"Part 1 Answer: {SpiralMemoryPart1(value)}"); + Console.WriteLine($"Part 2 Answer: {SpiralMemoryPart2(value)}"); + } + + static int SpiralMemoryPart1(int value) + { + Point position = GetPosition(value); + return Math.Abs(position.X) + Math.Abs(position.Y); + } + + // Unfortunatly I can't take credit for solving this. This was ported and optimized slightly from a C function posted to github. + // Included this just for the sake of completion. + // Source: https://github.com/vesche/adventofcode-2017/blob/master/day03.c + // Integer Sequence: https://oeis.org/A141481/b141481.txt + static int SpiralMemoryPart2(int value) + { + int x = 0, y = 0, dx = 0, dy = -1; + int[,] array = new int[1000, 3]; + int[,] coords = new int[,] { { 1, 0 }, { 1, -1 }, { 0, -1 }, { -1, -1 }, { -1, 0 }, { -1, 1 }, { 0, 1 }, { 1, 1 } }; + + for (int step = 0; step < 1000; step++) + { + int total = 0; + + for (int i = 0; i < 1000; i++) + { + int tx = array[i, 0]; + int ty = array[i, 1]; + + for (int j = 0; j < 8; j++) + { + if ((x + coords[j, 0] == tx) && (y + coords[j, 1] == ty)) + total += array[i, 2]; + } + } + + array[step, 0] = x; + array[step, 1] = y; + array[step, 2] = (x == 0 && y == 0) ? 1 : total; + + if (total > value) + return total; + + if ((x == y) || ((x < 0) && (x == -y)) || ((x > 0) && (x == 1 - y))) + { + int dxtmp = dx; + dx = -dy; + dy = dxtmp; + } + + x += dx; + y += dy; + } + + return -1; + } + + // Inverse ulam spiral coords + static Point GetPosition(int n) + { + double k = Math.Ceiling((Math.Sqrt(n) - 1) / 2); + double t = 2 * k + 1; + double m = Math.Pow(t, 2); + + t = t - 1; + if (n >= m - t) + return new Point((int)(k - (m - n)), (int)-k); + + m = m - t; + if (n >= m - t) + return new Point((int)-k, (int)(-k + (m - n))); + + m = m - t; + if (n >= m - t) + return new Point((int)(-k + (m - n)), (int)k); + + return new Point((int)k, (int)(k - (m - n - t))); + } + + struct Point + { + public int X { get; set; } + public int Y { get; set; } + + public Point(int x, int y) + { + this.X = x; + this.Y = y; + } + } + } +} diff --git a/csharp/BScottDay4.cs b/csharp/BScottDay4.cs new file mode 100644 index 0000000..0363c40 --- /dev/null +++ b/csharp/BScottDay4.cs @@ -0,0 +1,44 @@ +using System; +using System.Linq; +using System.IO; + +namespace AOC2017 +{ + class BScottDay4 : BScottSolution + { + public override string Name => "Day 4: High-Entropy Passphrases"; + + public override void Run() + { + string[] input = File.ReadAllLines("BScottDay4.txt"); + Console.WriteLine($"Part 1 Answer: {GetValidPassPhrasesPart1(input)}"); + Console.WriteLine($"Part 2 Answer: {GetValidPassPhrasesPart2(input)}"); + } + + static int GetValidPassPhrasesPart1(string[] input) + { + int count = 0; + for (int i = 0; i < input.Length; i++) + { + string[] passStrings = input[i].Split(new char[] {' '}); + string[] distinctStrings = passStrings.Distinct().ToArray(); + if (passStrings.Length == distinctStrings.Length) + count++; + } + return count; + } + + static int GetValidPassPhrasesPart2(string[] input) + { + int count = 0; + for (int i = 0; i < input.Length; i++) + { + string[] passStrings = Array.ConvertAll(input[i].Split(new char[] { ' ' }), s => string.Concat(s.OrderBy(c => c))); + string[] distinctStrings = passStrings.Distinct().ToArray(); + if (passStrings.Length == distinctStrings.Length) + count++; + } + return count; + } + } +} diff --git a/csharp/BScottDay4.txt b/csharp/BScottDay4.txt new file mode 100644 index 0000000..51c03ce --- /dev/null +++ b/csharp/BScottDay4.txt @@ -0,0 +1,512 @@ +pphsv ojtou brvhsj cer ntfhlra udeh ccgtyzc zoyzmh jum lugbnk +vxjnf fzqitnj uyfck blnl impo kxoow nngd worcm bdesehw +caibh nfuk kfnu llfdbz uxjty yxjut jcea +qiho qif eupwww avyglnj nxzotsu hio lws +xjty usocjsh pivk qnknunc yjcgh bwya djw zpyr +ycfmfe mgq sjiomg nfzjul bjwkmgu yvsnvgj dcjupu wzz blmn +rdowgbt vpwfdoi blzl laghnk gsa vhnpo cztxzlb rtz hvwonhb eciju pfjtbo +bqs bqs dbutvgf mmzb izpyud rap izpyud xlzeb mnj hjncs +xpu vwp nujcos piu irindir tpmfd umtvlm gznu +sfpuxar qcnbte omouazv cnh uaxspfr sepolf rusafpx +xbmaf iceyqqq sabpt gliexel muubepe qqiyqce fmrcc eazk obkeonl fmccr kgk +apg gbycwe gap pag +gagv saqbk lwtllc wnhzz khxsjc +lgc alen rlmsp anel gcbvg +bujlaz rks rlqf deknmee yrp +scqvl weusbc bgvaz vgg cjwsfno vqy zbq aqy tvf bgzav +hbki vei fxdwljs myjuba elbsib pvy xxjxgi dtgv +linzaeu qbwdke fdg pykw +qvtdd aco aav bpu mvkcuc kjfj japgfki jfdl gem hog bdzsiea +wpbigkb lzhwba jssjkn qvb kmwu qddv +iny osyvqnt tumunzb torq bdeneg wywank poza ipp iggorw +tuko mhdbsf vmjdop jomaqpj rcdsud hmgspr lsas nzmwc +cirkjq nmjuu xtgejv gtexvj vjcmtqq unjmu +xsdmezq xvqjvqp exhygy qahju hvd qadmdh lok +wvvys kax rohrrar rwhnvi lhnmefp lsktouy bxilosp +wayf diobnl zvu obnidl oibnld +cewil ygsf ffzp ruxhu vah lnvwt aef lnnjc kgkb gxtlx feko +uti epphrin pywths cpzzh csjei nczhamy gayxmb bdcytq xkx fgmt +qvzyuwi dwo swkw bwjdrn dasgd ijgw vzabaop yefyhmc wgij +dyg sugrf vid etz weyqg nyntx dwfgwm khon hnzzzn xfyra +ofbh bdrsk rdrjj elaxvk jrjdr +msxau rsocvx zxdda mxz lknl +qktaywx dirpdbf unqnd wbrwkuu fvmqwl emxr big +xwz kvsydc ayokjyy qiah omw neo htltxx fxhwqwj colqvbb sxmo ephfkex +ncjxoaf fwjkc czmhv ylg axcjofn dvj bzqjku opvcr jiwzucg vmhzc +gmmnrt zqar twdwrg qiwwki fcbr lixm hjdwwe moiva +roinlxg cxeezve whannk cxeezve pyoj boweioy cpkgxsz +qkct qso xlb xyy aellfet rzt cbboow devfb nih fhbfxzi +qyc ltxia alixt atilx xtgrv +svruz ufvo rvesnxv dik vzurs jjg idk +xeudhrg hudn cilo ljplosb +kpb oyzvywx vldko qhfkwod bkeutk zqcqug pbriu wqocos +qkngzfy whobyri aze jvipdty ocirbep icqwc +kzxxlab sjr zhymws xkbx +nnxs gkwtld dwhkry snuibq dtdl aicug bhtlfzp qzk jctos +regvro mxcq hqof yraucxi jhkol iuxineo pbtnk rfjwc szgjpr ndqqj vfgm +yqrfox xoqrfy utbryu utubyr +jdubjt wqrl wnk rlqw nwiq pnbn qinw uaff ftdo htfrav +rum mur umr tij ovbahl losao imawwpb wadhww tbteyqc +napxd kzeiqcp ppgqucm xkityt frq hugrp gjgtt gmuqppc zwqme +xyuzs ysch howlzgu dkqppbs nvbiz mks mtxv vivouex uvawq +ffe lfsn nlq mpulheq ikcfo wdtz cnwsbph zkib muu +bqkxav wtecb lxwdhr kqbavx aqxvbk +czwswqx ldkxapd pfwd bdkkj iqohla cwosw ihqpd pcc ckhabbn +foiip hau rbqiyhh htm omeubgh symh evfcqg +lqx xlq rsgf izu esetis +npsrkdj fvulgkw eovw mzr uobcze azb tij ihoer ehori jit wknsqhm +gnrksh xwggt oosi bpnmhx qqaa mpmryu jhzyz +yad gbexqcr gbexqcr gbexqcr +ldca xxhznn twyy ytwy zhxnnx xfmpi +floioot kfyh dhibv ezyznar sfg sfg ezyznar +cinioim iiocmin ypla aypl +mhwcjbz dftuqsy wswop eizbf ptsd +ehx mlh nfxgfkz uuw xftmn ptlkbo vsnyo ttwce +oexvf orcg cncnkfk comvhl +lqewsj lyulrcl efixd qvd fhznqnz yvrkwyi xmhgc vzbp +dmr wrxqh thcm giomp rtvl ssc gwq rbklw hcmt fjvud +teozhb dmzwfv qkq pvcqfqq +hvlebc qqmg repxk zwrjdx ztruwb such tyligs ybg +psa rqznokd lgc jstqres yiqt mbiody xazb xjuk dtb +lea ncm rnh myzqzwm +wjml eums ueflvbr cjpgnl qduunu zfxaai jwlm lprzzg vrn ttetyr sume +uwkgeu uiahd plyewgi vveo nwhsitz mcitc uvk zsxehgs sewl +lnbdrka sgtivn sozzq mgd vhxfnlr twrfpk +gadphmk mbx lmlbrf tsnehnr lawdpm fnima gxgl +umty vrn dpow fsnnpjv fsnvnjp nnsvpjf cioaio +euu uue zeskmtk hob stekkzm +ypqpri qwdju ypriqp iprqyp jnoxqa +lkppi ingfxw wlulvp yhwrli nxwigf oyuhq ggfslx +kdd ypvr pyvr waw vyrp khqq mamxca bapq gobfm +iuq upvdpv zxef bfwns lmq lxswr kpsqo pwde iaaou nsw udy +lgzo nil ovgrmt omgtrv jrqp pqrj lit +uumyu iiakfj gvdtzz qbux yxn ejs dvlts +hcm ghutxq zswi tmyhqef hgxtuq +shkhkdk kad seubeax kdl mzu +cpykgr skx rfhpor xsk moyhlai ogv ophfrr dxipuuh +beyw jvrre opodn zdoajhx fhg ijs drczy drczy hjungq +jrzieja gfg yzdn yxm wshibsn fgg +xtylh vxscmvp rfymq uzhpyea spxcmvv dlni msj yxhlt +eov awql miv miv eov +mmvrfbg fjiyf hvqz zpuqmbf fszyuz ldfgni wemfjl fjjpl rbnpy rfb +ppzpeh nam ntv xnchtyk hja hpepzp foj bibvx nmmdlff bsrkp +qiy qiy umhlnh qiy +tyds oepk wae tdsy sdty +ukawr rkwau ghtjhm axy +wtbjiv btjivw ewaf hwk ttq +kdpun myve sqv rhvpy fnjwt puw ujhf thsp nkdadqr +vyw wkkpdpy xlgz lmmcuve ncuq lmotk +pmsfw vxd jpe qxlyasx ejp gwuv +pmgyndm ezofbvx nicbwrw kwnlj yjvnas fdpkfo mqcsyhn pyjpf fbexvzo vkftm erl +trmwvk rywuzoz hbidea kicohfz heidab deaibh +sogf govd dknpk vxrvk rlm vwhjk +xnxbfmw wguzrhd zbmkz piwppa mkbzz xvwrdgy flusfqb +cgduq hbnwr xfx mrejb ckw zkbaihf cloow cwk wuvthv iwqctx +vugx qbucd gxuv ocb cob +ilmet fbelxxz qratdfn unoj hbc duv srmikz +vnzuw zgpbqgf uzm thysyxd dinfh bgvr olungg ksd dsetwqz hpg +omagsf zpr coa kknx bzithq pewp flvoz xiiq weojqr wpep +aagj gcglqt gqcglt xbfx dhdx lbx +pljq plxuscw ilh wfk lhi hli fouieyw +hvnh zvm aqy dzitirm veq ctux +lglhs aqibdii hjbn cfgc qrg pnbntcx owoks ebz +jozngde lwne mbo omb fnyzvvj gndozje +bbdgc igtdj uhahgp sqduko +uuspedu fgnspm ewc slly jbs chl heanm abqijx kadvgxu +akfsft skna kusjqr rkqujs +erc vrljpu lruvjp lpvjur +iors hcdr fsqtcj vop vmn dtqnz tov oscjlw cdrh ctfjsq lrnts +fxp mczo sjlcxa mzoc jmsq hcxybow dmrr bcoxhyw +aac ewraerq odmxpz aac aac +zzio zebmxa szeej poordr gmi owwnnh xfx rzrab lfey jesze +akc yyoj vqod drtne +joxhvyf ymasnbr omouvq isxdrr +qyi ayrkzu jsk vqvvno jkkuxi zufnnwu mrsszdf +ocqi htfb tzjna cdt wkzhynm eergf +yokzugl usyuqu qvotq uweqyow lygkzuo kpmqmb uglyzok +glvshl imqv jrv xlpnsy gcg psj irtiamg wkl +bjcpc nvyloa dkkan efj okubpc cxlowm eone kmpny +cyxqys nmuaftv gqxj gtvsc +beouh dioxiah kizdy hyi cozrray rave fqxmxmj gdm +frjz amrsat lxvhzj azhevtu vxlzhj +zwmnrk sbk txzrcsj sbk oosgfej cvh zuthibi onvwd sbk nhwpzq +gzamt vraw kuk ugayl lyaug bww rwav ijah +bdjirxg vifjr rhbxpa oao yrhjxoi pbn +navb umesiys yhix phuhu aekkciu nlnsiq wjf idqdwp +cmhw rsu urs ziprlfe +kyhxitv cgty bnwjyq cygt sgjn pdab imarvhg yjbnqw +axaa ejancv yau njpc jvwy bpft kwjvg qzrbvtm diu njpc bpft +ambj upe rmqr yudbiqf krudp pqyf +tnb mobnpv vep ohxoc cyip wxyccfo jrbi rwsws kls zlv oohxc +fjh dmb hlbq bqc jhf kax suz fjjg rkpc +wjnn byfirm goeyh xtjmdka +tgyfxx hefpxln mveobqr yeo ftfn srt vim vlcu hevoi xtaaff +imyql xotcl poql rlueapq bkwykm hlalk bkwykm +gkec zff hbmtq rjxjbcf arerlu pvz cdaqi nijmhv uodwjh +mpctof mopftc ksfbat sbkatf +nvdd jub bvi kyggdbx nwtiok gjt mgsm dbhsn rzibgjm dvdn eqi +ysd iirp dfgzza wiyeoou ysd ispkv bcqg wwzqgq xphse +ntq ivposb gsd ezl tlkztp lez qyurp vxsmg dgs +wijs rydbj onm usiyqzb hwrol giusanb kewukl yziuqbs doojam nom +lfacyy xwwast truqtt tzneimn uxsydc ktu eqyaj ndszak +ffleooc kikif fohgop aucy moubqxu +iaxc pnwexdl ncy vmwm xrqoi wpgftq rofx utyzjuf stdxq twpgfq +ppmlp etsvi cjdx poly ynx vfxpslg mqjo qnpsage flpsxvg jwsxiqt +lbyhnb kflrpeq ssoti webxr embbjd kbnx ubzqco +khhc vwuqzb ebocbko rwmonkz edfqn hzh qhncoq gbwdi wjeg ocwow +ghzhd kcxblp lzwkkr gzhdh umk pblcxk +wyajtw jiff ouylv sni lwhlrg avqjiis igzx wbl lhrwgl +glhh kaxha tqii hwzx rgic kaxha rgyidmt qdgxfl ynjc oibfij +bapj bix rjniw ynbql idlvnmt wynpzbl zlpuoix kvn kakwys +aldpxxu iojxp rif xbyqtr jffdvy qnrq tqwsdiu +ulssco ktbymjw bfj zhkg zgc ctyri +ilrmq wfahcgk mrlqi bguad inj +cjzc rekuy ifr wfkg sple +cvjkp qbmumnp mprg ltmwxxh zpemtyb ozzssfd ksu mgrp +nvc sxp mpkxz bhlctq hguaa yrdkm iwsgfg qjssh gobbies hucdh +jdxrjw qmo qmo vobhnu +dnjib wtjp rfdjqdj skpvrb vkwevb kxxovp +fzi kicta zkuvr rfaawv ehklq cfdjsyb tukahwr zkuvr kicta ouq +aba ytdguk gqmpn hvxabff hvxabff dckj +fna wxyqhxd hvy khsu yypoyy lvvue medheua gim slf drdbeh ikihf +jquz wwo wwo ghlz jrbvb jrbvb +jwzvkl yjw ouwla yjw ouwla +zsvlgyf rzqbtj qygynem ukdgjm lbsyh tmdzp fbcaim eymzr +pvw sbs dvsa plmepl pwv ayxk vpw dwt +inayadn pnti yzhxk azga gxq aznbciu gjnmyqm +isgf ndqmk beyqq ebyqq srtzxo aiiw oqfuwp uoqwfp buejctv pxbk +pzl irv tzvzdb wcy eszm ybwiw ycw riizifd iybww +btpu cua azzqffy owcr +ofwq sqlpzat lozdxlc aevjmpc lcolzxd wbbysn qwfo vcrx gdzgi +dbpfmxu ydsxwl ijn svxtop csep ldqeog ffye zcrl soh aclw +wyiyyhv vyhiywy obgi hiyywvy +ddvaoc lhv spurn rgxyy onjw illvn yryxg xyyrg +vid wdttqq kajr myip +wolqlue phlunpt dcmmkfm sgxk dmmckmf sfng jlbsntq dxp +zmneyho fswj xdgsjc oefwjdi htgxvbd tgqrq xodoa +ynw bygqdnh hhmnkuw cojqrke qszzdjo orskwq mdfae asabn +vvpm vkj pcxghao caoxphg axhblxb vvmp +txox nzy eqn zgir dytsi girz ffa ugjjbzj brob fll +kbz pukqbd fiwmuh umwihf bkz dvz +vgs vejs vejs vejs mbkyjjy +viqmnmu bitkyw nddnk dknnd cldnpp hipub plcdpn fdzzpb mmyomn +ndylnfx gozlrx ngptk rnpteb wtacx xmtcjy xldha +fey doyxis ampmtr ycqh syw cqhlj hnngx +dijf nac tvkq ayo akbj lzmngdm wfxpn bpyvrf cvdqpa +zsofz lhho hgat wqskga mnt +mylwm zxsd omzpa waz hcrr lxmpq jsw sqtwak pzoma +rwhgsgt ysdq ztihici mpwcawv alkqg wsxiwx +snldn bcb anjdv cbb awsscc cqxult hjmjew mcycb fdpdg sesrh +kukrqm fawafz qdim wyobtqx bnvjnqg dcvqxta yptr nnpu ughldqp duo zafwaf +knb yjqb bscpnt nzg sqeu zkahna ttuf nsbtpc ixwit vucwj idix +bfqyx xlnpc ijrxu zkqi kjxtahr fgag orusms adi bfqyx bfqyx +dqddc ncbv bvfk hefikb dqddc hqjl otpx zfiu +ntkv qunrzx eztzure ctt rjo bkdt znvd jwdf gqhf mmhrzgt +zeavm hkbf rawqwuf pis dojlkt vnjhmi uvk cufmn qginezd xyut +hnidzk chlctc yst pepd dxntbxg vqk daxfpmu wshyddl +jgd vesqgo bdyqy igl ahstdm wjtd lrtkjsv tjsj sccxbih esn gkkzj +iisiswh jll rhlaf jqwwgfa wmhyo izva vrg zjkak nlxxfer rvhx +mkrkd jlqtpy ukstro ktuors wsj ynqpbp kpiyxzv nxeiwg xpzvkiy +jbr gnct fwklekg cmfqnm ctn gqobrs kwht +pztmjs yiffc kfhsblx yiffc yiffc +biezil iiezbl bzeiil smocoju +viiigm gmmmk yeiv dxzogro qsmzsur hukzwjn lcle syo mdj uruf rxfseu +extchsd adeff ouikoj fyaclr rwwvqsd dooe tcxheds zrdqqhm fdoxv kbxi tlcj +aycnydq qlxhka zoi shplo qll +bfry lbwckm ltq rbfy gpn vojp ruj dpxcve geq +svtvfwh lca lac qia vhwsftv nookdfz xgjiaf yvcdlt +aspgqym fryuzhx bbydf tbn bwutsc fqgi zij lmxhog qnmse +rbb gsys volnas onvlas lonasv vwjdso lnteapy +got iauk kficn jvfuy yvoe jcxwui hyamqx mke mwh jcxwui hyamqx +avutfi ggmha dkopc kothnnb syoi xsd wjedywy +oziejyz yzeijoz hnthyn knj juuq qujtp kgq bymlnlf yicf +zsejuy dybeap hvowmvn okxb yoi epadby cnzjk xfwprzc +lacg iiix fblhxvf nrkkol lnafzw qspzsn gvdy ipj zub uouseo +evukwkh ycjxxc lptwmf pmd izxdsos zrkavf pgjoy zwokg mpjiej +vqw ijwoy eaw wvq svmcq ccxi nyub ynlq eqornax uprt pygfe +plue okbbm btvm gba kutn jacjx ysqt lvx pcxxu qcf +pyw ffjfudq bvk hsdwdva fjnivhf odbmw krpgrj +hziesm bxa dceiwt tmvivjk snl fkh dahsxyx kqlhak lurtk +xss sswyxrg yqff dbkx kbxd mpzbmnl bzplnmm +uvz pjm ilrol pmj uzct ztcu brhkv +heiz jcn syjt zfvlvaq aflvqvz amcjh rxnitw +cxl nxvrn vjnz aewtr cxtko nnvcp ltptd adpxt zvjn fntklj +aymmm tuirj hzngq zhbh paqs kvpfo aqsp kmo acprw sabrso kdqmp +ndqjspv mmhp pndjsvq rti usm +ije oad mvelyg jadz ekm dao zdcmv +qwww tmwmdbb oxxfoza rgmf eonku brh gcgiuoi ojscn +fjedeek ohlax fiydku rbnxpg wfivg cdgs +axwbni hojye mwfe oyqknxp whdgfy ihku mbhr gagnz hehagxj +hibautd blnayq lnayqb gepml mgpel qunw +ircx oeb kujtip zbu ebo cmmn +upyqvot wbponp hnn vav avv tvrky omm +yzqsnf agbfsw dbxoya sfnqzy hqrxek qsnyzf oagyerm xxhukm +xzvk mvcwz oujr hell hoe xexa dqlpqt xdqz ucola hsvv tcmybhl +skldxr mzyol ybzyzd jnnxb rxncdy nkpwy fwlnsw omylz oiwieu fshv ngvha +jkwqf yxrox hejfoq orxyx +rijken xiwf mawqcfu erinjk jsi yyg mmu mdkfqb +ornjes krp eornjs enjros pyqp nnwwjl +wzd uqqo kyeli tikdle aykdjog uiz rbpnw mjxezf ihiz rlgyg +cjm ajqgvkz kfgyy dmczlc mjc kxcm zctyqgh ymsk jwhqfd czpqgan +vxkzvco owo qogj uyictoj kfr pyoo ejrru npluynx bvv jhhzu kuciwc +eqk pcsly kelu arzgoe trfo fotr cuaax +lagonw qvcssqz sdoklh uvovi sfrkmd hnvafj ltg wfjj +viwbkm hpwe kzzwrbr axjtlq mznin wwpjg unlwur +nuzorgo qfoz ydisca qxdfutv hzg +nqgge tobtt hjocx ntyqyi rxzkynw wrnxzyk ciscy trjt ottbt +yuii srawx gljxe eteogz kcu jlgxe tjik ktsnp agudqok jwol vfnyv +vgicg dhnrmxz sjhozy hlalx rutwq +nyoyoje kco hoyam hoyam tta iflud amh gdxcsj vqr fvsqcgv +xdmbtph ueen cskerl rxjvpdc +nricn addljzg obq rikez igq bxygkmv qmgojou uheubk qor +snzd ztusvr vrstzu mceddga hgu +vvrbfjg mcdhmsf ldtwl otuna gmjurrx jgrurxm rxmurjg yrioq +iotkvo sftfvn vvoit lllju xvlg rdsb ywmdf mzxigu kzq +sgqw gqsw lqfu wgqs xpiwou jurgucd azq wgaqpm +ijntzi chlnfj yjqatz hjflcn vys ofq oqf oadthe jrfw +mmc motjo vcwmod rpaszfk zgkkua bpja vjb htrk +bpfvvka kmger mnvvfl hakudy yfprdoo mvnlfv rgmek evnwg +mykpu juavkn cecdvi aszbi lxm hmps oaqoif +fshizd fsdzhi lvcq hhpb eavwno auqlwz rpv owcdojx amsmf qgnddd +pohmcn hlcxk qsesxh rncr +fgyrsis ldem avxmnh frpodq oefzn +plfpu qdyojz xdrzrjy kpv abkh fge bbnotvp liikmcu czvwl oyh +ovha muitw pzy edfjoo fhsxuh dliyruc dikcd cqem ywfy +exyry jtzqn tscr qbtxno cikk poqgr tnjzq eofe sxea anlikep kick +zcie purpw dmhhms bcdo prwup uprpw wfejgjd +kwtjc cmixp dodfwj hcgmmat pkeyspo ubnl ajxvj ffkh xvw +nvlgq oduus psufiqg lrwpn dleftn xtllqvf usgz +liarf sczsf sczsf wky qtzq qvve qvve +cit vtjsh jrhkyvi txj urmq hppx +rhblmxn rhblmxn lkgow dylurwc beyk gfcewxj ehpl disoe tjbjy lkgow +nbkrm jvk ffux ars agns bebic jzjfm kmnbr gptvtsa ufxf +hrlvup jaz tafyr qcgq wkd fiz bgsrx jmtcvo qkbvj +eontk djf tiafrng mtwat puainel nyjoh meynxbf eqdw +aspvmbx tgzuszm fpj xkl nzpr fjp vnomk byx sbtov tnu utn +ldyww gwmiddv hwyh gcgsdit gtgdisc suufl xsw dlwyw +sye dgbd wyf ixqzthx dgdb esy +nsdgera fqz xwbdgui ngdgbcd bcn qrdxml cwcmxws tncm mqsodj cqgk +estayas cocmbpv cdcf vygtswo aplwa estayas +ndc ndc wntr sfls sfls +gse svv esmi lcdii lnr kemrk gnk ildic blnqy wvn +mwlpm awkr sxsudub yauwww hnktbog fpnqc nmxoq yoparu tqjpkug nbipft +czwnkk hrodtmx yyzpil ooqjb cvxzfh +kwa wak gipak gsgrw +jyy fja jjk kuvoqdy urqx +doyu chgn gvtxi qjdigvy kxr dizwrjc sll zenl yyblj +epxeqih kfi hlog pakk kkiidrh hiufw wuhif baqzxzi bgcd phi jzjdxjp +hllhyad sodc nyrtfe kygof hyyqi txddqg wcwxvnt ewqmj wwv +vxymuoe caat diqwbo vfruxdf sqniefn hetcbl nvtttu ouesb +yvoez pvthzc tdowuci wjijicn fhpmq kfobag yctdwj +xaugkb rprkg tidpx pjk tpwwm pbcfhr wmwpt sfynrl iouaw zbnyu +auakc culuxg bffg rodyhea ixlmtfb jdurl szoa +xgona fjzho buh khbvti ddh mgj ptgaqps +dqldupd udpldqd poku gfgpcg zsvk grvk kntx jih uwvxdvq sivk +mwdnq wmqdn uzto mdqnw +alvfm qxqo thwru xqqo jilnsgs rnonk fwntuby ogbha +gvxlxyf cdpv khvpka kgt gshlaa tenb +mtgvvxh mrjrsd truk rrerzx tujweaz +ozepw gsqkr rtmmc cmrtm +spnthg xhlzuu xwcrxz aqqejhh bpzh +ectdftk rgp mkp vxp pevriz wkgfkaw vfygj peg gep wjn +bksbu ywsszf tsbrps vxicr hfustju ynnlbo +sio urbvf ujezjk vkyc ukjezj bvrfu qwwgqmw uqfekvx bzipxus qfumwh +druru kycweog ycmef rjyy fkgp +rmf ifbip rsztco coju wlr bfbmsug lwr bsufbgm nwmp +jjuxtyd yif rkldsvu binq spepa mfg aszm +ghilaau ncm sgbavz omzeotz azukf bgjw zqzo gjbw pld +gtog iqheik budeu guvljmi +qqlj jqql ttk xcxu +cfq cfq kpagib dxfxufw hhksbjh gpcp +xkeax acnia jjubfc mhot uxlhh gnkj pavta rciondm rkquh xudqian +wqhqzg psqh rnnc uujlgq +hpjpaoa maa rdndl xewqj nmagwx xewqj hxuyvou xziv rdndl fbxmbz hmfwghy +dtwnrca hbfcptw qrmvat sdatx les zwizogq +bodiwzg sgoas fsf wgkrn zgbdowi wfkz +ngcsg grtao wcfxpyl gngcs fxwycpl fkpt +txvngo vxngot tkoap zqjc qzcj oeruix myh ihgdfik qtt +rxeh fcbnoo rxeh lve wvoc pmnxej dlcbrh rztt noibg +zyvq lwxqu oyjv bvidmf wxuql +wzc zcw czw dnhkvrg nzslrf +cfgl uwhxu qnsfmt tgyabes mqnq nkitq hmcvxlt qqmn yzmb uomqp +lwziur hgmdmv zuvipkp vir apr gfaq zeo dunat mqgafzg +prq pqkr xlrw njf ncqni kgpoma cmtklv +jwfuc poz opz fuple +fgleub lcgnifu lkwo kftbc onvwvdx lukpod xgmh rnj +rwqvv ezjmoni llq ekd cdvv kzcci gzsj vuipv fnw +rtnua gbnzg kqtogns iozzwc kjpzz kiiurey yzlvzx cpy xrue +fexcjmw ebwssx ewbcgwd uwolou nfdhic vupiykn jss djoo xftbkgo +idf ipvmez qyevwd wfsjxja dif dig +szpbtsa bssaztp sptzasb qppgz odur cpmn wpmg +pxn zjmq rbnr azwstzm mln upaqyty nxp oge nlm +bfaryqv hag phtvh ypi +epeeog lip zqio wuehlnb bau sbd dsb +xbrrp sej agrqnpa aarpnqg bnwyi jbn +uqmsvd asmuyy czxviw pznnmvc +sddwmek wnaea iwphupk sabo +cingdks ksh mtyip zltgafm dflkcd wbdnqup uokm gmxpyd libz svv akce +qge ewv dkabkmb xcpi nrkmsu mkmb djvamg mhhrwjh +krjt etfhm bxzatw zdkvz ehov seyxbw mkiirs plzoplu sogmwb wodfcle +qwea adibdp emo homrd pjcrhlc eqaw kqsrp rphjlcc +gajzo nwjg qxjra jztcnir ijvjwez avxb afz zyywqz kcszgh elmlkfh +lbz ozia bctf bumoji anhil rta xvit +ejybire ypjl qevak fzalx mlh qxlei zib +xmzas kwojjz ntrnrw nbmxlv mdgxs xjhxg suo zdcrxl qkujisz pxmu +eezyd unrtm wyu vhufvto rpb isfcy ygh hgy +nszvbzv ebtt memrsva ebtt qwcaq bhbas pvzfbov ppjbdy nszvbzv jabvrp +rlo zbmi lugvu yeby +tfcd tvl faaq mnural nyarh xnxk ctdf bodz +vwdrhc gub bgu fpcovx rcvwhd jukwsue +aekrhi lpknnrh bett tkib ioqrap igwnst aekrhi lhha +acg mknhazp pcgjuk tajplv +masq fyjkn agq qhxbbl qga npzj fme xtihic rntisg iqv aqg +ipagh fjth mswztpi iexd cocojy vhqrla joe wrsrmw +njztu tsh auqrxca zpp +jctn webxi haq irrr qox irrr webxi +reaw axmnvd voakf lnz ftbxfh zjyxzl pryfjpv sistgb pov mshs +gsy ctsngl ptmnyx vpjx zpvtori pfu ioycdrq +aobdtlj osdnrth sgqe geqs qegs +oamrlxk ygbb rkamoxl nztl sarbmtj yqupjt plu sbtarmj vpa rxea +yvhgp yznko epwpza gqrsod rilukp cglhomj wnaplu ugvdko qdr +cggztg ajw gggzct ubmiefj kpa +rel lvasbh kobm mdnzla pwnyj ehep gzx nhjdnsg rxa +qaz gook rplqwh vsht +dhe aneq ivrn awekad ckcbt zsqca ehd rvni oulwfuu +oxgzzow wntz tkqaoi oxgzzow lwkdpgy lhd aekjasp tkqaoi dnhaw +alxghco cpanoa onjh hyeyebe whxn zfu zozbll gojn +zdqulsa dlqsazu zqudals sfedw +rydtrsv rrtvysd fvyza drdgh lsfzt blnxr cnxe tslzf iijyds ylcxn +cczea nxx kwol kopaza wuvr cyvoo whlicv +zbmrwdq tlzbevx jwzpsc uvkwpd bmss rbzblj +jogx jgi gji hypmtkg ijg oscjv +flkoqja kwmrqv wzehel fvmcfap mkwqvr ivwxg jqfwdvo hweezl +vgjg nzucho nuohcz ggvj tmxci +fqaqx zeybhtg bxeic lftuqp wzuerz sww qfltxk +keiy myrvp blkxcg lncqmsu diittlg fqrf digrel cpwrk ipan dkxb bymlzo +owm irygdz pyhj mow wmo +noul pbvvt zcv ueqyjl zhetlw lpjfhli +felvwb wdykz kyibdz haq qkouj vuav oztyqh +dyxo njcr hcuk ysrr pucw qbajztc +ooyaz pmt hqwu gjx tmp tpm pwz +lyhzajz dfot avyifo kdwka pwypcep kyyw tirlku zdpjmft +aexle hfxo dacwvcy xsiotyg cifq ibupshj aktt rzvf pgafj +pxubhw ibpm jxtxg iwnssf osbpj +exmtfyx blbfg emrunru zkuhoi lfzn zrj unmcece phuppi +icomb rmy mvsqqkh zwjubz lumq wekx +cmdgs gsr pfhqx pfhqx cmdgs pga +rpyf jejc adaiou dutv imbenyu dqw zhebjhu pryf vtxs yprf +cxj roprjn rqoh qacagru snxd +rczvi hfpl luc yowgj nvavlhw vjudkmv dwu teq +klwc cktzh ksnvswl nsgeu xyohp mhs fxnjhm fwrcg rdeadkx cim +ounvb vzqje ujctzzk iyy vxck ebtvbqr uswsmcr jveqz qejzv jmi pboq +lwffygh mqsh vnnj ufz qhms gqfuxo lurzmu +buf psdluck gapwoo wgll sbfavbc lljfvzx cdgo rpt sfvabcb +svefr kubbri fervs nboi zkvq +jwr vtc zkcpzb kczbzp cdned pzbzkc wigjuak fszgweu odflfek +vwdqm khnnj plokjg vnce venc vecn yzxtgb +tawl yrhoz tawl yrhoz +vvehsl kdhzgme rix rcs btm pxnlsps vlhesv sxpnslp yqjtool +eqpyw kpmkcyw wqhglxg ajfzo hbd qvmhy nhokah iisqvad kxuyd fxek +jsz txhwhah hxt djnvl srylveu pxp dzmmn epek tzs +joyzql jqczueb rtdyw fyc fjirfyn tjcalz joyzql fyc +pjrmiz xwnmwns kcqjuut zfgxhdr octwn kqppg zhfgxrd wmwnnxs +ema yqxqs aljjo ajloj wozb +urgmhiz epqj vhhaxdm ptlsvig qzbmm cumbho lkg gyzmg eaopyzf ncfy mqe +ijvwvo oszkees ugvyk hjdj ftip itfp +ylfw qutzdj mgqp cyjss yzsdqqi iykvs fyor sthyqp mrjtzee hgo zwqbtgk +bkfkns gco bykzc mje dwmkrwt ljegqor yxjxp oaleuu +xeltq ggyqis aud frtyxhx iwz wiz fwoxz fozxw +zdu nwduqsa nced iphaaxo +bqjj oah ezd brhgxrc pmkz kdog exw +ihatt hck iepn egemprp wrz wzcuo xjzeaa wku ivjvihh +cwkuof bmj qmxd qbtms zgdei bsqmt ssndhw eeenku lcsqy bvvodr +tek zsgytci vgoun kwwu +jcxvp ijxc buqgix uil zfoku +ggndshq bmjeo yqaxtik blspz yofh edaroy +ipvtxh ouye elln dllvx iqza nhwf zyfw pvlky +iydcx gvarm gvarm wegmiy +sfjd liiflle mulboe qywzs tzbns trojl pad mnfcrhb sltb +gthqj jvpsof jwlfyeg jwhlfj +qckv umzrge gnzc mnr xde +gvgxmhv txnait taxint ius iboqdj +vsfex kbpvsby qembkb efxvs vhflzvm eaazg dyg bbmekq +wxpfk xwfpk xwkpf cjsyi +knzg eefq feqe seppop ttxz qnqfn atgsy cch mkjlbwt uyhct +quzw jbiw miqehe qvf jyipqh kzcjxyh +teuvzf tdtwoi pcuafa cwgjk ccur lgmqv jpjdkk efrnw uloqn dpkjkj lwloeph +yaffjy xntstsv gygq sxttvsn tvnstxs +cvbmdf pfrfkna wupv van iocb hsiyke obspj ytyfkl hbsqtij hkcw +oeddmnu koso mdodeun ybe mhjbmwy ubejz soko yxvuv +nylhy ylnyh olb vcdik +gsp ilba llnu jjk urbvuma qzypf bkceotg ezxq hyvjngf +tfnegyq rue waeif tfnegyq mvqm +wvgnsk cpd oib wrdfaz kohwgkc kzzig hogkwck gkizz +fecuuyp yfq bvanvxb cjeqwf unw dccr qzh zqu voakj +utoazh bjuq kmhcre izmny mirorsy twnl jyoc +fnnpd dmr ccgu eqgewc zuqivf +kkxiba qdabuen oikaz dnuywmm +aogud adugo uzcglpj lucv dgoua mdsqa mvrg +lymhv sof hvyml mlvhy nit +chu bwxp xpbw ghaix seklnc ola zofnrwt uch +wtt abob vblijtd oabb qjws +uozrpw kgf gxidxm uehdr fta pqakkrq atf fat woaolk +gaee voshd ghlyy emvzlkg cmcgk tuwlsj jwtsul znrta mjieqph glker +qiugxas gkg cbzmoz kahs obzzcm +puz omcokz gjc heuqb +dgndhb wid wdi scwnrjf juaisgo eivaw hgdndb +mgcrd hnqg pkpeb vprxcp +atlcnzp fyp cpkivxi bzj ypf cqpt bysu +pnd jiitmzs csw mxnpck vxutdrs ivipzy cws xiegsy qut +txlk avcvbuu hnq yyriq ajyswd urgiwc +qgiqut gvblizs giqnfrk tty mvoj wpikl giqnfrk bkdpndu xztmxn hsmqxf +llthg zjslki wilj rcyfois bavz hrqxn +ytbw hlkl vip skycogy ejiirhx +ndmtg bthlbw lsoq cvlvo sqol sqlo bppl sdkbls dtpyzrq vgm +psm xpj xjp lqi spm gqirw aglpj +htg fcchvyt xffev szdu lieadft +nbjo qohgzu vofg vvild dbtyi pdolxn plnoao jxze xlpbxj brajzg +urpp jjv lihmvp ivkwdqr sesyp ypbry qok sesyp ivkwdqr was +yinepzv qvnzdtf apv ucxo bdioo juga hjfsyl hmowo avc +dmiv tplae iiuiaxx tpale pyzkc +giwhst mpexd byfyc swuzkc +yydkwp xuu vjya kav ujmcxy qrtp zvlk +lsvdyn tkw qxu omvlc wwmfvov mrgcoov dhpu tfair hupd zbx njzgwtw +zuz rsxc xsrc gdwwf nycsv zzu kcu +unlvzv jerqqgm nozma ykbflj qihqkx +pctffo begf ivrvy ezru mvqt waocq +tubtuk gxkc ikgw bjrird kxjebbh sbjyc yafkd khqajmt aclpmf gqfo yrpf +rdt vrxa fyudo myeosb ursflwk +wbjras edlbwdp ctobtw jbvtvcd xjgoo cmunxm mjtbpi klovx bypmsab unc +xckml uztr htublq vilabvr jdiwus qejxur evfw qqm +tzqq tzqq wkb wkb +dgmg ljzc dgmg mbmco cgze qsap jccvot uors iiq +rwvac woylk dmn teorprx nyuvz hcwwxlj lvej drbjo asjgq +ljen tpfl vixcivr guaf lnje waim jlen +djgaa janhi adudm yzv zkcb xqw fgvrz +kpkjoon ggzx skp rqcsw xgzg zgxg jtf ghc +rtnyxo qixfd nphekk mouzk gny fpzquw qgywx rpr gqydze +gawdlv vrivoof rte iyp gaih sfzplm +csojx wzojode uzy qulr lylmb guvtkwv +ovxj aamms ftxo ebckdqw wqvsdci jwfqxks jafrcrn yyomrot +qnu jqwr ywudxk qpsez rdc kiyfz iiecf dthxjjb bown +typ zxcvjo rip acjhl paaab qhqipg xkguye sbxy pomkvn +ofvaegv hgak oafevgv hkemar rqkha grklnsp msvkkku rekahm bxmjnw +ahoihju sdyn phi uhz lupbx +lavt jef klmq oqyfpf kis nazul ymezxek xpla fxyrfnt +nwnagwy hvpjqfg sgm ungfstr gso owqqxjh +hey hye ipyrt qxmthg jth wpbr hxgmtq cvfkfux qykdzhk movcfnl vxyoc +zsras abnrj fgaczuk ssazr xzf cnxu gns wnqqy dwjh szars +uhb zanlvh lvdotkb xekl kcofo +lhx iccy ibkjw ciykxaj imsx ehamqlz iwzapxc rhaltv +pofit owmpqej vwrobh jvox gdqehss yyxd styu tfkm fiotp +ecz mdpoqsv mdpoqsv yxx rexok hcfll yvury hdhcfu juhkvpt rspnfj hxvgdir +ohed mtigaoe eodh agmiteo +vjvv hfco cppbxtw hawsjxz ovlsq qgs risgwhg auhj +togivgg czrtvw ccz wzvtrc bse lsk +ndc ndc lrfi iyleol nchx jxpv xdcsfmp nnx wtvq pih tgc +hzpf sur zhfp klfmhx lbuidp xiqimnf +qddpdk trfxpip pnsowj hidgvnf prur rsrautp aamykfm fysqjmq xwzjane mbmtxhf oqctt +lfd eops govslp ultbye vrqai hcjkcf snpape +cbok koumkad otpozb pqcs emilpe wpcyvxd bock +spjb xkkak anuvk ejoklh nyerw bsjp zxuq vcwitnd xxtjmjg zfgq xkpf +juo pmiyoh xxk myphio ogfyf dovlmwm moevao qqxidn \ No newline at end of file diff --git a/csharp/BScottDay5.cs b/csharp/BScottDay5.cs new file mode 100644 index 0000000..4db3f4f --- /dev/null +++ b/csharp/BScottDay5.cs @@ -0,0 +1,45 @@ +using System; +using System.IO; + +namespace AOC2017 +{ + class BScottDay5 : BScottSolution + { + public override string Name => "Day 5: A Maze of Twisty Trampolines, All Alike"; + + public override void Run() + { + string[] input = File.ReadAllLines("BScottDay5.txt"); + Console.WriteLine($"Part 1 Answer: {RunCpuPart1(input)}"); + Console.WriteLine($"Part 2 Answer: {RunCpuPart2(input)}"); + } + + static int RunCpuPart1(string[] input) + { + int[] instructions = Array.ConvertAll(input, s => int.Parse(s)); + int count = 0, pc = 0; + + do + { + count++; + pc = pc + instructions[pc]++; + } while (pc < instructions.Length); + + return count; + } + + static int RunCpuPart2(string[] input) + { + int[] instructions = Array.ConvertAll(input, s => int.Parse(s)); + int count = 0, pc = 0; + + do + { + count++; + pc = pc + (instructions[pc] >= 3 ? instructions[pc]-- : instructions[pc]++); + } while (pc < instructions.Length); + + return count; + } + } +} diff --git a/csharp/BScottDay5.txt b/csharp/BScottDay5.txt new file mode 100644 index 0000000..99c890d --- /dev/null +++ b/csharp/BScottDay5.txt @@ -0,0 +1,1056 @@ +2 +2 +1 +2 +-2 +2 +1 +1 +-4 +-2 +1 +-3 +-9 +2 +0 +1 +-8 +-9 +-12 +2 +-5 +-8 +0 +-11 +-3 +-1 +2 +-20 +-21 +-18 +-25 +-25 +-16 +-18 +-27 +-25 +-17 +-13 +-9 +-35 +-25 +-1 +-20 +-22 +-11 +-3 +-26 +-32 +-33 +-21 +-3 +-42 +-4 +-48 +-36 +-15 +-20 +-29 +-32 +-12 +-53 +-32 +0 +-4 +-2 +-32 +-55 +-49 +-23 +-18 +-34 +-39 +-70 +-4 +-64 +-58 +-66 +-59 +1 +-36 +-19 +-38 +-55 +-25 +-15 +-65 +-66 +-65 +-58 +-53 +-54 +-18 +-24 +-79 +-10 +-73 +-90 +-11 +-94 +-79 +-64 +-74 +-41 +-85 +-66 +-38 +-84 +-46 +-101 +-38 +-33 +-107 +-38 +-70 +-101 +-7 +-37 +-94 +1 +-69 +-42 +-71 +-15 +-36 +-70 +-76 +-42 +-118 +-39 +-97 +-27 +-30 +-6 +-70 +-23 +-113 +-103 +-89 +-35 +-43 +-11 +-97 +-137 +-19 +-6 +-21 +-107 +-93 +-50 +-107 +-46 +-90 +-51 +-115 +-134 +-122 +-88 +-122 +-74 +-30 +-10 +-53 +-12 +-152 +-68 +-110 +-123 +-111 +-40 +-164 +-10 +-168 +-38 +-71 +-67 +-171 +-146 +1 +-33 +-13 +-168 +-106 +-135 +-145 +-163 +-125 +-12 +-156 +-172 +-69 +0 +-15 +-137 +-1 +-21 +0 +-76 +-48 +-31 +-86 +-140 +-9 +-179 +-45 +-106 +-85 +-131 +-180 +-190 +-3 +-7 +-89 +-44 +-106 +-40 +-171 +-59 +-214 +-158 +-160 +-89 +-59 +-13 +0 +-215 +-110 +-204 +-39 +-171 +-44 +-173 +-112 +-153 +-155 +-85 +-113 +-226 +-74 +-104 +-152 +-5 +-187 +-171 +-12 +-165 +-190 +-152 +-49 +-177 +-179 +-123 +-158 +-131 +-244 +-143 +-127 +-124 +-125 +-170 +-211 +-201 +-97 +-33 +-47 +-243 +-136 +-243 +-89 +-192 +-217 +-105 +-116 +-268 +-40 +-154 +-262 +-223 +-96 +-20 +-66 +-239 +-42 +-24 +-112 +-162 +-227 +-52 +-81 +-80 +-3 +-33 +-152 +-33 +-168 +-48 +-245 +-87 +-74 +-139 +-295 +-17 +-73 +-180 +-48 +-182 +-162 +-59 +-296 +-37 +-241 +-67 +-83 +-218 +-124 +-136 +-303 +-38 +-85 +-205 +-137 +-14 +-248 +-13 +-212 +-266 +-304 +-294 +-54 +-145 +-22 +-312 +-298 +-23 +-5 +-126 +-307 +-190 +-294 +-43 +-293 +-339 +-129 +-223 +-231 +-59 +-104 +-60 +-239 +-11 +-291 +-242 +-115 +-117 +-89 +-7 +-57 +-280 +-70 +-70 +-6 +-35 +-124 +-253 +-120 +-322 +-45 +-187 +-288 +-237 +-76 +-192 +-179 +-269 +-14 +-269 +-227 +-374 +-84 +-15 +-144 +-266 +-256 +-162 +-336 +-266 +-31 +-367 +-172 +-156 +-157 +-220 +-189 +-152 +-336 +-253 +-36 +-324 +-222 +-175 +-313 +-289 +-65 +-123 +-229 +-204 +-44 +-72 +-20 +-78 +-43 +-226 +-93 +-399 +-10 +-150 +-153 +-221 +-7 +-302 +-237 +-288 +-172 +-233 +-119 +-247 +-33 +-170 +-46 +-424 +-403 +-40 +-65 +-116 +-372 +-148 +-336 +-287 +-431 +-134 +-354 +-14 +-162 +-228 +-152 +-119 +-240 +-356 +-305 +-15 +-77 +-303 +-189 +-205 +-380 +-175 +-316 +-396 +-44 +-42 +-142 +-363 +-418 +-313 +-322 +-307 +-363 +-454 +-157 +-308 +-361 +-398 +-347 +-249 +-57 +-453 +-167 +-194 +-29 +-443 +-45 +-359 +-445 +-89 +-136 +-60 +-446 +-97 +-282 +-298 +-245 +-91 +-130 +-423 +-387 +-492 +-282 +-415 +-64 +-294 +-468 +-251 +-323 +-210 +-490 +-142 +-121 +-393 +-251 +-265 +-268 +-135 +-224 +-116 +-7 +-27 +-165 +-265 +-352 +-226 +-25 +-327 +-490 +-493 +-80 +-501 +-522 +-436 +-36 +-464 +-47 +-349 +-91 +-460 +-167 +-436 +-207 +-41 +-386 +-461 +-430 +-412 +-161 +-460 +-488 +-207 +-221 +-17 +-265 +-115 +-36 +-499 +-111 +-518 +-390 +-526 +-280 +-150 +-405 +-458 +-503 +-527 +-303 +-383 +-154 +-317 +-64 +-379 +-564 +-385 +-490 +-524 +-440 +-69 +-317 +-377 +-53 +-503 +-136 +-71 +-190 +-19 +-238 +-572 +-281 +-294 +-538 +-146 +-130 +-406 +-236 +-223 +-234 +-16 +-436 +-391 +-249 +-508 +-153 +-41 +-380 +-229 +-489 +-466 +-94 +-596 +-96 +-544 +-532 +-106 +-349 +-34 +-162 +-6 +-495 +-287 +-82 +-307 +-466 +-358 +-272 +-282 +-220 +-84 +-168 +-124 +-271 +-307 +-164 +-627 +-442 +-348 +-368 +-548 +-574 +-248 +-144 +-516 +-369 +-319 +-215 +-476 +-191 +-326 +-462 +-286 +-565 +-395 +-190 +-353 +-180 +-88 +-403 +-520 +-203 +-268 +-198 +-374 +-636 +-565 +-76 +-447 +-118 +-658 +-311 +-468 +-214 +-215 +-68 +-370 +-179 +-286 +-394 +-532 +-493 +-339 +-471 +-344 +-274 +-512 +-90 +-306 +-222 +-348 +-331 +-670 +-73 +-136 +-358 +-518 +-521 +-41 +-204 +-476 +-582 +-633 +-44 +-133 +-410 +-658 +-443 +-158 +-76 +-162 +-509 +-150 +-304 +-407 +-210 +-667 +-279 +-109 +-469 +-680 +-702 +-101 +-159 +-197 +-134 +-154 +-270 +-90 +-568 +-237 +-95 +-328 +-23 +-493 +-310 +-649 +-283 +-31 +-234 +-126 +-244 +-312 +-409 +-84 +-522 +-72 +-458 +-190 +-707 +-338 +-433 +-709 +-81 +-693 +-367 +-302 +-260 +-322 +-282 +-379 +-401 +-60 +-126 +-645 +-573 +-91 +-685 +-312 +-165 +-217 +-594 +-386 +-357 +-72 +-426 +-354 +-246 +-278 +-451 +-37 +-484 +-232 +-638 +-569 +-376 +-278 +-554 +-666 +-191 +-513 +-564 +-502 +-640 +-531 +-1 +-667 +-146 +-20 +-375 +-771 +-263 +-754 +-182 +-190 +-626 +-249 +-418 +-278 +-722 +-676 +-161 +-666 +-462 +-488 +-70 +-569 +-779 +-642 +-121 +-556 +-146 +-531 +-323 +-116 +-100 +-76 +-260 +-339 +-743 +-44 +-811 +-137 +-456 +-462 +-469 +-500 +-650 +-681 +-424 +-336 +-445 +-172 +-604 +-776 +-133 +-829 +-72 +-88 +-219 +-247 +-269 +-205 +-532 +-222 +-232 +-201 +-762 +-105 +-478 +-263 +-177 +-475 +-584 +-439 +-316 +-722 +-371 +-35 +-132 +-417 +-385 +-695 +-76 +-452 +-201 +-848 +-359 +-731 +-721 +-211 +-698 +-502 +-113 +-271 +-31 +-66 +-588 +-794 +-189 +-417 +-715 +-96 +-95 +-691 +-587 +-193 +-788 +-445 +-761 +-347 +-696 +-34 +-14 +-358 +-633 +-152 +-140 +-371 +-795 +-500 +-477 +-617 +-83 +-462 +-338 +-167 +-345 +-99 +-806 +-798 +-447 +-338 +-263 +-76 +-382 +-913 +-577 +-657 +-69 +-344 +-853 +-679 +-204 +-560 +-238 +-455 +1 +-1 +-163 +-536 +-344 +-386 +-600 +-915 +-245 +-717 +-914 +-192 +-931 +-31 +-230 +-42 +-531 +-122 +-66 +-347 +-476 +-3 +-506 +-396 +-839 +-365 +-12 +-453 +-247 +-448 +-369 +-661 +-451 +-175 +-64 +-805 +-63 +-597 +-451 +-350 +-77 +-958 +-525 +-194 +-116 +-398 +-100 +-687 +-758 +-162 +-424 +-920 +-162 +-577 +-549 +-250 +-594 +-853 +-44 +-34 +-882 +-656 +-358 +-425 +-592 +-257 +-963 +-295 +-561 +-970 +-885 +-968 +-112 +-111 +-734 +-375 +-825 +-462 +-333 +-154 +-490 +-1004 +-391 +-925 +-175 +-299 +-985 +-432 +-165 +-721 +-289 +-817 +-393 +-831 +-697 +-599 +-145 +-977 +-550 +-577 +-249 +-743 +-711 +-4 +-442 +-252 +-897 +-130 +-528 +-906 +-809 +-228 +-548 +-695 +-912 +-676 +-936 +-209 +-312 +-951 +-671 +-898 +-205 +-730 +-873 +-798 +-943 \ No newline at end of file diff --git a/csharp/BScottDay6.cs b/csharp/BScottDay6.cs new file mode 100644 index 0000000..8aed9c8 --- /dev/null +++ b/csharp/BScottDay6.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace AOC2017 +{ + class BScottDay6 : BScottSolution + { + public override string Name => "Day 6: Memory Reallocation"; + + public override void Run() + { + string input = File.ReadAllText("BScottDay6.txt"); + int[] banks = Array.ConvertAll(input.Split(new char[] { '\t' }), s => int.Parse(s)); + + RedistributeMemoryResult redistributeMemoryResult = RedistributeMemory(banks); + Console.WriteLine($"Part 1 Answer: {redistributeMemoryResult.ReallocCount}"); + Console.WriteLine($"Part 2 Answer: {redistributeMemoryResult.RepeatLoopCount}"); + } + + static RedistributeMemoryResult RedistributeMemory(int[] banks) + { + bool done = false; + int index = Array.IndexOf(banks, banks.Max()); // find largest bank + int reallocBlocks = banks[index]; + int reallocCount = 0, repeatLoopCount =0; + Dictionary uniqueList = new Dictionary(); + banks[index] = 0; + do + { + for (int i = 0; i < reallocBlocks; i++) + { + index++; + banks[index % banks.Length]++; + } + + string banksString = string.Join(",", banks); + if (uniqueList.ContainsKey(banksString)) + { + repeatLoopCount = reallocCount - uniqueList[banksString]; + done = true; + } + else + { + uniqueList.Add(banksString, reallocCount); + index = Array.IndexOf(banks, banks.Max()); // find largest bank + reallocBlocks = banks[index]; + banks[index] = 0; + } + + reallocCount++; + } while (!done); + + return new RedistributeMemoryResult(reallocCount, repeatLoopCount); + } + + class RedistributeMemoryResult + { + public int ReallocCount { get; private set; } + public int RepeatLoopCount { get; private set; } + + public RedistributeMemoryResult(int reallocCount, int repeatLoopCount) + { + ReallocCount = reallocCount; + RepeatLoopCount = repeatLoopCount; + } + } + } +} diff --git a/csharp/BScottDay6.txt b/csharp/BScottDay6.txt new file mode 100644 index 0000000..90aed50 --- /dev/null +++ b/csharp/BScottDay6.txt @@ -0,0 +1 @@ +10 3 15 10 5 15 5 15 9 2 5 8 5 2 3 6 \ No newline at end of file diff --git a/csharp/BScottDay7.cs b/csharp/BScottDay7.cs new file mode 100644 index 0000000..4271c77 --- /dev/null +++ b/csharp/BScottDay7.cs @@ -0,0 +1,147 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.IO; +using System.Text.RegularExpressions; + +namespace AOC2017 +{ + class BScottDay7 : BScottSolution + { + public override string Name => "Day 7: Recursive Circus"; + + public override void Run() + { + // Sample Problem + string[] input = File.ReadAllLines("BScottDay7Sample.txt"); + + Node rootNode = ProcessList(input); + Console.WriteLine($"Part 1 Example Answer: {rootNode.Name}"); + + int weightDifference = FindWeightDifference(rootNode); + Node badProgram = FindBadProgram(rootNode); + Console.WriteLine("Part 2 Example Answer: " + (badProgram.Weight + weightDifference)); + + // Main problem + input = File.ReadAllLines("BScottDay7.txt"); + rootNode = ProcessList(input); + Console.WriteLine($"Part 1 Answer: {rootNode.Name}"); + + // I have no idea if this convoluted solution will work for other inputs, + // but it's printing out the right answer and I am too tired and fed up with this + // problem to care if it's not perfect. + weightDifference = FindWeightDifference(rootNode); + badProgram = FindBadProgram(rootNode); + Console.WriteLine("Part 2 Answer: " + (badProgram.Weight + weightDifference)); + } + + static Node ProcessList(string[] input) + { + List removalList = new List(); + Dictionary nodeList = new Dictionary(); + Regex regex = new Regex(@"([a-z]+) \((\d+)\)(?: -> )?(?:([a-z]+)*(?:, )?)*"); + + for (int i = 0; i < input.Length; i++) + { + Match match = regex.Match(input[i]); + if (match.Success) + { + // create a new node + Node node = new Node(match.Groups[1].Value, int.Parse(match.Groups[2].Value)); + // add any sub items + if (match.Groups[3].Captures.Count > 0) + { + foreach (Capture capture in match.Groups[3].Captures) + { + node.ChildNames.Add(capture.Value); + } + } + nodeList.Add(match.Groups[1].Value, node); + } + } + + foreach (KeyValuePair kvpNode in nodeList) + { + if (kvpNode.Value.ChildNames.Count > 0) + { + foreach (string s in kvpNode.Value.ChildNames) + { + if (nodeList.ContainsKey(s)) + { + kvpNode.Value.ChildNodes.Add(nodeList[s]); + removalList.Add(s); // a list of nodes to remove from dictionary + } + } + } + } + + // Remove everything from root colllection that was a child node of something else. + // This should leave just 1 node remaining which is the root node. + foreach (string key in removalList) + nodeList.Remove(key); + + return nodeList.First().Value; // hopefully this is the fully populated root node... + } + + static int GetWeight(Node parentNode) + { + if (parentNode.ChildNodes.Count == 0) + return parentNode.Weight; + + int weight = parentNode.Weight; + foreach (Node t in parentNode.ChildNodes) + weight += GetWeight(t); + + return weight; + } + /// + /// Finds the weight difference of the inbalance + /// + /// The root node of the entire stack + /// The weight difference of the offending program. + static int FindWeightDifference(Node rootNode) + { + int[] weights = new int[rootNode.ChildNodes.Count]; + for (int i = 0; i < rootNode.ChildNodes.Count; i++) + weights[i] = GetWeight(rootNode.ChildNodes[i]); + List result = weights.GroupBy(i => i).OrderBy(g => g.Count()).Select(g => g.Key).ToList(); + return result.Last() - result.First(); + } + + static Node FindBadProgram(Node parentNode) + { + // only find nodes that have at least 3 children to compare + if(parentNode.ChildNodes.Count >= 3) { + int[] weights = new int[parentNode.ChildNodes.Count]; + // calulate the weights + for (int i = 0; i < parentNode.ChildNodes.Count; i++) + weights[i] = GetWeight(parentNode.ChildNodes[i]); + // find the least common weight + int result = weights.GroupBy(i => i).OrderBy(g => g.Count()).Select(g => g.Key).ToList().First(); + Node nextNode = parentNode.ChildNodes[Array.IndexOf(weights, result)]; + if (nextNode.ChildNodes.Count > 0) + { + // dig into the node with the uncommon weight + return FindBadProgram(parentNode.ChildNodes[Array.IndexOf(weights, result)]); + } + } + return parentNode; + } + + class Node + { + public string Name { get; set; } + public int Weight { get; set; } + public List ChildNodes { get; set; } + public List ChildNames { get; set; } + + public Node(string name, int weight) + { + Name = name; + Weight = weight; + ChildNodes = new List(); + ChildNames = new List(); + } + } + } +} diff --git a/csharp/BScottDay7.txt b/csharp/BScottDay7.txt new file mode 100644 index 0000000..78c7e28 --- /dev/null +++ b/csharp/BScottDay7.txt @@ -0,0 +1,1039 @@ +hndzyx (28) +kdelzk (399) +uylvg (403) -> xrvcjq, hihltxf, junpjcj, onkvtu, cckdoyb, favay, xsygurk +jiyqd (842) -> vunjzqr, sfooljn, gsnlv +mxmzyac (67) -> pbwmrq, eiqjanp, dyanei, zmkuj, vkvvtm, ktlhztg +wspoq (19) -> chpxtc, mylibd, vmutmbz +obqyrh (55) +inzzz (94) -> ayevuhk, rstjsa +mgraypm (108) -> ivvcytp, iaabs +eiqvo (87) +kienpis (32) +ohjesb (115) -> piepj, tplrep, yprilie +vthvyt (28) +vmyqa (5) +whavaec (79) +kpkcku (169) -> wprvgb, ektvj +amtxnd (99) +yauplaz (5) -> gnstbtt, ivucxwy, htoep, crgver +saaggxs (399) +kddqkkz (348) +tgcmyr (63) -> setljkt, qpyiycr +fhjpe (52) +tlirtlm (47) +xvkdd (15) +ybneks (12594) -> immqut, csprk, eyjif, oykud, bazfmo, nbmup, bxabcu +nwuxy (44) +trepya (17) +ibzuz (11301) -> dcqdop, pzpltg, xqzsy +acwne (28) -> gliupmb, hcwly +fcmspin (11992) -> thblrfo, rcsthxt, bmbkh, gnqdxl +pbwmrq (286) -> rupwawl, snqbfd +ivucxwy (64) +abaox (123) -> znltrss, hvfbx +udpwvnp (64) +fddgtmo (13) +gcult (71) +bykobk (1224) -> oaonzl, giiie, pdwwc +xrzdoz (84) +wwtxe (9) +cafeffy (311) -> wjwqs, qezwnc +lqimnfv (58) -> hekghqb, csirnil, ndnmvz +jjdzuw (9) +nbmup (360) -> ziouqpy, ilyaln, vecsik +zmukql (24) +tdxsvy (20) +qxtttuu (80) +fufgis (196) -> cdewiot, zdekdn +tgken (84) +leymr (98) -> msxnc, xxgvcq +rwhbcy (171) -> wmhwmv, yjdmkg +lncyf (93) +yhzue (994) -> mofidvl, xjghf, detpnh +lkfjzec (22) +khydeiy (53) +laxksv (35) +cmgap (28) +risnzi (84) +xmnqwd (249) -> ovsqv, qbdrnwf +wvrvgio (22) +vycfxv (20) +hacbd (93) +evmfp (254) -> ezfoih, xnyma, ltalmp +hrxxih (50) +jybwslx (1227) -> nadjis, qomycms, dmswq +mnvip (79) +kfvzter (233) -> aiizew, piuudr +pmtkuu (71) +vlujgrg (72) +hweuik (213) -> zdlyf, omdnuon +hymjivf (28) -> xrdkdkq, tonljgn, vcitv, wcufjj, ykcmzu, pgefkd +hdpqb (115) -> ecrdh, wnxya +eqcmflu (73) +euhmwat (89) -> jishckj, datzi, wjrjt, evmfp, mpgkscw +ywdvft (333) -> bktgoug, fufgis, dbkhupp, lhcndy, nggfb, tdgeaw, kdsmtx +kcfqe (33) -> guyzk, osnpcl, pejys, xbvlp +csirnil (43) +zzlopja (2024) -> opgjd, cigdar, olxbw +sakrb (82) +vpfaa (79) +hlsoeh (2786) -> prgfkm, eoabav, agfxi +ggdcjbd (120) -> hzfgjnm, qihokeg +qpyiycr (49) +vhyiaf (96) -> ghhwci, eudtoy, ceofy, kbzfvrp, ibzuz, vgkvnu, vmjcif +ysmrs (24) +pdwwc (235) -> iagng, hndzyx +knmdxw (57) +jijjnbw (34) -> xtqrjc, jqfou +uynpswf (98) +gxxwgu (73) +fmufi (124) -> lhcegk, uypiw +tzyav (40) +ystegvn (33) +xfyybbx (56) +eyjif (84) -> jvvnvo, yenoyh, yjldllm, dzcyze, acwne, wycdpt +ojjnnko (572) -> zmaxz, pqiivg, xmnqwd +cscdc (171) -> ynpehry, fbbcf +nczrlw (2351) -> jvhvlo, vrypfpq, egtdt +srozv (47) +kinfgwy (84) +qlscb (37) -> jlbbmrc, iehag, endqfm, ohksn +zlgewg (80) +ibqev (78) +edkcs (33) +gneen (33) -> vkeqd, bmfkrnb +zmtzfbt (68) +wnxbu (295) +qbsvwcc (45) +lclup (94) +wycdpt (170) -> btlvmkx, denjcv, iutqxkf +wxjne (287) -> blvgj, fddgtmo +ibuzkf (18) +wqhxpu (63) +gpmfjj (113) -> ioypyd, srozv +sowli (43) +rtfmatr (6) +knxli (53) -> qdbendr, zbpsmm, djfnwv, dsuhkja +yhcsmfs (88) +sthzqgi (17) +jujtux (99) +rpagi (166) -> rjrlumz, utoyap +cqrqt (52) +jgtnj (15) +xrdkdkq (435) -> voytx, tfqvoz, cxieq, nzdcujt, efwflo +yfcnm (54) +wkdquda (78) +ogexy (85) +rodlg (77) +ohavz (100) -> zlgewg, gjjykjf +znwmy (50) -> mvwtr, rzopy, qcbtref, snbjccn +zyvdjl (25) +fkgjr (38) +qyyiyo (63) +lzgcs (98) +nfrnbw (460) -> pajjlng, ibwax +eujco (71) +ickkf (50) +ipwjrx (71) +ijynzc (271) -> hshja, odlobo +rnwcn (69) +ojijdav (19) +ivnla (143) +ensst (6) +yjldllm (128) -> ltcwt, zwfyefp +drqjijj (37) +efwflo (249) -> tbosn, qhxasm +cxrmuo (50) +tvoqmae (15) +jurdmpq (77) +mowtdty (53) +cteerd (85) +hqbad (404) -> rhgfl, eeofxt +pofvr (72) +ibixfz (28) -> firwwz, xxqyp +fdbyixt (167) -> rodlg, alwsn +wyovcqf (47) +hgaupyo (32) +xirit (25) +ahatk (13) +wtuse (163) -> qbsvwcc, auqjapr +mphoskw (1275) -> wpdrp, lqimnfv, uoghp, dztpfb, lufzptb +ehucp (25) +rzwqxgp (76) +dwlqul (44) +csprk (1148) -> nrzao, agcqog, ehucp, ljtub +hzpagsa (89) +uoghp (153) -> pwyqx, isfuod +pbtuupy (42) +ykcmzu (1370) -> mozwerl, ddooi, teufo, rakjhe +ucafi (51) +sqwioau (19) +ewbfx (10) +qnbyib (86) +wvcui (35) +lgjkmc (57) -> nvuiy, idvtm +junpjcj (96) -> eqcmflu, ujpttyx +zdlyf (70) +ksbrn (58) +jrrrwqw (19) +xtqrjc (14) +foyeln (45) +soyzhei (74) +crgver (64) +xsygurk (242) +ugrxr (151) -> kmtpsb, lwkbk +nzzzh (22) +iwovx (36) +tfqvoz (185) -> pvxzi, sxwegk +yiwyghj (1246) -> seipdcu, lsgmebq, agdmzu +tovve (94) +hcjoif (67) -> sqkra, dufuw +kzbgh (68) +osnpcl (94) +kpwgdrt (263) -> winyji, ipwjrx +cdewiot (28) +iglpkvv (353) -> bozvn, ensst, rtfmatr, gnukyxz +hgbgr (220) -> cqrwox, ntqdd +putdy (21) +bwdstyz (62) +yofqkfe (973) -> iabql, mgraypm, pllcvd +zevpw (72) +nsrsjtk (237) -> nwvbh, eqkno +vgxle (142) -> fkgjr, vjupomu, lerrsh, sbgsxdw +ubiagvr (191) -> pbncc, tykqh +jriph (1998) -> cqrqt, kibpy +pbkyjk (179) -> hfrgc, jtvvv +gqrjzf (158) -> hzpagsa, bvtsl, hqaxdqm +lwnpt (43) +ejucumc (6) +imzjzf (257) -> rzwqxgp, lwatsc +eypmjnl (82) +vzglbr (33) +mlslqa (162) -> siwcnqk, coenxv +piuudr (88) +rcsthxt (220) -> szcxg, btkth +kixinqo (62) -> dcjiu, rnwcn +prgfkm (85) +enlnjb (88) +dcrhafq (28) +qkhwa (2607) -> sgoseob, zbwfbgd +emxti (5) +dkhddzb (82) +ffvsvb (73) -> ubuuw, tntwm, yiimp +nlaym (178) -> iqwsxmt, qcmxoe +lgyab (295) +wprvgb (46) +sjsqaol (48) +uzifsnw (84) +voytx (172) -> scjek, knmdxw, qwuug +ruroup (53) +lssxhxw (8) +pheyymh (78) -> kiwylpo, taapm, ggcyyr +zagsm (70) +ivvcytp (63) +lhcndy (134) -> idjquuv, tvpovok +ijjri (6) +vzttnzk (117) -> mmyaot, ignsmt +xqzsy (464) -> qlucu, fdnxe, soyzhei +jkbuq (29619) -> oielzfu, ocyjmcy, ybneks +pvuno (58) +tpxvyjx (92) +alwsn (77) +ioypyd (47) +zgjhbp (79) -> wpboq, pcitx +dlfghsv (84) -> rxozjry, uejnd, fpkgx, chvari +zddmfy (60) +qcbtref (61) +gabpxsf (1503) -> pjbrh, hsbzn, hjroy +hfrgc (67) +ytxusu (1914) -> upapd, tgcmyr, zgjhbp, qahkfnd, abaox, gobzapu, wnmyhx +yvdidmd (21) +iutqxkf (8) +kutxof (22) +ziouqpy (142) -> zfqvkc, jpwhcjy +sxxod (88) +lohgt (98) +ewbngna (15) +ffuxvj (83) -> fbbeae, xtbhjq +ulqloyn (79) +bazfmo (492) -> vvcoce, vekxtb, pheyymh +qhaxz (21) +fsfdbgt (77) +agdmzu (41) -> xbaluf, ucafi +thblrfo (148) -> lxmtjx, lwnpt +becfiz (97) -> xywsyz, mznemqf, zbbyzr, hftcktd +tzuiasi (91) +scjek (57) +wrhfj (46) +dxllc (44) +msxnc (81) +lswznxp (24) +vojtq (60) +ecrdh (63) +fymxr (77) +mfvdags (72) -> uljtowd, jurdmpq, jgome, syvhbgb +wpmef (75) +qomycms (222) -> wxbsqif, cmgap, xilohyg +roedr (77) +vbhmz (73) +hmonryr (344) -> euhmwat, lpmsj, jjrto, scabkd +qdbendr (67) +seffc (98) +geqrhsr (76) +txxjkb (306) -> lmtisu, sovgznm +cozmd (33) -> wvkqb, yquoa, seffc, uynpswf +vikpkr (233) -> xznjrta, emxti, efyiyc, nemethx +tabwkx (91) +wlpnxme (72) +mhgzc (60) +sfeepek (28) +dcpgsg (58) +upapd (161) +kyukz (10) +hihltxf (44) -> kugzwm, skzmpao +jmypi (32) +mrfswq (99) +ltalmp (51) +szymk (28) +qhnifn (287) -> nosbdrs, hzjcwc +nggfb (200) -> moaabux, xcriywz +cjgtg (343) -> rnimplt, vthvyt +iqvnyzy (55) +wltxoge (318) -> ewbngna, xvkdd +uczyc (93) +elvjpjr (32) +agfzkj (329) -> sjsqaol, rafvktj +cmqglh (84) +rzopy (61) +sbocc (48) +ihjyjx (11) +jpwhcjy (77) +radwgcq (46) +fpkgx (88) +fpiatig (2611) -> inxpyl, jlmgl +jnlnsk (1966) -> vzttnzk, wpidtfu, wnggxc +qxqwvi (99) +wmyojtm (260) +bsbjxg (9) +adyogf (99) +upsbm (19) +ynpehry (46) +vjupomu (38) +pvxzi (79) +knxyay (22) +wtluvr (88) +nadjis (284) -> xeqol, ihjyjx +mozwqgu (24) +cufloa (7) -> exmpr, jzjgef, gotuw +zqbkt (905) -> yauplaz, hcjoif, rwhbcy, kpkcku, vehlv +xwudzc (284) -> gneipe, ityktpq, wyovcqf +npehrzk (77) -> xsdzkqs, mzpumh +tmakl (51) +ocyjmcy (43) -> hlsoeh, wsgab, zzlopja, nczrlw, ytxusu, hzmxo, lffnvze +jmtqh (191) -> hacbd, lncyf +chpxtc (71) +ujpttyx (73) +qywnr (253) -> rdkqd, nfrnbw, juykf +uvybtgx (344) -> ijjri, ejucumc, yscyxrt, esskfkp +cuvke (18) +svprq (85) +sgoseob (38) +ghhwci (9294) -> jiyqd, ojjnnko, aawaew +znltrss (19) +pbncc (81) +ioyibl (77) +lwkbk (56) +ktlhztg (328) -> tzyav, gkzimba +gavzkq (15) +jdpfhyl (13) +mpyhy (263) +auqjapr (45) +caufkxz (55) +sbgsxdw (38) +rtckpbz (67) +yqewlf (92) +loukhc (80) -> adyogf, mrfswq, qxqwvi +xrvcjq (212) -> xhqpkdq, pisrmb +zfqvkc (77) +tqpgecy (76) +xcrejqf (5) +rrvihye (36) -> dkhddzb, sakrb +rbast (28) +bcygph (10) +ubfljy (95) +omdnuon (70) +mmyaot (61) +jwcsw (367) -> ounhwx, flcxc +gnqdxl (66) -> xqbgo, cmqglh +qipkli (218) -> putdy, rfvtz +rakjhe (103) -> wrhfj, ssvgu +rzuig (90) +iewgymm (10) +pqiivg (191) -> hjuhoum, bwpbkb +sswszre (78) +vihkn (63) +efuzst (72) +nbtxoam (83) +lerrsh (38) +myvyjck (86) +daxxjtz (445) -> ewypdpk, jfaseqo, bqxwpf, hweuik, ubiagvr +wefmw (88) +qlezcmj (44) +jvhvlo (230) +tplrep (20) +asvbb (67) +diqon (862) -> mgonf, rnjxo, ykijrb +dmswq (75) -> fsfdbgt, roedr, oplfyg +ietond (42) +tjwtl (87) +kdsmtx (78) -> tjwtl, fdkkxk +tplgx (76) +kbzfvrp (2091) -> xltrwv, hcxpyq, gogfx, uoqkd +ljtub (25) +irupq (60) -> grstedk, hzyxurv +ubzly (253) -> gbrnge, tzuiasi +rjrlumz (72) +dyrpzor (78) +lmtisu (51) +cqrwox (80) +jhxsez (7) +uxzql (84) +upjapf (77) +watsby (84) +adetez (46) +wxpagp (19) +hzjcwc (17) +bmfkrnb (87) +qljvi (237) -> iatmk, sowli, auigtqr, ddeso +chvari (88) +qhxasm (47) +ektvj (46) +feywd (2062) -> nrgrjty, cjhrs, ytomrhu +fjcbsj (97) +hzfgjnm (56) +uidqcn (84) +oagdsv (235) -> ndnxy, kbmqdsc +vcitv (1040) -> xyzmpjv, nlaym, fqftj, zrtlh, lnozan +dbqwqo (13) +lnozan (166) -> yhtmfb, dcrhafq +lhcegk (85) +taapm (58) +tntwm (79) +ovozt (70) +meuoa (90) +wzrpo (28) +lzmldaf (71) +oaonzl (95) -> lzgcs, wblgb +stvho (6) +xcerg (19) +denjcv (8) +budzpo (22) +wpmoil (54) +vehlv (233) -> jhxsez, xavbkjb, jdhwx, beinhu +blvgj (13) +giiie (95) -> lohgt, ekezedh +onmidw (436) +lftsl (79) +ktgfxpm (55) +nwvbh (29) +vdywyof (10) +juykf (339) -> wbqyxc, qghexm, spqtfmy +dzcyze (6) -> tovve, jtugpxm +rxozjry (88) +htoep (64) +qbdrnwf (6) +wpidtfu (49) -> ubfljy, slbyad +agfxi (85) +mtaatz (266) -> gjegewd, cozma +mznemqf (78) +eoabav (85) +ewypdpk (21) -> fdxizm, sbfiowr, zpatw, nbtxoam +ntqdd (80) +fqoozik (14) +gobzapu (50) -> pturyym, drqjijj, yoxfi +ytomrhu (197) -> xcrejqf, zbfds +vgoayw (21) -> vvyuxd, ahcxyzi +gslkem (11) +pgefkd (2000) -> rxmaax, wpmef +dztpfb (187) +dsvthh (82) +nemethx (5) +yquoa (98) +opfgye (151) -> yuctaoj, hsxey +vqecsyp (84) +hlxhne (35) +jfaseqo (247) -> khydeiy, lvbgvb +qborl (299) +yzpfod (28) +spqtfmy (45) +ptwgg (21) +suxsxhs (72) +kchnqf (82) +qvaemxv (99) +rupwawl (61) +gsnlv (137) -> oopqw, wghzp +tsqmps (63) -> bykynh, xfyybbx +yiimp (79) +xalpz (49) +xcriywz (26) +uabcnf (78) +zmkuj (364) -> kutxof, knxyay +egkkx (405) +kfojlo (9) +xavbkjb (7) +uuepceb (52) +rfvtz (21) +vunjzqr (15) -> gtwif, uuepceb, rgthsm +fbbeae (40) +yuctaoj (6) +tllmans (2018) -> abvtv, sbocc, fyxrsks, camnbrn +wirio (33) -> ztgujur, ovozt, nhfaz, zagsm +mozwerl (37) -> vpfaa, ulqloyn +mydrx (165) -> hdpqb, lgjkmc, aikum, ohzbeco +qvzsob (88) +etksk (47) +oopqw (17) +fowke (51) +txlrdpc (1421) -> jmtqh, flbni, loukhc, iglpkvv +dbkhupp (117) -> bugid, fzftvzt, foyeln +aurik (2443) -> jriph, bykobk, uylvg, yxhntq, ywdvft +tqved (35) +btkth (7) +gjqasxb (33) +snqbfd (61) +qgyboht (10) +eqdugzw (51) +xeqol (11) +oynrsea (79) +ilfmw (68) -> rzahe, fbfawqa, hxtumb, wtuse, vikpkr +dphwkj (88) +utoyap (72) +opbyya (93) +flcxc (19) +jishckj (155) -> uzifsnw, vqecsyp, uidqcn +kvrrast (175) +teufo (99) -> jmypi, aegkypi, kienpis +rlghl (32) +bugid (45) +vkeqd (87) +osppg (72) +xxcsggt (97) +vpgtsem (354) -> aqgufrg, sthzqgi, kwemyhv +eqkno (29) +ieqrsbo (65) +syvhbgb (77) +vxcuhd (66) -> vhnoll, xphisb +kugzwm (99) +vekxtb (202) -> zyvdjl, xirit +andsm (60) +gjegewd (10) +wmril (38) -> lmkdc, yhnbyxd +awcgokk (71) +wynfir (95) +seavb (67) +ohksn (97) +bykynh (56) +bjcmqj (72) +fyxrsks (48) +qhzdnug (51) +vvyuxd (93) +lsgmebq (143) +tykqh (81) +cwkoak (74) +ozeuxvw (90) +lmkdc (81) +nrgrjty (33) -> vkrhnw, eiqvo +vqxoyl (13) +onkvtu (83) -> mowtdty, zivoem, ruroup +hzyxurv (70) +immqut (285) -> fdbyixt, qhnifn, knxli +pjrin (295) +qihokeg (56) +nalhjfn (2161) -> lwogeq, ayvoftj, vxcuhd +siwcnqk (74) +nwmgu (285) -> mndwt, jjbgnry +blwogji (19) +kibpy (52) +iabql (84) -> ickkf, jfkhs, ypdcyhe +exmpr (230) -> pofvr, osppg +xbvlp (94) +ovsqv (6) +ddooi (107) -> dxllc, nwuxy +iutebku (1047) -> kfvzter, awronb, imzjzf, becfiz +qahkfnd (123) -> xcerg, upsbm +skzmpao (99) +tonljgn (57) -> gpwroki, qborl, eskfcor, leecyuk, nwmgu, zqbje, zalfzf +xxqyp (91) +ssvgu (46) +vmjcif (9360) -> tyrncu, ilfmw, nntuwn +oplfyg (77) +cigdar (339) +ilyaln (76) -> caufkxz, ktgfxpm, obqyrh, iqvnyzy +ryxdad (84) +zgjcuz (53) -> wefmw, wtluvr, wgqlq, enlnjb +pdswch (67) +glbvimo (211) -> fjcbsj, ggoegus +eyxvb (60) +utghvik (24) +ymnotlu (88) +hekdhpe (13) +ukldjwr (335) -> fvhtci, elvjpjr +ayvoftj (98) -> fvdpch, mnvip +bkpjjg (51) +mndwt (7) +hxunt (72) +yprilie (20) +kspwjf (55) -> ietond, orjnuc +nvuiy (92) +lgvgz (9) +hdtndko (38) +djfnwv (67) +bktgoug (208) -> nzzzh, lkfjzec +xnyma (51) +jfkhs (50) +firwwz (91) +sfooljn (69) -> gaszn, qhzdnug +qddxuou (63) +xjghf (181) +lnzzwfi (24) -> blwogji, ojijdav +puvpxd (38) -> opbyya, uczyc +pgqdymw (88) +sovgznm (51) +wzcini (97) +mekcnd (38) +cakeb (67) +grstedk (70) +rfnnn (7) +zrtlh (68) -> upjapf, pqcxw +gtoij (184) -> lssxhxw, brirt +vxgbrvk (5) +bmbkh (168) -> gjqasxb, ystegvn +xltrwv (2388) -> htqkf, ivnla, jsrfoem +xmxvd (31) -> bjcmqj, zevpw +hcxpyq (24) -> ukldjwr, gyymhc, kdelzk, tqjtmnl, glfsclp, cjgtg, saaggxs +jsojra (78) +eijnbk (65) +slbyad (95) +nrzao (25) +wnggxc (217) -> gslkem, ojzyz +pejys (94) +wjrjt (407) +gotuw (86) -> vlujgrg, pkkpfqd, hxunt, efuzst +hfzsc (58) +jzjgef (234) -> hlxhne, laxksv, tqved, nnhhm +jtugpxm (94) +bxabcu (570) -> eztcv, cnvjej, jikwvk +aikum (205) -> lgvgz, kfojlo, jjdzuw, yvkbhqt +iaabs (63) +rnjxo (61) -> eypmjnl, ebudz +kbmqdsc (39) +hvfbx (19) +iqwsxmt (22) +usbgi (53) +petrvdq (61) +elpnrhu (39) +fdxizm (83) +eskfcor (263) -> xlsmzvh, cuvke +fpkcbpf (210) -> hrxxih, cxrmuo +ggoegus (97) +zwfyefp (33) +iehag (97) +hmxzzp (42) +wpdrp (41) -> gxxwgu, vbhmz +qlucu (74) +jnotktj (302) -> bxoslf, usbgi +sxwegk (79) +gogfx (2601) -> warwhgb, wlpnxme, suxsxhs +ybuocfy (1374) -> tzfii, safaxql, opfgye, johvj, ezjzcma, ffuxvj, ztubst +jfnojdk (212) -> lsqafn, xjzwjwo +ecqun (20) +wblgb (98) +pfohpw (43) +yhtmfb (28) +oedzmki (360) -> npehrzk, ugrxr, mcjpy, mpyhy, cscdc +detpnh (47) -> dqxjmn, seavb +fvhtci (32) +wpboq (41) +bwpbkb (35) +zbbyzr (78) +dwghva (53) -> nalhjfn, txlrdpc, sxplgr +jlbbmrc (97) +ehogp (84) +jdhwx (7) +leecyuk (173) -> qyyiyo, fqbwlo +xfafo (9) +miuaxx (380) +bqxwpf (251) -> vcweon, bkpjjg +mvwtr (61) +bvtsl (89) +zqbje (219) -> tdxsvy, vycfxv, ecqun, ketqren +lwogeq (102) -> fymxr, ioyibl +dmnohav (23) +hpqvzn (5383) -> mxmzyac, gtukrss, ybuocfy +moaabux (26) +quwnokw (19) +qfmbrpi (7) -> ryxdad, kinfgwy +wnmyhx (161) +rilyl (28969) -> aurik, fcmspin, hpqvzn, hymjivf, qgrkb +lelwex (210) -> gabonn, rfnnn +zbpsmm (67) +bafivi (408) -> kresb, fqoozik +mwvpdtt (188) -> udpwvnp, ollxzi, uhomjuv +czwhzbc (282) -> guggdb, xalpz +dufuw (97) +rnnbl (114) -> zctkn, pfohpw +sddwvuf (297) -> wpmoil, yfcnm +totce (96) -> wqhxpu, ibxac, vihkn, qddxuou +vecsik (50) -> dsvthh, kchnqf, uifjz +pllcvd (30) -> gcuxn, kzbgh, zmtzfbt +zpatw (83) +unexcu (58) +gjjykjf (80) +asorc (67) +akpehu (85) +pkkpfqd (72) +wvkqb (98) +rfguypo (216) -> tqpgecy, tplgx +elfenmu (99) +efyiyc (5) +wgqlq (88) +tbosn (47) +fdkkxk (87) +gneipe (47) +guyzk (94) +awronb (279) -> ieqrsbo, eijnbk +nosbdrs (17) +ztgujur (70) +vvqdsqo (19) +gcuxn (68) +zrfcjo (293) -> ajqgxy, gcult +mvhek (52) +emjyxt (17) +kvblxto (39) -> cafeffy, qljvi, viftnsh, kcfqe +pisrmb (15) +uhomjuv (64) +oykud (1210) -> quwnokw, vvqdsqo +hnmipv (48) -> qvzsob, dphwkj +setljkt (49) +pdvmaam (67089) -> dwghva, hmonryr, rjdmf +tsmekuh (216) -> budzpo, wvrvgio +lpmsj (1266) -> inzzz, pwibnc, mtaatz +xbaluf (51) +lsqafn (84) +ezfoih (51) +hekghqb (43) +htqkf (9) -> asvbb, rtckpbz +wsgab (66) -> qlscb, xwudzc, cozmd, agfzkj, yewec, hvdpvf, gqrjzf +kmhdfd (10) +kmtpsb (56) +kiwylpo (58) +wbqyxc (45) +bozvn (6) +viftnsh (315) -> tlirtlm, etksk +udisj (10) +cgtirrb (368) -> stvho, shwgbpx +jlmgl (36) +xxgvcq (81) +sbfiowr (83) +nhfaz (70) +johvj (163) +osckuj (58) +idswf (15) +tqjtmnl (115) -> eujco, amacxs, lzmldaf, awcgokk +pwibnc (22) -> pgqdymw, tjffc, mbzenl +jtvvv (67) +hshja (12) +qghexm (45) +uejnd (88) +qlgkl (94) +aqgufrg (17) +cjhrs (131) -> zrruyn, sqwioau, jrrrwqw, rupecqk +rywlizi (44) +xyzmpjv (28) -> xxcsggt, wzcini +xyarhf (80) +hztbvq (348) +piepj (20) +ojzyz (11) +uljtowd (77) +ceofy (3309) -> yofqkfe, iiyhw, yiwyghj, oedzmki, qywnr, kvblxto +fzftvzt (45) +hsvleq (2142) -> emjyxt, ymjcf, mxtxzdj, trepya +jikwvk (110) -> unexcu, ksbrn +wnxya (63) +tjffc (88) +hsxey (6) +qijgfwk (155) -> fbbzyxj, ewbfx +pxkcra (23) +isfuod (17) +lgdtj (24) +qszyv (15) +zbwfbgd (38) +bgjreum (62) +mxtxzdj (17) +xjzwjwo (84) +rxmaax (75) +pwyqx (17) +qezwnc (49) +wvjhjjn (2611) -> zmukql, lswznxp, rsujfpj +amacxs (71) +lwatsc (76) +hpohuv (128) -> fhjpe, mvhek +vhnoll (95) +uujpyn (84) +lqnym (99) +ollxzi (64) +itqiej (90) +vmutmbz (71) +hwcnp (67) -> bjsyz, znwmy, sdxxuml, vgxle, fmufi +gnukyxz (6) +wmhwmv (45) +hcwly (83) +qwuug (57) +ggcyyr (58) +ztubst (43) -> zddmfy, wdmkbxa +qduyad (78) +uifjz (82) +tpkmqc (30) -> hqbad, oatauv, dlfghsv, bafivi, onmidw +cozma (10) +yxqwz (75) -> rlghl, hgaupyo +ohzbeco (175) -> vzglbr, edkcs +fqbwlo (63) +pzpltg (56) -> tnnjkm, tfkbv, ibixfz +sdxxuml (246) -> lrqeps, utghvik +nntuwn (109) -> txxjkb, gihcxn, jnotktj +mylibd (71) +gbrnge (91) +gtwif (52) +hsbzn (32) -> gfnxtjy, tabwkx +zrruyn (19) +safaxql (107) -> rbast, yzpfod +eztcv (78) -> cwkoak, bcmhwm +hxbcz (10) +ozecapv (121) -> bsbjxg, cpbasst +lufzptb (63) -> bgjreum, cryabx +fgsxy (13) +zivoem (53) +ibwax (7) +taudz (71) +fbfawqa (197) -> mdledr, szymk +hzmxo (1301) -> tlkqqk, ubzly, zrfcjo, nlbjopb +wxbsqif (28) +nnhhm (35) +doevlp (67) +nzdcujt (280) -> yvdidmd, qhaxz, ptwgg +nkviw (61) +xqbgo (84) +mdledr (28) +bxoslf (53) +rqbqxy (80) +endqfm (97) +jlrfg (88) +idvtm (92) +yscyxrt (6) +pjbrh (214) +camnbrn (48) +dcqdop (500) -> jijjnbw, bwdstyz, lnzzwfi +yhnbyxd (81) +qfhptx (92) +qyucm (127) -> yjdfxn, ysmrs +jvvnvo (138) -> wzrpo, sfeepek +olxbw (99) -> rqbqxy, xyarhf, qxtttuu +fvdpch (79) +osgdles (76) +yvkbhqt (9) +khyzbb (78) +lrqeps (24) +fbbzyxj (10) +gabonn (7) +jsrfoem (143) +zbfds (5) +mwojc (18) +opgjd (217) -> nkviw, petrvdq +hftcktd (78) +cryabx (62) +ezjzcma (21) -> taudz, pmtkuu +gfgrl (36) +zelhlaj (44) +shwgbpx (6) +jjrto (1452) -> puvpxd, lelwex, hnmipv +vcweon (51) +fqftj (102) -> chyyj, uetfc +xilohyg (28) +zctkn (43) +ounhwx (19) +rgthsm (52) +uypiw (85) +gnstbtt (64) +tdgeaw (252) +ebudz (82) +hqtwr (56) -> dyrpzor, sswszre, jsojra, qduyad +wdmkbxa (60) +guggdb (49) +pturyym (37) +abvtv (48) +eudtoy (99) -> hsvleq, daxxjtz, tllmans, tpkmqc, mphoskw, zqbkt +warwhgb (72) +orjnuc (42) +tzfii (115) -> mozwqgu, lgdtj +yxhntq (9) -> bmgtktw, kddqkkz, hztbvq, omouek, totce, wltxoge +ykijrb (225) +fdnxe (74) +bcmhwm (74) +uoqkd (1565) -> oagdsv, pbkyjk, wirio, wxjne +iprxseg (99) +gaszn (51) +gihcxn (56) -> jlrfg, sxxod, ymnotlu, yhcsmfs +tvpovok (59) +pqcxw (77) +sddsn (84) +iagng (28) +mcjpy (129) -> cmgugdz, asorc +xlsmzvh (18) +gyymhc (353) -> pxkcra, dmnohav +oielzfu (2549) -> jnlnsk, qkhwa, iutebku, fpiatig, feywd, wvjhjjn, ffypved +eeofxt (16) +xtbhjq (40) +tfkbv (165) -> tvoqmae, idswf, fjlsk +hjuhoum (35) +brirt (8) +zvittjn (202) -> iwovx, wklcvl, gfgrl +kwemyhv (17) +auigtqr (43) +ndnxy (39) +pfwuaht (295) +mofidvl (13) -> tgken, sddsn +flbni (341) -> mwojc, ibuzkf +ekezedh (98) +coenxv (74) +esskfkp (6) +jjbgnry (7) +mumddr (79) +rzahe (73) -> rzuig, meuoa +xywsyz (78) +dsuhkja (67) +vkvvtm (92) -> whavaec, lftsl, oynrsea, mumddr +gkzimba (40) +rstjsa (96) +qrqxdk (43) -> xrzdoz, risnzi, ehogp +dqxjmn (67) +xytmux (48) -> osgdles, geqrhsr +vihqwqe (95) +hjroy (214) +gfnxtjy (91) +lhplxk (5) +yewec (425) +wapwp (35) +hlqnsbe (77) -> rilyl, vhyiaf, pdvmaam, jkbuq +wjwqs (49) +rhgfl (16) +omouek (256) -> adetez, radwgcq +fjlsk (15) +ubuuw (79) +beinhu (7) +mzpumh (93) +rjdmf (2692) -> uotis, hwcnp, yhzue, diqon +yoxfi (37) +szcxg (7) +hzuqtd (39) +lffnvze (2861) -> ozeuxvw, itqiej +idjquuv (59) +xhqpkdq (15) +favay (44) -> iprxseg, jujtux +bjsyz (276) -> xfafo, wwtxe +xphisb (95) +jgome (77) +scabkd (574) -> rpagi, ffvsvb, fpkcbpf, mlslqa, zvittjn +yjdmkg (45) +cckdoyb (172) -> wvcui, wapwp +uetfc (60) +vrypfpq (29) -> doevlp, pdswch, cakeb +vlgyos (10) +odlobo (12) +cxieq (91) -> uujpyn, uxzql, watsby +uotis (137) -> rnnbl, irupq, rrvihye, gtoij, xytmux, kixinqo, wmril +rupecqk (19) +zmaxz (89) -> qnbyib, myvyjck +ignsmt (61) +tnnjkm (165) -> gavzkq, qszyv, jgtnj +inxpyl (36) +glfsclp (87) -> ibqev, khyzbb, uabcnf, wkdquda +ajqgxy (71) +nlbjopb (309) -> pbtuupy, hmxzzp, arzxsdq +jqfou (14) +wghzp (17) +winyji (71) +qcmxoe (22) +pajjlng (7) +ibxac (63) +zdekdn (28) +slrxywr (38) +vgkvnu (6924) -> oaddogg, gabpxsf, jybwslx +chyyj (60) +cpbasst (9) +xznjrta (5) +pcitx (41) +arzxsdq (42) +aegkypi (32) +ffypved (23) -> jfnojdk, cgtirrb, czwhzbc, mfvdags, miuaxx, mwvpdtt, hgbgr +ymjcf (17) +onhpt (19) +lxmtjx (43) +mbzenl (88) +yenoyh (80) -> mekcnd, hdtndko, slrxywr +vvcoce (76) -> zelhlaj, qlezcmj, dwlqul, rywlizi +ayevuhk (96) +ityktpq (47) +ypdcyhe (50) +seipdcu (65) -> elpnrhu, hzuqtd +wcufjj (925) -> qijgfwk, kvrrast, xmxvd, qfmbrpi, tsqmps, ohjesb, qyucm +gliupmb (83) +bmgtktw (108) -> mhgzc, eyxvb, vojtq, andsm +kresb (14) +dyanei (378) -> kyukz, vdywyof, kmhdfd +eiqjanp (218) -> wynfir, vihqwqe +btlvmkx (8) +rdkqd (78) -> amtxnd, qvaemxv, elfenmu, lqnym +sxplgr (94) -> jwcsw, sddwvuf, vpgtsem, glbvimo, egkkx, kpwgdrt, zgjcuz +fbbcf (46) +hvdpvf (237) -> lclup, qlgkl +oaddogg (80) -> pfwuaht, wnxbu, ijynzc, lgyab, pjrin, nsrsjtk, qrqxdk +mpgkscw (355) -> hekdhpe, jdpfhyl, dbqwqo, vqxoyl +kuydvlr (92) +hxtumb (233) -> udisj, iewgymm +hqaxdqm (89) +cmgugdz (67) +aiizew (88) +ndnmvz (43) +rnimplt (28) +flstvi (25) -> hqtwr, uvybtgx, rfguypo +tyrncu (712) -> vgoayw, gpmfjj, gneen +ahcxyzi (93) +zalfzf (259) -> qgyboht, hxbcz, bcygph, vlgyos +ketqren (20) +qgrkb (9541) -> cufloa, flstvi, mydrx +egtdt (210) -> vxgbrvk, vmyqa, dpqznt, lhplxk +wklcvl (36) +gtukrss (1819) -> wspoq, ggdcjbd, hpohuv +gpwroki (95) -> tmakl, eqdugzw, fwtuv, fowke +rafvktj (48) +rsujfpj (24) +fwtuv (51) +iatmk (43) +ltcwt (33) +aawaew (55) -> ohavz, tsmekuh, qipkli, leymr, wmyojtm +datzi (67) -> svprq, cteerd, ogexy, akpehu +agcqog (25) +mgonf (199) -> ahatk, fgsxy +tlkqqk (67) -> kuydvlr, yqewlf, qfhptx, tpxvyjx +dcjiu (69) +dpqznt (5) +xsdzkqs (93) +iiyhw (1258) -> ozecapv, yxqwz, kspwjf +snbjccn (61) +yjdfxn (24) +cnvjej (188) -> onhpt, wxpagp +vkrhnw (87) +sqkra (97) +oatauv (204) -> hfzsc, pvuno, osckuj, dcpgsg +ddeso (43) +lvbgvb (53) \ No newline at end of file diff --git a/csharp/BScottDay7Sample.txt b/csharp/BScottDay7Sample.txt new file mode 100644 index 0000000..2281b24 --- /dev/null +++ b/csharp/BScottDay7Sample.txt @@ -0,0 +1,13 @@ +pbga (66) +xhth (57) +ebii (61) +havc (66) +ktlj (57) +fwft (72) -> ktlj, cntj, xhth +qoyq (66) +padx (45) -> pbga, havc, qoyq +tknk (41) -> ugml, padx, fwft +jptl (61) +ugml (68) -> gyxo, ebii, jptl +gyxo (61) +cntj (57) \ No newline at end of file diff --git a/csharp/BScottDay8.cs b/csharp/BScottDay8.cs new file mode 100644 index 0000000..31d2fe1 --- /dev/null +++ b/csharp/BScottDay8.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace AOC2017 +{ + class BScottDay8 : BScottSolution + { + public override string Name => "Day 8: I Heard You Like Registers"; + + private const int ARG_REG = 0; + private const int ARG_OP = 1; + private const int ARG_VALUE = 2; + private const int ARG_KEYWORD = 3; + private const int ARG_COND_REG = 4; + private const int ARG_COND = 5; + private const int ARG_COND_VAL = 6; + + public override void Run() + { + string[] example = new string[] + { + "b inc 5 if a > 1", + "a inc 1 if b < 5", + "c dec -10 if a >= 1", + "c inc -20 if c == 10" + }; + + Tuple exampleResult = RunCpu(example); + Console.WriteLine($"Part 1 Example Answer: {exampleResult.Item1}"); + Console.WriteLine($"Part 2 Example Answer: {exampleResult.Item2}"); + + string[] input = File.ReadAllLines("BScottDay8.txt"); + + Tuple result = RunCpu(input); + Console.WriteLine($"Part 1 Answer: {result.Item1}"); + Console.WriteLine($"Part 2 Answer: {result.Item2}"); + } + + static Tuple RunCpu(string[] input) + { + int highestValue = 0; + Dictionary r = new Dictionary(); + for (int i = 0; i < input.Length; i++) + { + string[] args = input[i].Split(' '); + + // create any missing registers + if(!r.ContainsKey(args[ARG_REG])) + r.Add(args[ARG_REG], 0); + if (!r.ContainsKey(args[ARG_COND_REG])) + r.Add(args[ARG_COND_REG], 0); + + // evaluate the condition + int x = r[args[ARG_COND_REG]]; + int y = int.Parse(args[ARG_COND_VAL]); + bool cond = false; + switch (args[ARG_COND]) + { + case ">": + cond = x > y; + break; + case ">=": + cond = x >= y; + break; + case "==": + cond = x == y; + break; + case "<=": + cond = x <= y; + break; + case "<": + cond = x < y; + break; + case "!=": + cond = x != y; + break; + } + + // execute the operation if the condition is met + if (cond) + { + switch (args[ARG_OP]) + { + case "inc": + r[args[ARG_REG]] += int.Parse(args[ARG_VALUE]); + break; + case "dec": + r[args[ARG_REG]] -= int.Parse(args[ARG_VALUE]); + break; + } + + // keep track of the highest register + if (r[args[ARG_REG]] > highestValue) + highestValue = r[args[ARG_REG]]; + } + } + + return Tuple.Create(r.OrderByDescending(x => x.Value).First().Value, highestValue); + } + } +} diff --git a/csharp/BScottDay8.txt b/csharp/BScottDay8.txt new file mode 100644 index 0000000..3c84def --- /dev/null +++ b/csharp/BScottDay8.txt @@ -0,0 +1,1000 @@ +uz inc 134 if hx > -10 +qin dec -300 if h <= 1 +ubi inc 720 if qin <= 306 +si inc -108 if he <= 1 +hx inc 278 if hx <= -10 +nfi inc 955 if f <= 5 +h dec 786 if a == 0 +qin dec -965 if f >= -6 +hx dec -463 if hx != -6 +t dec -631 if ty <= 3 +yf dec -365 if ke >= -1 +z inc 270 if ke == 0 +z inc -391 if nfi < 964 +nfi inc -424 if sy >= 10 +uz inc 152 if yu > -9 +yu dec 137 if wg < 6 +ke dec -562 if hx == 463 +ke dec 944 if h != -794 +ty dec -993 if qin < 1261 +a inc 456 if wg <= 8 +zwx inc 585 if ty != 2 +z dec 744 if zwq <= 5 +zwq inc -316 if he > -8 +xf inc -614 if hx != 462 +hx dec -589 if ke >= -391 +xp inc 551 if f != 0 +yu inc 640 if a < 464 +uz inc -299 if t != 636 +t dec -93 if a != 461 +yu inc -202 if qin <= 1270 +hx dec 552 if zwq < -312 +ubi dec -562 if jke <= 4 +nfi inc -531 if sy == 0 +xf inc -620 if h < -791 +ubi dec 164 if jke <= 2 +xf inc 715 if xf == -614 +si inc 832 if w < 4 +xp inc 37 if t >= 721 +yu inc -49 if u != 3 +wg inc -500 if o > -3 +he dec -740 if xp <= 46 +ubi dec -946 if u != 0 +fkh dec 973 if nfi < 434 +zwx inc 796 if si >= 719 +hx inc 443 if ty < -2 +w inc -515 if wg != -490 +xf inc -394 if xf != 109 +u inc 176 if sy <= 7 +sy inc 170 if w < -513 +si dec -699 if fkh == -973 +nfi dec 321 if w != -519 +yu inc -846 if wg < -496 +hx inc 953 if qin < 1270 +w dec -394 if u < 183 +xf dec -601 if he == 731 +zwx inc 267 if h >= -777 +zwq inc 781 if f > -3 +jke inc 278 if jke >= -3 +u inc -7 if u <= 184 +zwq inc 449 if wg >= -503 +si dec 368 if hx != 1446 +h dec -24 if jke >= 282 +ke dec -284 if yu < -587 +si dec 17 if a > 458 +o dec 177 if yu != -594 +he inc -925 if ubi >= 1116 +ubi inc 544 if zwq <= 915 +hx dec -56 if yf < 373 +wg dec -613 if z > -866 +wg inc -580 if z >= -868 +xp dec -445 if ty > 3 +yu dec -419 if h < -776 +ty dec -75 if xp <= 35 +u dec 30 if xf < -283 +o inc 69 if uz != -13 +f dec 910 if t >= 716 +he inc 100 if xf < -296 +jke dec 125 if nfi >= 98 +yu dec 526 if xp <= 45 +fkh dec 708 if zwq >= 918 +u dec -397 if w > -131 +si dec 417 if u != 533 +wg dec 247 if wg == -467 +t inc 45 if yu < -700 +ty dec 805 if o <= 8 +he dec 734 if f < -909 +z inc 812 if f > -907 +w dec -508 if xf > -300 +a inc -375 if uz == -13 +zwx inc 160 if w >= 378 +o inc -905 if qin < 1264 +jke dec -594 if fkh != -971 +fkh dec -392 if xp >= 32 +t dec 512 if jke != 754 +a dec -949 if ke == -98 +f inc -70 if a > 1022 +f dec -844 if qin > 1261 +u dec 212 if sy <= 176 +xf dec -779 if w == 396 +uz inc -455 if zwx >= 1548 +o dec 502 if wg > -723 +sy inc 77 if u > 326 +uz inc -996 if xp >= 32 +nfi dec -355 if hx >= 1502 +hx dec 855 if hx <= 1503 +qin inc 376 if xf > -296 +sy dec -519 if zwq != 916 +a dec 459 if a > 1023 +ty inc -289 if zwq > 905 +he dec -722 if zwx >= 1532 +jke inc 656 if sy < 691 +u dec -989 if nfi < 466 +a inc -377 if zwx >= 1545 +sy dec -256 if yf == 365 +ubi dec 597 if fkh > -591 +xf inc 403 if ty == -1094 +z dec 335 if o <= -498 +yf dec -707 if zwq < 907 +zwq inc 420 if h == -780 +h dec -612 if uz >= -1010 +hx dec 941 if w != 390 +xp dec 345 if u != 1306 +xp dec -409 if si <= 641 +uz dec 877 if hx <= 574 +t dec 615 if f > -142 +wg dec 505 if hx >= 566 +ubi inc 413 if o >= -506 +uz dec -263 if h < -167 +f dec 537 if xf != 110 +wg dec -762 if sy > 935 +o inc 458 if fkh == -591 +ubi dec -914 if ubi != 1488 +wg inc 203 if sy >= 952 +zwq dec -879 if ty == -1094 +h inc -676 if xp <= 103 +he inc 544 if zwq <= 1795 +jke inc 178 if si < 648 +xf dec 262 if xp >= 96 +sy dec -214 if w >= 383 +u inc 88 if uz != -1633 +yu dec 375 if t <= -358 +wg dec 526 if hx == 568 +yf dec 731 if si > 631 +he inc -980 if zwq == 1793 +ty dec 94 if t > -368 +yf dec -849 if yu > -1077 +ty dec 889 if f != -139 +w dec 37 if f > -137 +wg inc 552 if si > 631 +he inc -989 if nfi > 457 +f dec -500 if zwq > 1785 +ubi inc -394 if jke >= 1578 +yu dec -370 if o == -498 +nfi dec 879 if hx >= 559 +nfi inc -280 if h > -853 +a inc -746 if wg != -431 +h inc -362 if a >= 569 +jke dec 740 if si > 631 +zwx inc -152 if yf < 489 +z inc -442 if wg == -431 +t inc -404 if xp != 101 +t inc 668 if ty != -2081 +f dec 846 if yu >= -1084 +xf inc -342 if z < -1638 +xf inc 692 if ubi > 2003 +qin inc 874 if sy == 1159 +t inc -792 if jke < 850 +jke dec 263 if ubi < 1997 +xf dec -645 if w != 343 +u inc -291 if yf < 485 +wg inc 948 if fkh != -574 +u inc 773 if zwx <= 1392 +fkh dec -56 if jke != 836 +w dec 436 if qin <= 2521 +o inc 769 if ty >= -2079 +o dec 457 if zwx < 1392 +a dec -422 if fkh != -531 +z dec -170 if qin <= 2518 +qin inc -569 if ty >= -2077 +uz inc -789 if zwq >= 1803 +f dec 322 if xp < 103 +xf inc -752 if xp <= 108 +xp dec -46 if z == -1472 +hx dec 378 if zwx <= 1390 +ubi dec -746 if ubi < 2008 +xf dec -22 if si > 635 +h dec -274 if zwq <= 1794 +u dec -980 if yf < 485 +ty dec -41 if ty <= -2071 +t dec -818 if ty != -2043 +u dec -764 if nfi < -704 +uz inc 233 if sy >= 1152 +t dec 552 if xp > 145 +h dec 689 if zwq >= 1789 +h dec -219 if yf <= 485 +uz inc 890 if uz == -1390 +zwx dec -399 if z == -1472 +jke inc 792 if w <= -85 +si dec -991 if nfi == -701 +f inc -355 if ke <= -91 +ke dec -575 if wg > 516 +hx dec -38 if ke <= 482 +si inc 478 if he > -1623 +ubi dec 18 if o < -185 +fkh dec 394 if wg > 521 +wg inc 988 if zwx != 1790 +hx inc -777 if qin >= 1949 +ubi inc 680 if he >= -1618 +fkh inc -479 if qin > 1945 +zwx dec 704 if jke != 1640 +fkh dec -167 if t == -216 +yu dec 881 if ubi >= 2724 +wg dec -93 if qin >= 1940 +nfi dec -763 if o <= -182 +t dec -937 if t != -215 +u inc 114 if t != 721 +ubi dec 547 if uz < -507 +qin dec 827 if sy == 1159 +w inc -588 if t >= 721 +zwx dec 548 if a > 997 +a inc 929 if f < -1164 +zwq inc -260 if zwx == 1084 +ty dec -814 if si > 2100 +yf dec 745 if w >= -665 +t inc -257 if ke <= 486 +u dec 522 if t < 471 +hx inc 376 if z == -1472 +t dec 996 if si != 2098 +uz dec 375 if u >= 2337 +fkh dec 823 if xp >= 149 +z dec 497 if ty != -1212 +t dec 0 if sy >= 1156 +xp inc 742 if a != 993 +xp dec -160 if f < -1149 +zwx dec -988 if z < -1972 +he dec -586 if w < -677 +yu inc 646 if wg > 1594 +jke dec -686 if he < -1616 +a dec 375 if jke <= 2323 +h dec -719 if ty < -1223 +xp dec -169 if uz < -868 +o inc 961 if f < -1155 +si inc 462 if yu == -1321 +hx inc 647 if ke != 487 +jke inc 372 if xf == -579 +xf inc 188 if f == -1159 +a dec 78 if xp < 479 +wg inc -818 if f >= -1166 +yf inc 994 if h > -1418 +fkh inc -812 if xf > -396 +qin dec -321 if si == 2116 +f inc 830 if nfi >= 58 +u inc 24 if h >= -1399 +uz inc 881 if jke != 2693 +w dec 719 if ke != 479 +jke inc 694 if nfi > 61 +hx dec 84 if ty > -1224 +ty dec -221 if zwq <= 1536 +yu dec 236 if zwq == 1540 +yu dec -763 if f != -339 +a dec 892 if w <= -1391 +jke dec -275 if ubi < 2733 +nfi inc -121 if zwx < 1086 +a inc 809 if t < -526 +si inc -997 if jke != 3664 +xf dec 787 if hx <= 1158 +ty dec -599 if z > -1975 +yu inc -534 if a <= 456 +ty inc 573 if nfi < -49 +sy dec -53 if sy < 1162 +wg inc -751 if w == -1393 +xf inc 704 if ubi > 2723 +si inc 314 if wg != 27 +wg inc 607 if h == -1408 +zwx dec -263 if a >= 450 +qin inc -390 if ke <= 482 +ke inc 866 if f <= -330 +f inc 79 if uz <= 9 +hx dec 683 if z > -1975 +si dec 678 if wg > 634 +si inc -853 if zwx != 1338 +z inc -586 if jke == 3665 +he inc 810 if jke != 3656 +uz inc -248 if o != 762 +fkh dec 334 if xp != 474 +w dec 368 if zwq == 1533 +t dec -502 if f <= -259 +yf inc -523 if u > 2344 +yu inc -10 if ke != 477 +u dec -918 if u < 2345 +uz inc 580 if fkh <= -1979 +t inc 144 if ke >= 485 +xp dec -366 if zwx == 1338 +ubi inc -26 if t < -524 +xp inc -776 if he != -813 +ubi inc 136 if a != 450 +qin inc 13 if xf >= 306 +yf dec 536 if uz != 333 +hx dec -213 if z > -1978 +f inc -224 if zwq >= 1542 +wg dec -507 if f <= -246 +yu inc -668 if w != -1761 +ke inc -680 if t != -533 +jke dec -283 if wg == 1143 +f dec 870 if o >= 767 +jke inc -124 if fkh <= -1976 +u dec -567 if w < -1763 +o dec 457 if xf <= 312 +ty dec 576 if zwx > 1345 +qin inc 142 if yu <= -555 +ke dec 749 if hx != 702 +wg dec 851 if w == -1763 +a dec 686 if yf == 933 +wg dec -701 if z > -1964 +ty inc -877 if zwq < 1541 +xf dec -990 if fkh == -1983 +ubi inc 0 if ty == -1282 +h inc -21 if h != -1400 +sy dec -519 if xf != 1303 +jke inc 603 if he > -818 +ty dec -4 if hx > 699 +xp inc 21 if wg > 1138 +xp dec 745 if t <= -527 +yu dec -614 if hx > 691 +a inc -490 if xp != -1018 +h dec -723 if jke != 4428 +sy inc -594 if yf != 947 +hx dec 851 if o <= 761 +a dec -345 if t >= -532 +ubi inc -359 if f < -1122 +jke dec 738 if wg == 1143 +ty dec 340 if xp != -1024 +nfi inc -786 if w >= -1767 +zwq dec 428 if qin == 740 +zwq inc 503 if t < -527 +zwq dec -98 if si != -113 +sy dec 297 if he > -815 +u inc -886 if xf < 1313 +z dec 105 if h <= -704 +yf dec -260 if f != -1127 +w dec 920 if w != -1756 +a inc 744 if hx == 697 +sy inc 262 if t <= -528 +si inc 347 if uz <= 347 +si inc -188 if o <= 779 +h dec 191 if he != -812 +xp inc 1000 if sy >= 578 +yf inc -563 if ke < -942 +xf inc 547 if h > -710 +f inc -783 if yu < 73 +z dec 394 if h < -705 +hx dec 765 if xf != 1856 +t inc -817 if wg >= 1140 +yu dec -8 if t != -1343 +w dec 152 if zwx >= 1338 +ubi dec -134 if fkh <= -1978 +f dec 841 if jke >= 3679 +uz dec -245 if t <= -1349 +o dec 151 if a >= 1066 +qin inc -219 if w <= -2840 +yu inc -323 if yf != 637 +sy dec -490 if xp == -24 +xp dec -649 if qin != 735 +xf inc 39 if nfi != -855 +wg inc 581 if sy < 1074 +f inc -42 if uz == 583 +z inc 506 if he < -808 +he dec 568 if he < -804 +wg dec 60 if he >= -1381 +hx dec -835 if qin < 748 +ty inc -593 if qin > 739 +wg dec 613 if wg == 1664 +h dec 107 if h <= -706 +yf dec -40 if a > 1058 +fkh inc 511 if ke >= -949 +wg dec -812 if yf == 638 +xf dec -349 if zwx <= 1356 +si dec -614 if ty <= -1868 +z inc 28 if he <= -1376 +he inc -666 if uz > 579 +sy dec 584 if si == 666 +sy inc 536 if o > 767 +f dec 384 if t != -1342 +jke dec 341 if xp != 625 +w dec 894 if zwq <= 2139 +si dec -871 if yu < -240 +he inc 659 if nfi <= -838 +qin inc 32 if xf == 2238 +nfi dec -165 if z > -1938 +h inc 473 if zwq == 2130 +qin dec 666 if xf >= 2230 +qin inc 469 if si > 1543 +t dec 348 if h == -813 +si inc 578 if jke != 3684 +ke inc 186 if a == 1056 +jke inc -61 if xp >= 616 +u inc -347 if fkh > -1987 +zwx dec -894 if ubi != 2968 +h dec -204 if ke <= -768 +yu dec -501 if sy != 1024 +f dec 393 if wg > 1866 +t inc 768 if hx != 766 +he dec 459 if fkh == -1980 +qin dec -650 if z >= -1933 +sy inc 333 if yf <= 642 +nfi inc 93 if xf >= 2247 +z inc 829 if xp == 620 +wg dec -396 if hx != 760 +xp inc -71 if hx <= 765 +w inc -837 if ty >= -1884 +ty dec 380 if z < -1925 +h inc -162 if yf <= 642 +hx inc 324 if yu > 258 +fkh dec -83 if ty > -2258 +uz inc 716 if jke <= 3631 +w inc -331 if nfi == -680 +ubi dec 638 if wg >= 2252 +wg inc 139 if ty < -2256 +xp dec 21 if he >= -1387 +fkh dec 723 if hx < 774 +zwx dec -981 if f != -3170 +f dec 650 if ty == -2263 +f dec -247 if jke == 3623 +hx inc -250 if z >= -1938 +xp inc -236 if hx == 517 +ke dec -408 if ubi == 2332 +xp inc -266 if xp < 377 +f inc -349 if hx > 509 +u inc 945 if jke > 3621 +si inc -843 if yu < 252 +t dec 747 if ty == -2262 +uz inc -684 if xf <= 2228 +yu inc 73 if t <= -922 +jke dec 435 if xf <= 2238 +sy dec -495 if z < -1937 +jke inc 293 if jke < 3198 +fkh dec -220 if xf <= 2236 +z dec -905 if wg >= 2252 +wg dec 544 if nfi <= -679 +ty inc 807 if a > 1050 +qin dec 337 if ty < -1447 +xf dec 178 if ty != -1455 +nfi dec 119 if a >= 1055 +he inc -956 if fkh < -2624 +jke dec 224 if t == -923 +fkh inc 135 if o != 765 +si dec 428 if qin == -229 +o inc -985 if si > 1114 +he dec 100 if f != -3272 +ty inc -707 if xp >= 94 +jke dec 551 if w == -4895 +yu dec -308 if h <= -968 +h inc -429 if wg <= 1718 +wg dec 278 if uz == 1299 +uz inc -416 if fkh >= -2494 +ty dec -876 if qin == -229 +sy inc 213 if o >= 774 +qin dec 664 if wg > 1434 +h inc 273 if uz != 879 +zwx inc -611 if ubi != 2334 +hx dec 384 if wg >= 1429 +he inc -84 if uz == 883 +hx inc 23 if yu > 626 +si dec 319 if wg == 1433 +h dec 343 if ubi <= 2332 +yf dec 941 if w == -4895 +w inc -450 if u >= 2981 +hx inc 435 if xf <= 2065 +si dec -198 if xp <= 107 +si inc -322 if he < -1467 +o dec 21 if xf != 2055 +zwx dec 251 if ty > -1284 +ke dec 399 if yf > -309 +f inc 965 if xf <= 2063 +ke dec 488 if o != 749 +a dec 163 if a != 1061 +hx inc 2 if w != -4887 +zwq inc -736 if uz < 888 +qin inc 155 if a <= 884 +zwx dec 798 if xf == 2060 +o dec -566 if jke < 2933 +yf inc 536 if u != 2965 +f dec -782 if zwx != 575 +nfi dec 603 if z <= -1024 +f dec -409 if t == -929 +zwx inc 140 if hx < 597 +hx dec 778 if f > -1120 +h dec -327 if wg > 1435 +ke inc 146 if zwq <= 1406 +sy dec -718 if xf != 2060 +yf dec 125 if h < -1140 +xf dec -154 if ubi == 2326 +a dec 744 if xp > 93 +yf inc 837 if si > 982 +jke inc 526 if o < 1320 +jke inc 919 if he <= -1470 +xp dec -626 if xp != 102 +h inc 18 if uz != 885 +uz dec 39 if h >= -1133 +o dec -642 if ubi > 2324 +wg inc -500 if uz >= 842 +zwx inc -530 if o <= 1956 +u dec -334 if ke != -1100 +yf dec -231 if o <= 1966 +zwx dec 470 if fkh == -2488 +zwq inc 345 if xp == 97 +ubi dec -357 if fkh >= -2496 +nfi dec 923 if ke >= -1100 +ke inc 764 if si < 980 +t inc 165 if fkh >= -2488 +he inc -579 if yu > 626 +xp dec 337 if w != -4897 +o dec -573 if ubi < 2690 +nfi inc -512 if jke != 4384 +yf inc 85 if ubi != 2689 +u dec 401 if zwq <= 1399 +ty inc -528 if uz == 844 +xf dec 254 if fkh == -2488 +f dec 713 if z >= -1033 +xf dec -632 if zwq > 1392 +uz inc 166 if f >= -1823 +zwq inc -492 if he >= -2051 +hx inc 287 if uz != 851 +ty inc -935 if wg != 929 +h dec 74 if jke <= 4384 +zwx inc 43 if hx == 102 +jke inc 151 if z < -1025 +w dec 839 if t == -764 +wg dec -753 if fkh > -2492 +o dec -751 if t != -764 +ty inc -359 if yu > 635 +yu inc -344 if z > -1024 +uz dec -356 if xf >= 2440 +u dec 797 if yu <= 634 +zwq inc 141 if he != -2060 +wg dec 365 if a < 156 +t dec 382 if u < 2112 +f inc 374 if wg == 1325 +he dec -912 if qin >= -896 +o dec 325 if o >= 2524 +ty inc 276 if a > 143 +ty inc 507 if zwx > 297 +f dec -837 if yu > 627 +wg inc 221 if ke != -1100 +z dec 423 if si >= 977 +o dec 551 if zwq < 1039 +f inc 956 if si >= 978 +fkh inc -236 if fkh >= -2496 +he inc 206 if hx > 99 +zwx dec -239 if he < -927 +hx inc -246 if wg >= 1545 +fkh inc 652 if he > -935 +qin inc -429 if yf <= 1184 +yu dec -3 if nfi == -2830 +zwq dec -582 if sy <= 1359 +ubi inc 728 if t >= -1138 +fkh inc 327 if xp <= -231 +w inc 85 if xp >= -227 +t dec 983 if zwq < 1630 +xf dec -568 if he >= -939 +yu inc -193 if f >= 342 +ty inc 210 if he < -925 +f inc -345 if uz < 852 +nfi dec -444 if h > -1206 +xp inc -160 if nfi < -2389 +f dec -919 if u > 2107 +zwq inc 788 if ke > -1107 +ty inc -628 if o != 2201 +a inc 506 if jke > 4525 +t inc 413 if t > -2130 +nfi dec -131 if fkh == -1745 +ke inc -475 if wg < 1553 +wg dec 955 if jke > 4525 +xf dec -41 if hx < -148 +ubi dec 105 if uz < 846 +h inc -312 if ke < -1568 +ubi inc -552 if o != 2201 +zwx dec -713 if w < -5732 +zwq dec 437 if jke != 4520 +a dec -164 if ke >= -1565 +hx inc 189 if sy != 1356 +o dec 856 if wg != 593 +xf inc -563 if h > -1518 +wg inc 313 if yf < 1186 +he inc -628 if u >= 2102 +he dec -537 if xf < 2447 +zwq dec -64 if o >= 1345 +t inc -465 if wg <= 905 +jke inc -495 if u == 2107 +qin dec -271 if zwq < 2046 +zwx dec -18 if w == -5734 +yu inc -376 if h == -1508 +zwq dec 537 if zwq == 2044 +nfi inc -751 if uz > 837 +yf dec 135 if h < -1508 +nfi inc 943 if u > 2106 +si dec -835 if ty > -2889 +zwq dec 334 if zwq > 1502 +ubi inc 920 if jke != 4032 +ke dec 939 if zwq > 1170 +h dec -570 if jke != 4029 +yf dec -80 if yf == 1047 +h inc 104 if w >= -5731 +a inc -173 if sy <= 1355 +ke inc 689 if hx > 51 +ubi dec -953 if si <= 1829 +nfi inc -927 if qin <= -1060 +qin inc 84 if qin < -1051 +zwx dec -466 if u <= 2103 +ubi dec -45 if xp <= -393 +w dec 23 if fkh == -1745 +u inc 658 if fkh >= -1738 +wg dec -262 if uz == 844 +f dec -46 if t <= -2176 +si dec -622 if hx <= 46 +qin dec -617 if uz > 837 +uz dec 775 if sy <= 1361 +ty inc 675 if t > -2191 +xf inc -263 if nfi <= -2076 +ke dec -502 if si <= 2436 +z inc -704 if jke == 4031 +nfi dec -154 if he > -1024 +o inc 896 if he > -1027 +hx dec 1 if qin != -440 +sy inc -236 if h == -936 +qin inc 38 if jke > 4021 +wg inc 168 if ty == -2209 +zwx inc 252 if ty > -2215 +ty inc -296 if ty != -2215 +a dec -346 if o > 2253 +f inc 76 if u >= 2098 +xp dec 22 if wg > 1330 +xp dec 783 if w > -5754 +sy dec -525 if yf >= 1037 +xf inc -434 if yf >= 1046 +u dec -160 if f < 117 +nfi dec -498 if f > 124 +fkh inc 654 if zwq >= 1164 +yu dec 393 if sy != 1881 +zwq dec 966 if qin > -404 +zwx dec 146 if jke < 4032 +nfi inc -531 if f > 108 +si dec 607 if nfi < -2442 +w inc -519 if u <= 2274 +ke inc -299 if ty < -2502 +zwx inc 1000 if nfi > -2456 +o inc -746 if u >= 2269 +ty inc -694 if ubi < 3941 +z inc 37 if uz <= 75 +fkh dec 785 if h < -938 +sy dec -790 if yu <= 243 +nfi dec -952 if u >= 2275 +f inc -326 if ubi < 3957 +u inc -716 if si >= 1826 +xp inc -811 if z >= -2127 +xf dec -825 if sy >= 2671 +h dec -220 if jke >= 4023 +t inc 405 if yf < 1038 +qin inc 212 if t > -2188 +h inc -738 if t < -2176 +sy dec -659 if fkh > -1885 +ke dec -94 if qin != -175 +a inc 407 if a >= 653 +qin inc 628 if h < -1456 +a dec 363 if jke < 4033 +ty dec 582 if zwx < 2376 +zwx inc 93 if ubi < 3952 +nfi dec -728 if xf >= 3265 +fkh dec -652 if u != 1541 +he dec -847 if fkh <= -1233 +nfi inc 258 if t != -2185 +a inc -703 if f >= -214 +w dec 811 if nfi >= -1464 +qin dec 41 if ty != -3082 +xp inc 308 if uz != 71 +zwx inc -688 if wg != 1328 +zwq inc 319 if uz <= 61 +he inc -906 if xf <= 3268 +w inc -941 if ke >= -2722 +h inc 74 if uz == 69 +zwq inc 187 if uz <= 75 +jke dec -909 if he <= -1921 +z dec 820 if si < 1838 +h inc -463 if uz > 68 +ubi inc -3 if hx >= 44 +w dec -250 if zwq == 394 +t inc -910 if z > -2933 +sy dec 917 if ty != -3087 +yf inc -88 if nfi >= -1458 +wg dec -945 if w < -7770 +a inc 700 if zwx < 1778 +jke inc 544 if h < -1848 +o inc -646 if h <= -1857 +h dec -640 if sy > 3324 +zwq inc -743 if jke < 5478 +w inc 13 if w <= -7770 +u dec 806 if si < 1843 +w dec 499 if si != 1826 +wg inc -535 if uz >= 61 +ubi inc -110 if si >= 1845 +xf inc -114 if qin > 397 +ke inc -509 if wg < 1747 +xf dec -591 if t != -2181 +ubi dec -5 if ubi < 3952 +xf inc -123 if wg != 1744 +u inc -84 if nfi < -1452 +qin dec 489 if zwq != 387 +z dec 399 if o == 2246 +yu dec -468 if xf > 3145 +zwq inc -882 if si == 1835 +h dec 771 if he >= -1937 +wg inc 11 if ubi < 3961 +a inc -500 if ty < -3081 +uz inc 809 if zwx < 1780 +yf inc 364 if xf == 3148 +o inc 324 if si == 1835 +ke dec -113 if f < -215 +xf inc 921 if uz > 872 +zwx inc 143 if h <= -1974 +t dec 163 if o > 2565 +o dec -177 if si <= 1838 +ubi dec -200 if fkh <= -1219 +ke inc -62 if t <= -2340 +f inc 546 if si >= 1830 +t inc 467 if fkh >= -1226 +z inc -229 if he < -1935 +hx inc -486 if ubi < 4159 +wg inc -290 if o < 2748 +zwq dec 950 if ty < -3083 +ubi inc 78 if uz != 886 +h inc -842 if z <= -3331 +ke inc 562 if fkh != -1233 +u inc -464 if qin != -94 +he inc 960 if wg == 1465 +o dec -705 if a < 189 +qin dec -769 if wg <= 1467 +qin inc -43 if si < 1844 +he inc -571 if yf == 1041 +o inc 436 if t > -1883 +zwq dec 839 if jke == 5484 +z dec -233 if u <= 202 +wg inc -313 if hx >= -451 +ty inc 552 if zwx < 1913 +ke inc 204 if si > 1826 +yf inc -924 if si < 1840 +u dec -30 if a < 197 +z dec -753 if ke == -2523 +qin dec -755 if uz <= 871 +ke inc -787 if z > -2357 +si inc -676 if qin <= 643 +hx dec 301 if zwq != -2277 +xp dec 617 if z <= -2346 +ubi inc -445 if xp != -1529 +h inc -784 if qin == 640 +ty dec 524 if wg < 1143 +t inc 313 if yu >= 701 +zwq dec -716 if zwq < -2279 +ke inc 258 if sy == 3332 +wg dec -495 if w >= -8269 +nfi inc -327 if uz >= 877 +f inc -940 if zwx != 1923 +jke inc -886 if uz <= 868 +yu inc -619 if f >= -595 +he inc -738 if h != -3613 +fkh dec 354 if jke != 5486 +h inc -6 if nfi != -1783 +jke inc -691 if zwx < 1919 +uz inc 142 if nfi == -1788 +wg dec -303 if a > 186 +jke dec -797 if yf >= 115 +a dec -4 if xf <= 4075 +xp dec -517 if zwx < 1919 +xp inc -983 if ke >= -3050 +f dec -83 if si != 1159 +uz dec 110 if nfi >= -1793 +si inc 219 if fkh != -1581 +wg dec 946 if w < -8263 +zwx dec -809 if nfi >= -1791 +uz inc 664 if ty >= -3089 +xp dec -210 if zwq != -2272 +z inc -359 if ke > -3045 +ke dec 863 if o == 3183 +ty inc -748 if yu == 708 +ty dec 539 if uz >= 1571 +xp dec 666 if zwq < -2271 +z dec 282 if h == -3615 +u inc -702 if hx < -437 +o dec -741 if yf > 114 +h dec -238 if o > 3917 +jke inc -344 if yf <= 118 +qin dec -774 if qin < 648 +xf dec -228 if uz < 1580 +ubi inc 428 if f <= -602 +yu inc -964 if xp < -1479 +wg dec -725 if he <= -2273 +sy inc 913 if ty <= -4378 +xf inc 936 if nfi < -1796 +yf inc 100 if xp > -1481 +jke dec 876 if zwq == -2277 +yu dec 373 if w > -8269 +hx dec -542 if fkh >= -1572 +xf inc 41 if yf >= 215 +w inc -491 if qin < 1422 +jke inc 643 if a == 200 +si inc -74 if he == -2278 +qin dec 842 if jke >= 5004 +hx inc -797 if jke != 5009 +sy dec 444 if uz != 1577 +jke inc -606 if hx != -1244 +qin inc -381 if sy > 2886 +yf dec -922 if qin >= 184 +ke inc 689 if ke > -3920 +yf dec 850 if yf <= 1141 +yu inc -120 if w >= -8750 +ke inc 613 if uz != 1582 +hx inc 620 if xf <= 4351 +sy inc -631 if hx > -627 +xp dec -781 if fkh <= -1569 +nfi dec 196 if sy >= 2266 +f dec -69 if yu >= 330 +o inc 492 if ke > -2616 +sy dec -837 if sy <= 2262 +xf dec 862 if a != 203 +yf inc -182 if zwq < -2272 +wg inc -534 if o != 4406 +si dec 788 if h > -3381 +ty inc -85 if zwx == 2727 +w inc 942 if hx == -619 +o inc -880 if a >= 200 +uz inc 654 if zwx <= 2732 +u dec -710 if he != -2278 +zwq dec -920 if f < -530 +jke dec 21 if z > -2644 +qin dec 529 if f != -537 +jke inc -901 if u <= -470 +w inc 900 if nfi <= -1783 +ke inc 624 if o == 3536 +wg dec 784 if qin == -338 +yf dec 682 if w <= -6921 +a dec 593 if sy <= 3097 +xf dec 442 if hx != -616 +nfi inc 852 if z == -2634 +yf dec -338 if zwx < 2732 +qin dec 511 if ty > -4451 +xf dec -512 if si >= 508 +u dec 172 if xf <= 3558 +w dec -255 if jke >= 3476 +zwq inc -879 if wg >= 408 +zwx inc -498 if si < 518 +xp dec -405 if f == -536 +qin inc -76 if a != -391 +nfi inc -734 if a >= -397 +h dec -940 if o < 3541 +o dec -41 if qin != -412 +f dec -736 if h < -2436 +fkh inc -180 if yu > 327 +u inc 73 if ke < -1981 +xf inc 932 if he > -2288 +wg inc 103 if fkh < -1754 +fkh inc 872 if fkh < -1757 +xp dec 679 if si != 526 +z inc 486 if w > -6661 +jke inc -909 if f == 200 +qin dec 443 if uz < 2223 +f dec -653 if hx > -626 +qin dec -106 if nfi >= -1675 +uz inc 969 if uz == 2228 +t inc -474 if w > -6660 +xf inc -898 if f <= 854 +zwq inc -246 if a <= -398 +yf dec -931 if nfi <= -1665 +h inc 770 if ty > -4461 +u inc -20 if z == -2148 +wg inc -317 if z == -2138 +t inc -73 if a >= -384 +xp dec -372 if fkh > -885 +hx dec -592 if yu < 342 +a inc 357 if uz == 3197 +zwq dec 13 if si <= 520 +h inc 97 if f <= 847 +qin inc 133 if yu < 341 +ty inc -437 if ke > -1988 +ty dec -281 if yf <= 1374 +uz inc 0 if xf < 3595 +o inc -303 if fkh < -876 +h inc -594 if yu == 335 +zwq dec 422 if qin <= -173 +xf dec 44 if u == -594 +hx dec -264 if sy != 3087 +si inc 539 if qin == -181 +ke dec -667 if si < 523 +uz dec 309 if he < -2269 +yf inc -394 if zwx <= 2238 +o inc -572 if w <= -6664 +z inc 241 if t <= -2045 +qin dec 285 if a < -27 +xp dec 413 if zwq < -2667 +ubi inc 317 if t >= -2033 +yu inc -173 if sy <= 3094 +nfi inc -262 if zwq <= -2669 +a inc 98 if uz > 2878 +sy inc 513 if wg == 514 +yu inc -841 if ke != -1331 +ke inc -426 if ubi != 4220 +he dec 187 if he != -2277 +fkh dec 717 if zwq >= -2661 +f dec -191 if uz <= 2893 +zwx dec -661 if yf != 972 +fkh dec -112 if ubi <= 4220 +ty dec 800 if fkh >= -775 +sy inc 981 if xp > -1389 +xp inc 893 if wg <= 510 +nfi inc 944 if qin != -458 +zwq inc -250 if qin != -454 +uz inc -398 if jke != 2577 +w dec -486 if hx >= 230 +z dec -205 if xf < 3551 +f dec 777 if xf == 3542 +wg inc 667 if zwx != 2880 +z dec -851 if ty != -5258 +w dec 653 if t < -2036 +he inc 459 if z > -1091 +yf dec 331 if si != 516 +zwx dec 327 if qin < -452 +xf dec -293 if wg == 1181 +fkh inc -469 if yu >= -679 +a dec 440 if f >= 261 +he dec -292 if xf >= 3833 +xf inc 405 if uz == 2490 +si inc 825 if sy <= 4588 +ubi dec 306 if z != -1085 +fkh dec -949 if jke < 2577 +zwx dec 703 if o <= 3280 +hx inc 951 if o >= 3268 +ke inc 134 if z != -1088 +w inc -621 if o <= 3274 +sy inc 883 if he == -2177 +w dec -900 if jke >= 2586 +sy inc -56 if xf >= 4232 +si dec -994 if zwx == 1860 +u inc 726 if yu <= -675 +si inc 989 if u <= 140 +yf dec 609 if si > 3324 +jke inc -872 if si < 3323 +hx dec 873 if ubi < 3917 +xp dec -284 if o <= 3280 +zwq dec -69 if o <= 3280 +yf inc 921 if he < -2169 +wg dec -859 if h >= -2257 +nfi inc -605 if u != 132 +fkh inc -567 if yu > -682 +w dec 260 if ty < -5262 +si dec -809 if h != -2258 +f dec 604 if qin > -460 +nfi dec 603 if ke < -1609 +jke inc -568 if nfi == -1583 +ke dec 694 if a <= -378 +t inc -188 if yu != -681 +fkh dec 328 if w >= -7445 +fkh inc 27 if si >= 4126 +o dec -358 if f >= 267 +xf inc -895 if ubi < 3913 +fkh dec 829 if ke < -2315 +qin dec 41 if uz == 2490 +sy inc 649 if f != 259 +wg inc 807 if t < -2224 +ubi inc 580 if w == -7446 +jke dec -195 if zwx == 1860 +f inc -722 if si < 4131 +xp inc -694 if xp > -1097 +yu inc 810 if h == -2261 +f inc -521 if uz == 2499 +sy inc -534 if xp >= -1107 +zwq dec 330 if nfi <= -1582 +ke dec -846 if xp == -1098 +h inc -585 if o != 3639 +nfi inc 135 if yu <= 137 +jke inc -779 if u != 138 +a inc 509 if f > 265 +uz inc -421 if h != -2848 +he inc -36 if h != -2840 +o inc 458 if wg == 1988 +h dec -88 if wg > 1987 +yf dec 98 if a == 131 +h inc 729 if si != 4134 +xp inc -973 if xf == 3345 +zwx dec -483 if z < -1089 +hx inc -171 if o > 4089 +fkh dec -256 if nfi > -1462 +xp inc 578 if h >= -2028 +xp dec -194 if uz < 2062 +ubi inc -933 if xf == 3347 +h dec 944 if zwq == -3182 +u dec -139 if ubi >= 4481 +qin dec 581 if jke != 1998 +ke dec 532 if yf >= 1805 +sy inc -101 if fkh > -574 +w dec -934 if ubi < 4491 +t dec 799 if sy <= 4638 +he inc -446 if xp > -2075 diff --git a/csharp/BScottDay9.cs b/csharp/BScottDay9.cs new file mode 100644 index 0000000..71b67cb --- /dev/null +++ b/csharp/BScottDay9.cs @@ -0,0 +1,65 @@ +using System; +using System.IO; +using System.Text; + +namespace AOC2017 +{ + class BScottDay9 : BScottSolution + { + public override string Name => "Day 9: Stream Processing"; + + public override void Run() + { + string input = File.ReadAllText("BScottDay9.txt"); + + Tuple processStreamResult = ProcessStream(input); + Console.WriteLine($"Part 1 Answer: {processStreamResult.Item1}"); + Console.WriteLine($"Part 2 Answer: {processStreamResult.Item2}"); + } + + static Tuple ProcessStream(string input) + { + int total = 0, nestingLevel = 0; + Tuple filterGarbageResult = FilterGarbage(input); + int filteredCount = filterGarbageResult.Item1; + string filteredInput = filterGarbageResult.Item2; + + for (int i = 0; i < filteredInput.Length; i++) + { + if (filteredInput[i] == '{') + nestingLevel++; + else if (filteredInput[i] == '}') + total += nestingLevel--; + } + + return Tuple.Create(total, filteredCount); + } + + static Tuple FilterGarbage(string input) + { + bool inGarbage = false; + StringBuilder filteredInput = new StringBuilder(input.Length); + int filteredCount = 0; + + // filter out garbage + for (int i = 0; i < input.Length; i++) + { + if (!inGarbage && input[i] == '<') + inGarbage = true; + else if (input[i] == '>') + inGarbage = false; + else if (input[i] == '!') + i++; + else + { + if (!inGarbage) + filteredInput.Append(input[i]); + else + filteredCount++; + } + } + + return Tuple.Create(filteredCount, filteredInput.ToString()); + } + } +} diff --git a/csharp/BScottDay9.txt b/csharp/BScottDay9.txt new file mode 100644 index 0000000..41b628b --- /dev/null +++ b/csharp/BScottDay9.txt @@ -0,0 +1 @@ +{{{{{{<{""!!!>{>},{u!>!!"{!!o}!>,,}},{<{!!!>},<,'}!!!ou!>!>,},}},{{<,!>},<,<,},{{{"!!!!i!>!>},<<">,{<}o",<"!>,!!!>,!>,,}{>}},{u>,{}}},{<,"!>!>oe!,!>,<"u}u>},{{<,a!u{{uo{!}!!!>,!>!>,}}}},{{{},<}!!u!}!!!!u!!!>},<,!>},},<',}!>!!!>!!},{<'a!u"!!!>!>o"!u!>},<"aao>},{<,{"!!!>e">,{,o!>,<,o!>,!!!u!>},},<>}}}},{{{{{<,!"u!>},<,a!!>}},{!!!!}e',!!!>"!!u>},{{},a!!!!e!>},},<>}},{{{u!>!>!>,>,{{,<{e!>,o!!!>>}}},{{{{<<,!>,<}'!!!!!o}!!o>},{{},{,,<>}}}},{},{{},{{"!e!>},<,}!>,i!>>},!!o>}}},{{},<{}!>,>},{<'<}}}},{{{},<'!>,"!e'!!i}u{>,{},}!>},}},{{},},,<{!!!>i!>},"!!!!ao>,<>}}},{{{{}},{!!<"ou!!!!!>!!!>,!!i!>},<<>,}},{},{{}}},{{{,},{{,<{!!>,{<{!!!>o,{!!"!!!>,!!!>>}},{{},{<"'!>!!<"i!!!!!>{>}}},{<{!>,>,{}}},{{},{{{{},{"<"!>},}},{>},{>,{}}},{{{{,<}!!'!!!>'!!e!!a!>">}}},{<!>,},<"'i>},{{{}}}}}},{{{{}},<{!}!!o!>,},<}'!!!>},<>},{},{,}io!!!>"!>},!!i',>}}}},{{{{{{},{<"au}{a!!}!!ou!!i>,}}}}},{{{}},{{{,<},{,<}!>},},,},,<>}},{}}},{{{<},<>,},},<'!!!>"!>!!e''!>,},{<'{!!!!}"i},>,{}}},{<{{!>i!!>,!!!>},<>,{<}!!"!>}>}},{{{{<>},!>},,<>},<>},{},},<"!>},,{,}}!!!>a!>},<{e>}},{}}}}},{},{{{{{},,<''!>,},,>}},{},{{!<"i!>,<>},},},<{'!>},<{a!!!>,<>}},{{!!ui}!!!>!>},a!<{{>},{},{},<}e'ea!>!!uo>,{<"{}}}},{{{{{},{<}e"!>,},<>}}},{{ae!>,},{io!!!>{!!!>e>}},{{>}}},{{<'!!ie>,{<{!>},}}},{{{!!!><,}>,{'}{!!"!>,},,"!!!>},},},<>}},{{},{a!!!<>}},{{{{{{<>}},{,<"ue>}},<!>o!>!!!!>},{{",!!!!!>},,"!!!!ao!!'>}},{{{{{,!"ae!!!!!!!e,>},{}},aoai!!'!"uo"!!!>},!!,<>},{{{{{e'e<>,{i"ieu!!!>},!!{>}},{},{{},{,},},<''!>,}}},{{}},{}},{{,<,!>},},<}>},{{}}}},{{{<"i{>},<>},,<,"!>!>}!>,},{{!>,<{e!>,},<},>},},}},{{{!!!>o}e!>},}}},{<,,<'!!'ae!>},{!!,>}}}},{{{},},<"!>,<>},{{}},{},!>},>}}}},{{{{<"!!}}},{},{{{}},{{{{}},!!!>!!!!!>!i!>,<{!!!!!>,},<'u",>},{}}},{{<e!>},}}!>,,},<'">},{{<{!!!>!!!!!>!!{i"!!!!!!!>!!!>!>},},,>},{}}}},{{{{{<{!>,<,>},},<'a,!>!e'u!!o!><}ii>}},{},>}},{},{{!>},},<>,{<>}},{}}},{{{{{{,<}!!!>>,<"!>},<{!!}!!}',!!!>},<'!!>},{{},u!>},,}},{{,,'!!{ei'>},{{}}}},{{,},!!!>!>},<}'""{i!!!>!>,<>,},<>},{{},{<{{!>!>!!}i!>a!!!>>}}},{{{},{{<>},,!{au!>},}},{{},<"!>ui>,{<!>,<>}},{<"{!>!!!oi!>'>}}}},{{{<","!>u>}},{},<{>}},{{<{!'},{{{<,'a!>},<>,<,ei"!!<!!!!>}},{{{",!!!>}!!a{>},{{{{u,ue!!a,<}},{}},{{>}},{{},{{,,e!!>,ii!'>}}}},{{{{!!oe!>},<}}!a!!}{!!{>}}},}},{{{}},{,!>e!>},!!!>>}}},{{{{!!!>>}},{,o!>,!'{ie!!!>u>,{{{{,<{,<''>}}},{{},<{!>},},{<}!>!!!ea}!!a,!>,!}!>,}}}},{{{>}}}},{{<},,,''i!!!>>},{<"!!!>,}},{{<<'au!!!!i!>},<,!!!!!!e>},{{,},}}!!,!!!!!!"!!!>!!e!!!!!!!>o!!!!!>!!>}}}},{<,!>,"""u'!!">,{!>},,!!>}}},{{},{{<'!>},},{{{{!o!>,},}},{{{{!!!>!>},<{{,}i>},},<{u!>},<{!,aeu>},!!!>!}!>o,!!!!!>!!>}}}},{{}}}}},{{},{!!!!!>!>!>i{<'i!'iei!<}!'>,,},{,,!,<}!>},<'i'!>,,{ai"!!o},<{a!!<{,<'o!>},<>}}},{{{<}!!!>,<>},},{{<}!>,'!!!>ia!}{>},{{},!!a!!!>>}}},{{{},{},{}}}}}},{},{{{{{<>,{<{!>,<,}ea>}},{<{'!>"i!>},<{!>,,,<>,},!i,!!!!}{'}!!!!u>},{<}{!>},<,i!!o}!!{!!!!u'oo!!e!>,},<"!ai>,{},!!!>},}}},{{{<'ue>},{{,,<}"ia!!u{!!!!'>},{{<>},<,}!!,u!!!>>}}},{{{i!>,!!!>,>},!!{!!!>,<'!a!"uo!>},'<'!!,>},{{{{}},{}},{{},{{},,}!>},>}}},{}},{o>}},{{},!!>,{}!>!"!!e!!{!>},}},{,,<}!>,!!!>,<>}}},{{{>},{uauiu!>,!,i!>,<}>}},{!ou!!,!!!!!>,o!>},<>}},{{{{<'!>,>,,<'e!u!>,">}},{{{{{,},<,e!>},<>}},{<,>},{{}}}},{{{,<>},{},<>,uo!>,}},{<{!>,i"!,e!>},<}>,{},<}u!>},}}},{{{!!!!,a>,{{'e>}}}},{{{{,},!!ie>}},<',",>},<{"!}{!!!!!o>}},{{{{!}!>,,}}},{{{{{{<'!!!!'!i!}"!!!!!!!>!>},<,<>},!!"!>},<>},<'!>{o,!>,<>},{e"!>,<"}'!!!>!>',>,{}},{}},{{},{{},<},,!!!!uo'},},<>},{{{},{{}}},{{!!!>e!!,!e'>},{},!!a{a!>},},},<{u>}},{}}},{{<>,<'i!!i,!!e!!!!!>},<<}u>},{<,},<>},{!!!>u!>,,!!!!!}>}},{{{<>}}}},{{{{<'!>,<"a!>e!!!>,o!>},<,a>},,,i{e!>,,},},{<,!"e>}},{<}{>,{{ao"!>},<,>,{}},{}}},{}}},{{<'!!i!>!!i!>},},},!>,!io!!!>>,{!!!>!>!e!'""!>!>,<}eu!!,<'!>},<,>}},{!>}>,{}},{{<,"!>!>},},<{uo>},},},}}}},{{{{{<{!!!>ia>}},{{{<,"!!!!"!>o>}}},{{}}}},{{<{eee}o>},{},},<'!!u,!!!!'o!!!>,<>}},{{{!>e!>},<'}i{'u>},},{{{,<}{!>"!>,!!"!>!>},<>},{{,{}},{!!,<,},,!!!!!>!!!,"!!!!"!!,!!{!>>}},{{{},{}}}},{{{}},,!>,}},{{}}}},{{},{<>}}},{{{<ae!!iia>},{",!>!!!>!>,<{e{!>!oa!!o!>},<<,!!!>,<>,{}}},{}},{{{},{{eu'!>},,<"eo>},{{{,}},{}}},{{},{,},}!{!>,'>,'}a!!!!,e,{,e>}}}}},{{{{<'u!!!a!!}!>a!>},!>},,},<>}},{i"'{!!!>!!!"u>},{{},{,<"}!!e"!{oo!>},<}!">}}},{{},<}!!i!!'<>,{{<{!!"}{},{,>}}}}},{{{{{{},,u!!<'!!!!>},{{{}},{{!o!!!>!>},}}},{{"!>e{i>,<'}!!!>'ao{}!!!!!>>},{!!!>,}}},{{,!>},},i!!!>"<>,{}}},{{!!!>}!>},{!!!>>,},,<}!!!>,},{!>!!!>,!!},<>}}},{{},!>},},<,,},<>},{{}}},{},{{}},{}}}},{{{{{!>,},{{,},},<{>,,<'!!'oo"!>,},{{<'u,},ee>},{}}},{{{!!!!!>,,!}{!>},>}},{}}},{{{,<'e"!>},<>},{{<,,{<">}},{{o,'!>,<'!>},}}}}},{{<,!!!aio!>,,},{{{<,,<"!>},!!i<>},{{{,!!}!>},},<>},!!!>!!!>,<<,}>},!!!>ia!>},<,!!'"!!!>!'o}u"!>>}}},{{<>},{{<}!!!>>}},{{},{}}}},{{{},{{}}}}},{{<,{}},{{}},{}},{{{{}},{},{{{{{<,>},},<{!!ii!!!{!!e!>!!!>i!!!!!>>}}},{!!!>!!e!>u!>},'}!>,{},o!>},<'<,!>!!<{e'"!!o!!<>}}}},{""e!{u{,,!!>},{,{,,<{!!!>"!!!>ui!>}!!!!i,a!>,,}}}},{{{{<}>},,ue!}<{>},{{{{}}},{,!>},,,<>}},{},<,{!!!!!>o<'"u!!!>,<,!!!>!!'>,{!!{"{!!oa!!i{!>},<,>}}},{{{},{},<>}}},{{{},{}},{{},{{}}}},{{{<,e{!!!>o}}i!u!>},}ue{u!,}>}},{!>e,!!o!!!!a'{u>},{{}}}},{{{{<"!!!!!!uo{a!!'},<{"!!'!>,,<<>},,<{"e",!!u{o!>},<'!>,},{{{},a!!!>,oa'!'!!e!>,<,!>},<"e>},{{!>i,>},{},{{},e!u'ui{!>},u<>}}}},{{{}}}},{{{},{}},{}}}},{{{{{{{{}},{{{<{<}>}},{{}},{{!!o>},{},!>,,<"!!!!a!>,<>}}}},{{,,<">},{{,},{{!>,<,>},},{>}}},{{{},ae!>,'u!>},<}!!'u,!}!>,},{{{{},{{{},!"}!>,},{}}},{<'u!}!a!>,,<{{!!!>{>}},{}}}},{{<"a!!!!!>,{!>},>},{},},!!>},{{{{,!!!>'"!>,!>o!!!!!>>},{{}}},{}},{{<,!!!>i!!{e{>,{{,u!!!!'!!ueua}!>,e{"i!!>}}},},,<'>},{}}},{{},{'u!>,<{o!!a!,e}'!>},!>},<{>},{{!>!iou{i!!,{<,{!!!>,<{!>},!>"{!u>}}}},{{{{,<{eo!u}ii{!ae'!!!>>,{}},{{},u!>,!!!>},<>}},{u!>},,{,},<>}}}}}},{{{<>,!>},,},i},{{,'',o",>}}}},{{{<,!!'eo!>},u{i>,{,<{<!>!!>}},{},{{{{{{},},,<>},{},}},{<{u>}}},{<{"!>,<<>}},{{<'a}>}},{!>!!e!u!!!>!>,a"}!>e!>'{>}}},{{{,<e!!!!!>,},<>},<'!!!!e''!>{o!"!>,u}>},{{<"!>!!!>!!o!>e!>!{!!ia!>,,<'!!!>!!!>"}u!!!!u>},{>},{,!{!{,o!!!>},,!>},<}au,!!>}},{{{},{{<}!>,!!o!!,>},{,<,}}},{}}},{{{{{{<'!!!>}},{{{{}},u!!!!!!!!!>!!a!>},<>},{{<,}},{{!>},!o!i""}!!!>{>}}},{,},!>!>},}}},{{{{,},oa!!!u"!{>},<"<}<}a!!,>},{{{},{{>,{}},,}},{{{}}},{{{},a!>,<'!ou'!!!>i!!!>ai>},{{<!!!>!!!>'{a!!u}!>,''!!!!>,<,"'!!o"}!!!><<>},},{!>,>},{,,<<{u},<"<,}!!!>!,!">}}}}},{{{{},{}},{{{{}}}}},{},{{{{e!!!>!!!!'!!!>e<>,{,<}!!uuu!>e{,{ee{!!!>>,,!>}}}},{{{{<'!>ui}"!!!>!>,<"},>},{}}}},{{{{<,{!>,<{!>u!!!>}aueu!>},},<'{i>},{,,a!!!>>}},{,,<}!!!>{{!>,<>}},{{{{">,{{},"!!<!>u>}}},{{},},,{!"<'{!!!>',>,{{{{!>},,},<>}},,<{!>,,>},{!>},u!>!,"<{!!{{i!!!>,>}}},{{{}}},{{},{!>!>},,{<}}o!!!!}!>},},<}>}},{{},<"!}!>,<{,u},!>,!>>},{}}}},{{,u}!!!>,<}a!},{i!>},<>}}},{{"o!!'!{!!e!>},!!!<},{}},{},>}},{{{!!ai"u!>!!!>i{i>,,<{i'!!aou,!}},{{,},}!>'a!>,!>,<>},{,<},<'!!a>}}},{{},{}}},{!!!!!"!!!>!>},}a}<{o>,},}}},{{{}},{{eu}"!>},<}i}iea!ei!!!>,<>}},{,},<'!!!o!!{}!e"!!''!!!'!!!>a>}}},{{{},e{oo!!!>ii!!!>},!!!!!!ao{e'!>i>},{,<''!>!>o!>,}},{<<},!>,}>,,!>},,,>},{{{}},{<}!!"a,!!!!!ea!!}iu'}>,"a!>},<>}}}},{{,!!!>oa''>},{}}},{{},{{<}"<,}},{>}},{{{}}}}},{{{{}},{<,uaaou!!!>>}},{{}},{}},{{{{<{'uau!>,!'{!!'!>},,,}},<,}u!>,},oe<<<<>}},{{{<}!!!!!>o!!!>},},,<,!!!!!>"o>}},{{<"!!!>!!>},{<,!!!>o>}},{{{!>!>,!>},!>!!!>},},{{u!!},i>},!>'!>},,<"oe'>}},{{},}}}}},{{{{{{},{}},{{<{!>e!>},<{!ua!>ea,a>},{{{<<{oa,},<>},{!oeo!e{!!a"!>!>},<}!><,}},{{{}},{!>,!>},<">},{{}}}},{{{}},{{{e!!!>!!!>{!!>},{},{{},{{!!!>!>!!!>},}}}},{{},<'i'{ue}}>}}}},{{{{}},{<>,},<}ii!>,!!!>o!>},<<{!<>}}}}},{}},{{{<!!!>!,>,<}!i>}},{{<,!>},!!!!!>,,<>},{{{{,<"!!i>}}},{{{{<}!!!!!>'!!!>ia}!!!>!e!>,,<}},{{,,<"!!!>{e!!>},{!>},<>,{<<,!!o!>},!>,}}},{{!!!>,<>},e"oau!}o!o!!ii}",}}!>,<}>}},{{{,!!}!>,<>}}},{{<'i'}!!!!"!!i!,!!{a!}!!!>!o>,{},!!!>i,a!!!!!>i!!u!!,>}},<"{>}},{,,<}>}},{<{}!>},e>}},{{<!>},<>,{,!>'}ia>}},{{{},}},{,!>,},{}!!!i!!!>}!!!!<{!>,<',!>,},,{}}},{,{}}},{{{{<{!},!>},!!!>"i"'e!>,<',{"o>},{}},{{<}!!!>,,ia!!uo>}}},{{{{{!!,,!!'u{e>,,<>},{{<>}}},{{!>,<!>{!i,!!!!!!"ai!}{!>,<}ia>},},<>}}},{,,,<}},!!!>>},{<}'!>"!!!>>}},{{{{<>,{}},{},{,e"eii!,e{,<,>,{{}}}},{{}},{}},{{{}},{}!>,,<{{>,{<>}},{}},{{{},},{>}},{<'e!>},i'u{!>,<}>}}},{{{!!}!!!>i!!!!i,!>!>,,},<>},{}},{{i"!{u!>!!!>,<>},,a,o}"o!>,}}}},{{{{,,!>,!!!>!>e!!au>},{<"!!!>!!{eeiao'!!!>ae!!!>{!>,a>}},{},{<{",<,!!!>"!>,<>,{"e'!>},<{!>,<"!!!>o!!!">}}},{{{{<,i!!!oae!!!>,<,!>!!o>,!>!!a!>},},{oa!!i!>,<>,{}},{{<'a}e'e>,!!i!a,!a!a<>},{},{{{!!!>u!!!>,<},!!u!>,},{!!e!>}},{!>},!>},<,!!!!'!}}o!>a!!!>">,a>},{}}}},{{}},{{<}!!a,"!!oi!!!>!>,<"!!!>,,o!!!e'o!!!>!u>},{,,}}},{{,,!>,,<>}},{{{{{,!>},!!!>},},<>},{}},{}},{{},{aa',!o'!>},<}"!!!!'!!!>>}}},{<>,{}},{{},{{,,'!>{e!!!>e}!>,<"a>,},{,!{{!!!!u!!ea<,{,{>,i"i!!!>!>},,},"!!!>"u!!"">},{{<e!>},,<">},{{{},<<o!!!>,<}!>,<>},},},<,!!"e!!!>!>},>},{},,!!o!{>},{!!!>{!i!!!>},<<>,{!!!>,,>}}},{{<}!>,<>,{}},{}}}}}}},{{{{{,}}},{!!!>},},<{>,{{!>,<<,},},<,'!>,<{a"e'<}!>o!>},<<""!>,<>}}},{{,,!>,},{},{{,{!>,,},{<>}}},{},{{},>,{},}},{{<"!>}!>},},,>},{}}}}},{{{{},{},{{<,{!>{!!aii!>!>e,>,{}},<}!>},<{>}},{{{{},<>}},{{}},{{{{<"!!!>!!!>o!<'ea'!!!>!>!>},<'>,{"!{}}!>},<>}},<},},{}},{},<}}},{{{},u!!!i!!!>!!<>},{}},{{!>},<'!u,"!>},<>}}},{{{<}ae!>,o!!!>'u!!u!!!>!!e>}},{{,o'{"!ii'"e}!>},<}>},!>},!>,<<{a>},{{,},<>}}}},{{},{{,},<,!},{{},{<}!>},<,{>}}},{{{!>},,<{iuu"!!'}a,,>}},{<>,,<}{!>!!!>!!}!!}!>,,>},{{<,!!!!!!!>},<{,{!>}!>,!i>,{}},{{{{},},{{},{<"a!>,'},},<>}}}},{{{},{<,!!!>'!>},<},"!!!>,!>,}},<!>},}},{,}}}},{{{!!!>!>,},},ou>},{{!>,<<'>},{a!>},},>}}},{{}}},{{{<>}},{{}},{},},,<"e!!!>}!>},<,,!!!>}!!!!"!>},<>,},},<"!!e"oa!!!>>}},{}}},{{{{{{{},,}},},<"u!!!>},<'!!aea>},{,,!>,<!>,<>}},{{!!e!>},<"{!>o!{uaa},{}},{<"}"!!!>'!!!!"'o}!!!>!>">}},{{{oe>},,i{a{!!!!>},{{},<}i!>},<,o"!!a!>>}},{{{},{{{{}},{}},},'o!!u!'>}},{<>,{<"i!i!>ao!!!>!!!>">}}},{{{{{,},,!u<>},{{{{!>,,<'!a,e"ee!>,<<>}},{}},{!!!!o''}i,!!!>!!a>,{},<<"!!!},!}!!<}o"!u!}'!!'>}},{}},{{},{},{{<{!>,!>>}}}},{<"{!!!!e!euui''o!!u}!!!!u">,{{{}}}},{{{{{}},uau'e!!!>!>},<,u!!>},<}!!a!!!>u!!>},}},{},{{{{{},{{}}}}},{{!!!>},!!!>ie!!a>},{<,{},},,<}"!!{!>,!!!>!}>}}},{,{}}}},{{{{{{>}},{{{}},{'{u'i,ie"o!!u!!,o>}}}},{{{!!<>,<'>},<<{ua!>,<<<>},{{{<>}},{}},{{<'!>},,!!!!!><>,{,<,a!!,,<,!>,}},!>},<,!}<"{i!>!!!>,>}},{{u',}!>},,<"!oe,{}}},{{!>>,},<{,{{io>},{{<>},{}}}},{{{{,},},,},{}},{<'>,{}<<}i!!o}!>,,}}},{{}},{{{{{},<>},{{}}}},,!>},<}>},{<}{"a>}}},{{{{{}}},{<<'!>!!!,{}!!!>!!!}>,{<,{!!{u,!!!>,!!!>!>!!!!i!>,!>!>,<''>,},<"!!,}},{}},{{{},,a'!!!>,,<>},{},!u,{{!>,<">}},{{<>},}!!!>!o},u>}}},{{},{},!>!!!>!!!>!!{e!!!i>,<}i!!!>"!!,o"!!"">},{<}'u!>},>,{<>}}}}},{{{{{<{!!!>!>e{{>,{{<'i,i,,!!!>>},,!!u}!!o!>},<{u{!!!>{>}},{},{{},!},{}}}}}}},{{{{{{},{{{,u>,{{{{}}}}},{}},{{},<,!!o!!!>!>>},},>}},{{}}},{{{{<<{}}}},!>,<,!!}u{>},{}}},{{},<,i">},{{{{<""iaia!!!>'!!"e}},{{{!>!!!!'!>!!!o!>!>!u'!>,}},<}">}},{{<'u{!>a},o>}},{{{{{{i,!>!o'<}'!>,,<>}},!>},,!!!>!>},<'!!<}>},{},<{i,!!!>},<,}!>u{}!!!>!!>}},{<{!!!!,>,{!>},,},!>},}}}}},{{{},,>},{,<'!>o'i{>,}}}},{{{},<,"!>},,<{!!!!!>{!,,!>!!!>},<,}>},{{},o>},{{{},<}!>,oua!!aea!e!>ai>}}}}}},{{{{{{,}},{{{}}}},{},{{{},,},!!!>io!!<>},{{{},},,!!!!ooaa>},<'!>!!!>!>!!!>u},{>,{a'{!!!{!>},>}}}},{{{{<}u,{!{!!!>,i!>,,<},}{>},<,>},{{<}>}},{'!>,<"o>}},{<}"ia{!","!>},o!>,}!u!!!>>,{<{!!u>,{{}}}}}},{{},{<,i>,,<"!>},},{{,},{}}},{{{!>,!!{!>,<{}>,},},'{!>,<>}},{{<,,e"e!,!!ea">}},{"!!oi!>,},<{a}o!>,<"<,'>}}},{{{{{{}}},{<}"!!u}!!!><{{i!>},,,{a!>},<{}}},{{{},{{},,<,!>},{}}},{{!>},<{!>{!!>},{{,>}}},{{},{{,},},{i!!!,!!!>'{!!{!!!!{!!>}}},{{!>},},<}!!{,e!!!>!!!!oe!>},<>,{>}},{{},!>!>,}},{,,},<>}}},{{{<,!!!!o!>},<>},{{,<}!!>}},{{{{<,!!,e,,!}'>}},iu!>oa,},!>,<!!!>!!>}}},{},{{{<}!!!!!>},,>,<,},{}!!i'>},,<}o{!!i}!!!!!>>},,<<>}}},{{{{{{,<}ai!!!>'>}},{>}},{{!>},},!a">}},{i!>"u}!!!!!>>,<<{!>,},<<'"!!!u!!,!!!ae!>,{'>}},{{{}!!!>!,"}>}},{{},{<''{>}},{{o!!{!>,,<{'!!"!>!!!>>},<,e"u!!!>ao!!''>}},{{{{},{}},{{},{}}},{!!ou!!!!'>,{!!"!>i!!,!>,}}},{{},o!><>,{{>}}},{<'o'!!au!>,,!!{i<{!!!u!!!>{e>,{}}}},{{{{{},{}},{i!>,,,!>!!!'!!u!!>,{}},{{{},{<{!!}}!>,}}}},{{{},!!!><{!!!!!!!>u>},{{<'}!>,},,<},{}}},{{{,{<>}},{{{,au"e"ee">}}}},{{!''>},{!>u>}}},{{{{!>},!>!>!>},},<>}},{},,!>},},>,a>},{{<,}u!!!>!!<>,{},},<>}}}}}},{{{{{<"!a!>},!>e!>,a'!>},!!!>!>"{>,,u!!a!!!!"}!!!>>},{{}},{{{}},!!!!!!'u!>,>}},{{{{,<{e!!!>,},{!!a!>,<}e!>},},<,!>!!>},{"!>,<"!a>}},{{},,<},"!!!!!{>}},{,{<"uo!>!o"{{!!!>>,{}}},{{},}"<{i!>,<,u>}}}},{{{},{}},{<',{<,}!!!>}!>,"oa!>,<}!>,<>}}},{{<,!!!,<'{{!>,<,,}}},{{{{{{{,,!!!}!>}},!>,!!'u<,!!!>>},,!iae!!!!!>,!!!>,,<>},<"">},{},,{<{o!>,<,{,!!!>!>,}>}}},{{{{{},},{{},<!>'"!!iu!>,},<{!!!>!!a>}},{},o!>},,,{<,{<'ei!!!!!>aii!>}!!!a!>},!!!>>,{}}}}}},{{{},{{}}>},,!!ue!!!>},},{{{}},{}}},{u!!!!,},<>,,,a!>},},{}},{{{{},{{}}}},{{!>,<">}}}},{{{{{}},{<"'{!>,<>,{}},{{,!!{>,{}}}},{{<"!!o!!!>,!>},!!!!!>!!!>!!{o!!"!!a!!!>>},{aa!>,!"!>,<>}}},{{},>},{{<,<<,,u{a!>!>,{!!!!!>>}}},{{{,<<>,a>},{},!!!>a!>},}},{}}}},{{{{{},{}},{{},{{},'e},{},<>,{!!}>}}}}},{{{{u{}ao"'u!!!>,}}},{}},{{},{},<>,{!!!i<'oe"!!!>!!!>},,,<{>}}},{{{,<,ai""a!!!!"<"a!>,<>},{{{}}}},{{{{{,},{{,i>}}}},{}},{io!!!>,}!>},<{u!!!>!!uu!!o>,{!>,<,{}>}},{!>,,},},<>,{{<'}!>,!!!>e'e!!a}",!!!>!!!>!>">},{{{{}}},{}}}}},{{,<}oa!>>},{{{}}},{<}!!!>u<{!>},a!"'"{!!e,}!!!!ie>,{{{}},{{<}!!,{ae!!uo{u!''!!"!>,},},<,!!!>}!""!!!>!e{!!e!>,}u>}}}},{}}},{{{'">}},{{},{!>,u!!!>!>,!>},<,'>}},{{},,!>}!!oo!!e>},<"u>}},{{<{!'",i{u!!"!>,<,'i!!!!!>'!>,<>,<>},{{<i!,>},{}}},{{{,{{<<{!>},<"!!!>,!>,}}}},{{{{,,}},{<>,!>},!>,<}!!!>!!,!"""!"!>,}}},{{{},{!>},<>}},{{},{},},}}},{{,<}!!!>a"a}!>!!!>!!!!!>,{!>,<,,,,},{},!!'!!u,>,{<'ooooouue!!!!},>}},{{,<,,<{,'a!!'!>!!!!"},<<}}}},{{{{},{}},{{},<""{u{!!!!}!!!>au!!,!>},},{{},<'!>,!!!!u!>},<>}}},{{{},{<,{u!!}a!>i!>,<,!!i!>},,<>,{<,!!aau}}},{{{!!!>!'!!eeo}iu>},{{},{<'!""a"!!{!!!>!a>}}},{,,!>},},{,!>},},<<>}}}}},{{{},{{},<}e'u,">},{}},{!e!!u!!{!>!!!>!!},,{!<,<}'>}},{{{{{!!!>">},<"!>},<'!>!>},<'{!u'u>},{}},{{}}},{{{},{{<,!!!>!>,"!>,<{'!>,},{<}e},<'u,}!}!!>}}},{{<{!!',o},o!!!>u!>},<>},{<{>}},{{{>}},{}}},{{{},<},!>'!>,<>},{{{<'!!!>!>},<,!i!>},,},{!!<",<,i<"!!!>i'!>},<}i'}!>},<>}},{{<,!!!>>},{{}}},{{},{{{<>,},{'eeoau!!!>},}}}}},{}},{{{{{{},{{<{!!!>'!>!!a>}}},<>},{{<'!>!,"!>},},<<>},{}},{!>,<,"!!'<}!!,!>},<'!}!!!!!!!!{<}>,{<"o',,}}}},{{{},{<{e,!'oi!>},},<,a"!!!!'}>}},{{<'u>},{{{!>,}}},{{{},{{{}},},<"o!!!!!>{o!!!!oe!!{ua'!!!oe,o>}},{{},<"'i<},<}!!!!e>},{{}}},{{},<>},}}}},{{{}},{<<>},{<}},e{'u>,<{{i}},{{<}!>},<>},{{,<{i>}},{{}}}}},{{{{<{>},{<'!>},<}!>>}},{,{{<>}}}},{},{{{<}!!,i!!!>a!>,,<>,>},{{{{}},{}},{}},{<{"!"!>}u{!!,,,},<,!>},>}},{{{},o!>},}},{{{},{}},{{}}}}}},{{{{{,<,,",",>},{<,ieo>,{{},<,'>}}}}},{{},{{!>e{,}!!ie>},{{{{!>,ai>},,},<>}}}},{{,!!!>!>!}>}}},{{{>},{<"e<{!!<,','!a!!}!!}!>,}},{{{,u!>},,},,<<{!>},,<>},{<<'!>},}},{{a!>,,}}},{{{,},{{<'!>,,,!>!>>}}},{{{},!>!>i!o!"!>},}},o!>,},{{},},<{e!!}}},{{{{{{{{{},}o'!!'!!a!!!>,<>},{}}},{eu>}},{}},{}}},{>,<"!!!>,<'!!eae!{!!{o!!,"a{>},{}},{},{}}}}} \ No newline at end of file diff --git a/csharp/BScottProgram.cs b/csharp/BScottProgram.cs new file mode 100644 index 0000000..d288b96 --- /dev/null +++ b/csharp/BScottProgram.cs @@ -0,0 +1,29 @@ +using System; +using System.Reflection; + +namespace AOC2017 +{ + class BScottProgram + { + static void Main(string[] args) + { + // Find all classes inheriting from BScottSolution, create an instance, and execute Run method. + foreach (Type t in Assembly.GetAssembly(typeof(BScottSolution)).GetTypes()) + { + if (t.IsSubclassOf(typeof(BScottSolution))) + { + BScottSolution solution = Activator.CreateInstance(t) as BScottSolution; + + Console.WriteLine("-----------------------------------------------------------"); + Console.WriteLine(solution.Name); + Console.WriteLine("-----------------------------------------------------------"); + + solution.Run(); + + Console.WriteLine(); + } + } + Console.ReadLine(); + } + } +} diff --git a/csharp/BScottSolution.cs b/csharp/BScottSolution.cs new file mode 100644 index 0000000..826d293 --- /dev/null +++ b/csharp/BScottSolution.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AOC2017 +{ + abstract class BScottSolution + { + public abstract string Name { get; } + + public abstract void Run(); + } +} diff --git a/python/BScottDay23.py b/python/BScottDay23.py new file mode 100644 index 0000000..25dcda1 --- /dev/null +++ b/python/BScottDay23.py @@ -0,0 +1,65 @@ +import math + + +class Coprocessor: + def __init__(self, instructions): + self.instructions = instructions + self.pc = 0 + self.finished = False + self.registers = dict.fromkeys(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], 0) + + def value(self, input_reg): + if input_reg.isalpha(): + return self.registers[input_reg] + else: + return int(input_reg) + + def is_prime(self, x): + prime = False + if x > 1: + prime = True + k = 2 + n = math.sqrt(x) + while k <= n and prime == True: + if x % k == 0: + prime = False + k += 1 + return prime + + def part1(self): + mul_count = 0 + while not self.finished: + args = self.instructions[self.pc].split(' ') + if args[0] == 'set': + self.registers[args[1]] = self.value(args[2]) + elif args[0] == 'sub': + self.registers[args[1]] -= self.value(args[2]) + elif args[0] == 'mul': + self.registers[args[1]] *= self.value(args[2]) + mul_count += 1 + elif args[0] == 'jnz': + if self.value(args[1]) != 0: + self.pc += self.value(args[2]) - 1 + + self.pc += 1 + if self.pc >= len(self.instructions) or self.pc < 0: + self.finished = True + + return mul_count + + def part2(self): + primecount = 0 + start = int(self.instructions[0].split(' ')[2]) * 100 + 100000 + for i in range(start, start + 17000 + 1, 17): + if not self.is_prime(i): + primecount += 1 + + return primecount + + +with open("BScottDay23.txt") as f: + instructions = f.read().splitlines() + +solution = Coprocessor(instructions) +print('Part 1 Answer: ' + str(solution.part1())) +print('Part 2 Answer: ' + str(solution.part2())) \ No newline at end of file diff --git a/python/BScottDay23.txt b/python/BScottDay23.txt new file mode 100644 index 0000000..9592f87 --- /dev/null +++ b/python/BScottDay23.txt @@ -0,0 +1,32 @@ +set b 67 +set c b +jnz a 2 +jnz 1 5 +mul b 100 +sub b -100000 +set c b +sub c -17000 +set f 1 +set d 2 +set e 2 +set g d +mul g e +sub g b +jnz g 2 +set f 0 +sub e -1 +set g e +sub g b +jnz g -8 +sub d -1 +set g d +sub g b +jnz g -13 +jnz f 2 +sub h -1 +set g b +sub g c +jnz g 2 +jnz 1 3 +sub b -17 +jnz 1 -23