diff --git a/.clang-format b/.clang-format index a777cf1..cf644c2 100644 --- a/.clang-format +++ b/.clang-format @@ -1,3 +1,297 @@ -BasedOnStyle: Google -IndentWidth: 4 -ColumnLimit: 120 +--- +Language: Cpp +AccessModifierOffset: -2 +AlignAfterOpenBracket: Align +AlignArrayOfStructures: None +AlignConsecutiveAssignments: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: true +AlignConsecutiveBitFields: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveDeclarations: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: true + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveMacros: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveShortCaseStatements: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCaseArrows: false + AlignCaseColons: false +AlignConsecutiveTableGenBreakingDAGArgColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenCondOperatorColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenDefinitionColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionDeclarations: false + AlignFunctionPointers: false + PadOperators: false +AlignEscapedNewlines: Right +AlignOperands: Align +AlignTrailingComments: + Kind: Always + OverEmptyLines: 0 +AllowAllArgumentsOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowBreakBeforeNoexceptSpecifier: Never +AllowShortBlocksOnASingleLine: Never +AllowShortCaseExpressionOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: false +AllowShortCompoundRequirementOnASingleLine: true +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: Never +AllowShortLambdasOnASingleLine: All +AllowShortLoopsOnASingleLine: false +AllowShortNamespacesOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AttributeMacros: + - __capability +BinPackArguments: true +BinPackLongBracedList: true +BinPackParameters: BinPack +BitFieldColonSpacing: Both +BracedInitializerIndentWidth: -1 +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterExternBlock: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakAdjacentStringLiterals: true +BreakAfterAttributes: Leave +BreakAfterJavaFieldAnnotations: false +BreakAfterReturnType: None +BreakArrays: true +BreakBeforeBinaryOperators: None +BreakBeforeConceptDeclarations: Always +BreakBeforeBraces: Attach +BreakBeforeInlineASMColon: OnlyMultiline +BreakBeforeTemplateCloser: false +BreakBeforeTernaryOperators: true +BreakBinaryOperations: Never +BreakConstructorInitializers: BeforeColon +BreakFunctionDefinitionParameters: false +BreakInheritanceList: BeforeColon +BreakStringLiterals: true +BreakTemplateDeclarations: MultiLine +ColumnLimit: 120 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: LogicalBlock +EnumTrailingComma: Leave +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IfMacros: + - KJ_IF_MAYBE +IncludeBlocks: Preserve +IncludeCategories: + - Regex: '^"(llvm|llvm-c|clang|clang-c)/' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '^(<|"(gtest|gmock|isl|json)/)' + Priority: 3 + SortPriority: 0 + CaseSensitive: false + - Regex: '.*' + Priority: 1 + SortPriority: 0 + CaseSensitive: false +IncludeIsMainRegex: '(Test)?$' +IncludeIsMainSourceRegex: '' +IndentAccessModifiers: false +IndentCaseBlocks: false +IndentCaseLabels: false +IndentExportBlock: true +IndentExternBlock: AfterExternBlock +IndentGotoLabels: true +IndentPPDirectives: None +IndentRequiresClause: true +IndentWidth: 4 +IndentWrappedFunctionNames: false +InsertBraces: false +InsertNewlineAtEOF: false +InsertTrailingCommas: None +IntegerLiteralSeparator: + Binary: 0 + BinaryMinDigits: 0 + Decimal: 0 + DecimalMinDigits: 0 + Hex: 0 + HexMinDigits: 0 +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLines: + AtEndOfFile: false + AtStartOfBlock: true + AtStartOfFile: true +KeepFormFeed: false +LambdaBodyIndentation: Signature +LineEnding: DeriveLF +MacroBlockBegin: '' +MacroBlockEnd: '' +MainIncludeChar: Quote +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBinPackProtocolList: Auto +ObjCBlockIndentWidth: 2 +ObjCBreakBeforeNestedBlockParam: true +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +OneLineFormatOffRegex: '' +PackConstructorInitializers: BinPack +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakBeforeMemberAccess: 150 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakOpenParenthesis: 0 +PenaltyBreakScopeResolution: 500 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1000000 +PenaltyIndentedWhitespace: 0 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Right +PPIndentWidth: -1 +QualifierAlignment: Leave +ReferenceAlignment: Pointer +ReflowComments: Always +RemoveBracesLLVM: false +RemoveEmptyLinesInUnwrappedLines: false +RemoveParentheses: Leave +RemoveSemicolon: false +RequiresClausePosition: OwnLine +RequiresExpressionIndentation: OuterScope +SeparateDefinitionBlocks: Leave +ShortNamespaceLines: 1 +SkipMacroDefinitionBody: false +SortIncludes: + Enabled: true + IgnoreCase: false +SortJavaStaticImport: Before +SortUsingDeclarations: LexicographicNumeric +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceAfterOperatorKeyword: false +SpaceAfterTemplateKeyword: true +SpaceAroundPointerQualifiers: Default +SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeJsonColon: false +SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDefinitionName: false + AfterFunctionDeclarationName: false + AfterIfMacros: true + AfterNot: false + AfterOverloadedOperator: false + AfterPlacementOperator: true + AfterRequiresInClause: false + AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: Never +SpacesInContainerLiterals: true +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +SpacesInParens: Never +SpacesInParensOptions: + ExceptDoubleParentheses: false + InCStyleCasts: false + InConditionalStatements: false + InEmptyParentheses: false + Other: false +SpacesInSquareBrackets: false +Standard: Latest +StatementAttributeLikeMacros: + - Q_EMIT +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +TableGenBreakInsideDAGArg: DontBreak +TabWidth: 8 +UseTab: Never +VerilogBreakBetweenInstancePorts: true +WhitespaceSensitiveMacros: + - BOOST_PP_STRINGIZE + - CF_SWIFT_NAME + - NS_SWIFT_NAME + - PP_STRINGIZE + - STRINGIZE +WrapNamespaceBodyWithEmptyLines: Leave +... + diff --git a/.clang-tidy b/.clang-tidy index fd3926e..96d691c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,18 @@ -Checks: '-*,modernize-*,readability-*,bugprone-*,performance-*' +# We explicitly enable checks with '*' and disable noisy ones with '-' +Checks: > + -*, + bugprone-*, + modernize-*, + performance-*, + readability-*, + cppcoreguidelines-*, + misc-*, + # Disable these specifically if they are too annoying + -modernize-use-trailing-return-type, + -llvmlibc-* + +# Treat warnings as errors (optional, good for strict discipline) WarningsAsErrors: '' -HeaderFilterRegex: '.*' -FormatStyle: file + +# This ensures clang-tidy sees the same headers as your compiler +# It will read the compile_commands.json automatically \ No newline at end of file diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 2b7f72b..6590d35 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -7,6 +7,8 @@ RUN apt-get update \ cmake \ ninja-build \ build-essential \ + libc++-dev \ + libc++abi-dev \ git \ python3 \ python3-pip \ diff --git a/.vscode/settings.json b/.vscode/settings.json index 5cc3b55..5ff1ece 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,15 @@ { + "C_Cpp.intelliSenseEngine": "disabled", + "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd", "editor.formatOnSave": true, "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", "cmake.configureOnOpen": false, "cmake.generator": "Ninja", "clangd.arguments": [ - "--compile-commands-dir=build" + "--background-index", + "--compile-commands-dir=${workspaceFolder}/build", + "--header-insertion=iwyu", + "--clang-tidy", + "--completion-style=detailed" ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index bc19713..710e937 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -12,22 +12,6 @@ "type": "shell", "command": "cmake --build build -- -j", "problemMatcher": [] - }, - { - "label": "Clang-Format: Format Workspace", - "type": "shell", - "command": "bash -lc \"find . -name \"*.cpp\" -o -name \"*.hpp\" -o -name \"*.h\" | xargs -r clang-format -i\"", - "problemMatcher": [] - }, - { - "label": "Clang-Tidy: Run", - "type": "shell", - "command": "./scripts/run-clang-tidy.sh", - "presentation": { - "reveal": "always", - "panel": "shared" - }, - "problemMatcher": [] } ] } \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index a4953c2..ec35a8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_C_COMPILER /usr/bin/clang-21) set(CMAKE_CXX_COMPILER /usr/bin/clang++-21) project(aoc25 VERSION 0.1.0 LANGUAGES C CXX) - +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Helper to add AoC day targets and auto-copy any input files function(aoc_add_day name src_dir) # remaining args are source files @@ -13,8 +13,9 @@ function(aoc_add_day name src_dir) add_executable(${name} ${sources}) set_target_properties(${name} PROPERTIES CXX_STANDARD 23 CXX_STANDARD_REQUIRED ON) - # Use GCC toolchain compatibility for clang++-21 - target_compile_options(${name} PRIVATE --gcc-toolchain=/usr) + + target_compile_options(${name} PRIVATE -stdlib=libc++) + target_link_options(${name} PRIVATE -stdlib=libc++) # Gather common input files in the source directory file(GLOB INPUT_FILES @@ -36,4 +37,5 @@ endfunction() add_subdirectory(day1) add_subdirectory(day2) add_subdirectory(day3) +add_subdirectory(day4) diff --git a/day4/CMakeLists.txt b/day4/CMakeLists.txt new file mode 100644 index 0000000..bfeffed --- /dev/null +++ b/day4/CMakeLists.txt @@ -0,0 +1,2 @@ + # Use top-level helper to add the target and copy input files + aoc_add_day(day4 "${CMAKE_CURRENT_SOURCE_DIR}" main.cpp) \ No newline at end of file diff --git a/day4/main.cpp b/day4/main.cpp new file mode 100644 index 0000000..cf2b266 --- /dev/null +++ b/day4/main.cpp @@ -0,0 +1,128 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct Diagram { + std::vector data; + size_t width; + size_t height; + + auto mdspan() const { return std::mdspan(data.data(), height, width); } +}; + +auto printMap(const Diagram &diagram) { + auto mdspan = diagram.mdspan(); + for (auto row = 0UZ; row != mdspan.extent(0); row++) { + for (auto col = 0UZ; col != mdspan.extent(1); col++) { + std::print("{}", mdspan[row, col]); + } + std::println(); + } + // std::println("Map: {}", diagram.data); + std::println("Width: {}", diagram.width); + std::println("Height: {}", diagram.height); +} + +auto parseMap(const std::string &filename) -> std::expected { + std::ifstream inputF{filename}; + + if (!inputF) { + return std::unexpected{"Some file open error.\n"}; + } + Diagram diagram{}; + + std::string puzzleLine{}; + while (std::getline(inputF, puzzleLine)) { + // std::println("{:3}: {}", diagram.height, puzzleLine); + diagram.data.push_back(0); + diagram.data.append_range(puzzleLine | std::views::transform([](char c) -> int { return c == '.' ? 0 : 1; }) | + std::ranges::to>()); + diagram.data.push_back(0); + diagram.height++; + + // ugly + diagram.width = puzzleLine.length() + 2; + } + + // also ugly, bound it with 0s + diagram.data.append_range(std::vector(diagram.width, 0)); + diagram.data.insert_range(diagram.data.begin(), std::vector(diagram.width, 0)); + diagram.height += 2; + + printMap(diagram); + // auto ms2 = std::mdspan(diagram.data.data(), diagram.width, diagram.height); + return std::move(diagram); +} + +auto countMovablePaper(const Diagram &diagram) -> long { + long nMovablePaper{}; + auto mdspan = diagram.mdspan(); + for (auto row = 1UZ; row != mdspan.extent(0) - 1; row++) { + for (auto col = 1UZ; col != mdspan.extent(1) - 1; col++) { + + if (mdspan[row, col] == 1) { + // std::print("checking [{},{}]:", row, col); + // shitty kernal + int upLeft = mdspan[row - 1, col - 1]; + int up = mdspan[row - 1, col]; + int upRight = mdspan[row - 1, col + 1]; + + int left = mdspan[row, col - 1]; + int right = mdspan[row, col + 1]; + + int downLeft = mdspan[row + 1, col - 1]; + int down = mdspan[row + 1, col]; + int downRight = mdspan[row + 1, col + 1]; + + // caveman shit + if ((upLeft + up + upRight + left + right + downLeft + down + downRight) < 4) { + + // std::println("Found"); + nMovablePaper++; + } + } + // std::println(); + } + } + return nMovablePaper; +} + +auto main() -> int { + auto testCase = parseMap("test_input"); + if (testCase) { + + auto testResult = countMovablePaper(*testCase); + std::println("P1 Testcase result: {}", testResult); + + // auto testResultP2 = countMovablePaper(*testCase); + // std::println("P2 Testcase result: {}", testResultP2); + } else { + std::print("{}\n", testCase.error()); + } + + auto realPuzzle = parseMap("puzzle_input"); + if (realPuzzle) { + auto realResult = countMovablePaper(*realPuzzle); + std::println("P1 Real result: {}", realResult); + + // auto realResultP2 = countJoltagesP2(*realPuzzle); + // std::println("P2 Real result: {}", realResultP2); + } else { + std::print("{}\n", realPuzzle.error()); + } + + return 0; +} diff --git a/day4/puzzle_input b/day4/puzzle_input new file mode 100644 index 0000000..37b8d1c --- /dev/null +++ b/day4/puzzle_input @@ -0,0 +1,137 @@ +.@@@.@@@@@.@@.@@@@.@@@@.@@@@..@@@@.@@@...@@@@.@.@@.@@@.@@@@@@@@@...@.@@@@@@..@..@@@.@@@.@@.@@@@@@.@@@@.@..@@@@@.@@@....@@@@@@..@.@@.@.@@@ +@@.@@@@.@.@@.@@...@.@..@@.@.@.@....@.@@@.@@.@.......@@..@.@..@@@@@.@@.@..@@....@@@.@@@.@@@@...@.@.@@.@@@.@@@@@@@@@@..@.@@.@@.@.@@..@@@... +@..@..@@@@@@@.@@@@.@.@@.@@..@@.@@@@@@@@@@@@@@@@@@@.@.@@...@.@..@@@@.@@.@..@@@@@.@@@@..@@.@@@@@@@..@.@@@@@@@@@@@..@@@@.@@@.@@.@@@...@@.@@@ +@@@.@@@@@@..@@@@.@@@@@@...@..@@@@.@..@.@@..@@@@..@@@.@@@..@.@@@@....@.@@@..@@.@.@.@@..@@@@@@.@@...@..@@@@@@@@@@.@@@@@...@..@@@.@@..@@@.@. +.@@@@@@.@@.@..@.@@.@@@@@@@@@@@@@@@@@@@@@.@@@@@@@.@@.@..@@@@@...@@@.@@@@.@..@@@...@..@@.@@@@@@..@@@@@.@...@@.@.@@......@..@@@@.@..@.@@@.@. +@@@@.@@@@.@@@.@@..@.@.@@..@@.@@@@....@.@@.@@.@@@@@.@@@.@@@@@@@.@.@..@@@@@@@@@.@@@@@@@@..@.@@@@@..@.@@.@.@.@...@@@.@@@@@..@....@@@@.@.@@@@ +@@@@@@@@..@@@..@@@@@@@.@@@@..@@@.@..@@@.@...@..@..@@.@.@@@.@.@@...@@...@.@.@..@@@@...@@..@@.@@.@...@@@..@@@@.@@.@..@@@.@@@.@..@..@@.@...@ +.@@.@@@@@@@@..@@@@@@.@@.@..@.@.@@@.@@@@.@@.@@...@@@.@@.@@..@@..@.@.@@@..@@.@@@@....@.@..@@@@.@@@@@.@@@..@@..@..@.@.@@.@@@@..@@...@@@.@@@@ +@@@@@@.@.@@@@@@@...@@@@@@.@@.@@@@@.@..@@@@..@@@@@@.@@@@..@@.@@.@@@..@@@.@@@@@@@...@@@@@.@.@.@.@@@@@@.@@@@@@@@@.@..@@@@@@@@.@.@@.@@.@.@@@. +@...@@@@@@@@@@@@.@@@......@@@.@.@.@.@@.@@..@@@@@.@@@@@.@@.@....@@@.@.@@@@@@@@@...@@@@.@@@..@@@.@@..@@@@...@.@..@@@...@.@@..@..@.@@@@@..@. +@@.@@@....@@@.@@@@@.@@@.@@@@.@@@@.@@@@@.@@@.@@.@..@.@@@@..@...@.@@@@@...@@.@@..@..@@.@.@@.@@@@.@@.@.@.@@.@@@.@@@@@@@@@@@@@@..@..@@@..@@@. +@..@.@@.@@@@.@@.@@@@..@@@@..@@.@@.@..@.@@@@@.@..@.@..@@@.@@.@@@..@@.@.@@@@@@@@.@@@.@@@.@@@.@@@@.@@...@@@.@.@@.@@..@@..@.@.@@.@@@...@@@@@@ +@@@.@@@@.@@.@@@.@@@@.@@@.@@@.@@@@.@@@@@@....@@@...@@.@.@.@.@@@.@.@@@....@.@@@@@..@@@@@@@.@..@@@.@..@@@@.@@@.@@@@@@.@.@..@@@@@@@@@@..@@@@. +.@@.@..@.@.@@@.@@@@.@@@@@.@@@.@@@@@@...@@@@..@@@.@@@.@@.@@.@@..@.@@..@@@@.@@@@.@@@@@@.@..@.@.@@@....@@..@@@@@.....@@@.@.@@.@@@.@.@@..@@.. +.@@@@.@@@@....@.@@.@@..@@@.@@..@.@..@@.@@@.@.@@@..@...@.@..@@.@@@@.@.@.@@@..@@@.@@@@.@@@@.@.@@@@@@@@.@.@@..@.@@@@.@.@@.@.@.@...@.@@@@@... +@@@@..@@.@@@..@...@@..@@@@.@@.@.@..@.@.@@@@@.@.@@.@@@@..@@@..@.@@@@@@...@.@.@@@@..@@...@..@@@.@..@@@@@@@.@@@@.@@@@..@...@@@.....@@....@.@ +@@.@@.@@@@@@@.@.@.@.@..@@@@.@@@@...@...@@.@..@..@@.@.@.@.@.@@@@@@@@..@@.@@@@@@@@..@@@@.@@@...@.....@@.@.@.@.@@@@.@@@@..@..@.....@@@@.@@@@ +@@@@@@@@.@@@@..@@@@@@@@@.@@@..@@.@@@@@@.@@@.@@.@@@@@@@@..@@.@@.@.@@.@@@.@@.@@....@@.@.@.@@@.@@.@..@@@@.@.@@@@@..@@@.@@@@@@@@@@@...@@...@@ +.@@..@@@@@.@@@@@.@@.@..@@@..@@@@@@@@..@@....@@.@.@@@@@.@@@.@@@@..@..@@...@.@@@.@@@.@@..@@@@.@.@@@@...@.@.@@.@@..@@@@@@@@@.@@..@.@@@.@@@@@ +@.@@.@@.@..@.@@@@.@@@@.@@..@@.@.@...@@@@@@@@@..@@@@.@@@@@.@@.@@@@.@@@@@.@@.@.@@@.@...@@.@..@@@...@@@...@@@@@.@.@@@.@@@@..@@@@..@@@.@@@@@. +@@@..@@.@@@@@@@@@.@@@.@@@@@.@.@@@@.@.@.@@@@.@.@.@@.@.@@..@@@..@@@..@.@@.@@..@.@.@@@@..@..@.@@@@@@@@@@@...@.@@....@.@..@@..@@.@..@.@@@@@.. +@.@.@@@@@@@.@.@.@@@.@@.@@@@@@@@@@@.@@@@@.@..@@@@@@@..@@@@@.@.@@@..@@@@@.@..@@..@.@@@@@@@.@@@..@.@@@.@@@@.@@.@@.@@@@@@..@@@.@@.@..@@@@.@@. +.@.@@@@@@...@@@.@@@@.@@@@@@@@@@@.@@@@.@@@@.@@.@@...@@...@@@@.@..@@@@.@@...@.@..@@@@@@.@@@@.@.@@...@@@.@.@..@.@.@@@@.@@@....@@@@.@@.@.@@.. +@..@@@...@....@@@@@@@.@@.@@@@@@@.@@@@@@.@@@.@@@.@..@@.@@@.@.@@.@.@@@@@@@@@@.@@@@.@@@@@.@@.@..@@@@.@@..@..@...@@@..@.@...@..@@@@.@@@.@@@@@ +.@@..@..@...@@@@..@.@.@@...@.@@@@@.@@@@@.@@@...@.@..@@@..@.@..@....@@.@@.@@@@@@@.@.@@@.@@@@@.@@@.@@@.@.@@@@.@@@@@@@.@@@@@@@..@...@@.@.@@@ +@@@@@@.@@@@...@.@@@...@@@.@@.@@@..@@@.@.@@...@@@.....@@@.@@@@.@@@@.@.@@@.@@@@@...@@.@@.@@@.@@@@@@.@@@@.@@.@@@@@@@@@@@..@.@@.@@@@@.@@.@@@@ +.@.@@@@.@@@@@@@.@@..@@@@@@@@....@@@...@@..@.@@@.@@.@.@.@@@@..@@...@.@@@@.@...@..@@..@@@.@@@@.@.@@@....@..@@.@@@@@@...@@@@@@@..@@@..@.@@.@ +@@.@.@@@@@...@@@@@.@.@@@@@@.@@@@.@@..@@......@.@@@..@..@@@@@@.@@@@@@@.@..@@@@@@@@@@.@@@@@..@@@@...@.@@@.@@@@@.@..@@@@.@@@@@@.@@@@.@@@@... +@@.@.@..@.@@@@@@@.@.@@.@..@@@@@@...@@@@.@@@@@@@@.@@@@@@@.@@.@@@@@.@@@@.@@.@@@@...@.@.@@.@.@..@@@@@.@.@@.@@@@@@@.@..@@..@@.@@..@..@.@@@.@. +@@.@@@@@@...@@@@@@@..@.@@@.@..@...@@@.@@..@@@.@.@@.@@@@@........@@.@@.@.@.@.@@@@@@@@@@@.@.@@.@@@@@@@.@.@@@.@@@.@@@@@.@@.@@..@@..@@.@@@@.@ +..@.@@.@@..@.@@..@@@@@.@@.@@@@..@.@.@@@@@@.@@@.@@@@@@..@.@@@@@@.@.@@@@@@.@.@.@@@@@@.@@..@.@.@@@@.@.@@@.@..@@@.@@@@.@@.....@.@.@.....@@@@. +.@@@@.@@@@@.@@.@@@@@@.@@@.@@@...@@.@.@@.@@@@@@....@@@@.@@.@@.@@.@@@@.@@.@@@@@...@@@@@.@@@@@..@..@@@@....@@@@..@.@@@@@.@.@@..@..@..@@@@@@. +@@@@@@.@.@@@..@..@@@.@@@.@..@.@@@@@@@@@@@.@.@@@@@..@@@.@..@@.@@....@@@.@@.@....@@@@@@@.@@.@@@@.@.@.@@..@.@@@@@...@.@@@@@@...@@..@.@@@@@.. +@.@@@@@@.@.@.@.@@@..@@@@@.@@@.@@@@@..@.@.@@.@@.@@@.@@@@@@@@.@.@@@@@@.@@@@.@@.@@.@@.@.@@@@@@@@.@@.@@.@@.@@@@@@@@..@@@@..@@@......@@..@.@@@ +.@@@@@.@@@@.@@@@@@.@@.@@@@.@@.@@@@.@.@@.@.@@@@@...@.@.@@@.@@@@@@.@@..@@@@@@@@@@@.@@@@.@@@..@@@@@@..@.@@@@.@@@.@.@@.@@.@@@@@@..@.@..@.@... +.@@....@.@.@.@@@.@@.@@@@@@@..@..@@..@@@....@....@@....@.@@.@.@@.@@@@@@@@@@@@..@.@@@@@.@.@@@@..@.@.@@.@@@@@..@@@@@@@@@.@.@@..@@@@..@@@..@@ +@..@@@@@@.@@@@.@@@.@..@.@@@@.@@.@@@@@.@@.@.@@@@@@@..@..@.@@.@.@@..@@..@@@@@.@@@.@@@..@@@@@@@.@@@@@.@@.@@@@@@@@@@.@@@.@.@@@@@.@@@@@.@@..@@ +@@.@..@.@@@@@.....@@.@@@@@@.@@@.@..@@@.@@@@.@@@..@.@@..@.@...@@@@@@@@.@@.@@..@@@@@.@@@@.@@.@..@@@.@@@@@@@@@...@@@@.@@@@@@@@@@.@@@@..@@@.@ +@..@@@@.@.@@...@@@@..@@@.@@@@.@..@.@...@@@@@..@@@.@@@.@..@@..@@@@@@@.@@...@@.@@@@@.@.....@@@..@@...@.@....@@....@@@@@@@@@@@..@@@@@.@@@.@@ +..@.....@@.@@@@@.@.@@@@@@.@@..@..@@..@@.@@@.@@.@.@@.@@@@@@.@@.@@@.@@@@...@.@.@.@@.@.@@..@@.@@@@..@@@@@.@.@.@@@@@.@@@@@@@.@@@@@@.@@@@.@@.. +.@..@@@@@@@@@@.@.@.@.@@@.@@.@@@@@@@@@@.@@@.@.@...@.@@.@@@.@...@@.@@@@@@@.@@@.@@@...@@@.@@.@@@.@@@@@@@..@@....@.@.@@.@@@@.@.@.@@@.@@@@..@@ +@.@....@@@@.@@.@.@@@@..@@@.@@.@@@@..@@@@@@..@@.@...@...@@@@@.@@@@@.@.@.@.@.@@.@@.@.@.@@..@.@@@.@@@.@...@@@.@.@@..@@@..@@...@@@@@@@@@@@.@. +@@@@.@.@@..@@.@..@@@@@@..@@....@..@@@@@@.@@...@@@@.@@@@.....@.@@.@.@@@@@@..@@.@...@..@@.@@@@@@.@@.@@@..@@@@@.@@@@@..@@.@@@.@@@@@@@..@@@@@ +..@.@@@@@@.@.@.@@@.@@.@@@@@@..@.@.@.@@.@@@.@@@@...@@.@@.@.@@@..@@.@.@.@@@.@@@..@@@@@@@@@@@@.@@@@@@@@@@..@.@.@.@@@@@@@@@@@@.@@.@@.@.@.@@@@ +.@..@@@@@.@..@@@.@@@@@@@..@@.@@...@@.@@@@@@@@@@..@.@@.@@.@@@@@@@...@@@.@.@@@.@@@@.@@@@@.@.@@.@.@@@@..@@@..@..@@@.@@@.@@.@.@@@@@@.@@@@@.@. +...@@.@@@..@@@@.@@@.@..@@@@@.@@@.@.@@.@@.@.@@@@....@@.@@..@@@.@@@..@.@@....@@.@@@@@@@@@@.@@@@.@@..@..@@@..@.....@..@..@@@@@@@.@@@@@@@.@@@ +@@@@.@..@@@.@..@.@.@...@@@..@@@.@.@..@@.@@@..@@@@@@..@.@.....@.@@@@@.@@.@@@@.@@@@@@@@.@@@@@@@@@@...@.@@@.@.@@@@.@..@@.@@.@@@@.@@@@..@@.@. +@..@....@@@..@@@@@@@@@..@@@@@@@@.@.@@@@@@@@@@.@.@@@@...@@.@@@@@@...@.@.@@@....@@...@@@@@.@..@@.@.@@.@@.@.@.@@@.@@@@@@@.@@.@@@.@@@.@.@@@@. +@.@.@@@@.@...@@.@@@@.@@@..@@@.@@.@.@.@@.@@@.@@.@@....@@@@.@@@@.@.@.@.@@@@..@@.@@....@@@@@.@@@@@.@..@@@@.@.@@..@.@@@@.....@.@.@@@@@@.@@@@@ +.@.@@@@.@...@@@.@@@.@@.@..@@@@.@@.@@@..@@@@..@.@@@@.@@..@@@@.@.@@.@@@.@@@..@@@@@.@@@@@@@@@.@@@.@@@..@.@.@.@@@.@..@@@..@...@..@...@.@...@@ +@@@@@@@.@@.@.@.@@@.@@.@@@.@....@@.@@.@.@@@.@.@@.@.@@.@@@.@@@@@@@@@...@@.@.@@.@@..@.@@@..@..@.@..@@@@@@..@.@.@@@@@@.@@@...@@@@.@@.@@@@.@@. +@.@@@@..@.@.@.@.@@.@.@@@.@@@@..@@.@.@@@.@@@.@@@@@@@@.@.@@@@..@....@@..@@.@@..@@@@.@@.@@@@..@@@@...@@.@@@@@.@.@@@@.@@..@@@@@.@@@..@@@@.@@@ +@@..@@.@@@.@..@..@@@.@@...@@@@@@@@@@.@..@.@.@@@@@.@@@@.@@@@@@.@@...@.....@@@@.@@@@@@@@@.......@@@.@@.@@..@@@@.@@@@..@@@@@@..@@..@@@@@@.@@ +..@@@@@.@.@@@@@@@@@....@@.@.@.@.@@@....@@.....@.@@@@@@@@.@.@.@@@..@@@.@@.@@.@@@...@@@..@@..@@@.@@@@@@@.@@@@.@@....@@@@@..@..@@@.@.@...@@@ +@@@@@@..@...@.@..@@@....@.@@@@@@@@.@.@@@.@@@@@@@@@.@@@.@@.@@..@.@@.@...@.@@@@.@@@@@@.@@@@@.@.@@.@@.@@@.@.@@@@.@@@@.@@.@@.@.@@.@..@@.@@@@@ +@..@@.@.@@@@@.@....@@..@@@@@@@@.@@@@@@..@@@..@...@.@@@..@.@.@@.@@.....@.@...@@@@.@@.@.@@.@.@@@@.@@.@@.@@@.@@.@..@@@.@.@@@@..@@..@@.@@.... +.@@.@.@@@@@@@@@..@.@@@.@@@@@.@@@.@.@@@@@..@@@@.@@@@@.@@@@@@@@@@.@.@@@@.@@.@.@@@@.@@@@@@@@..@@@..@@.@@.@@@.@.@.@@..@@@.@.@@@@.@@@.@@@.@@@. +@@@..@.@@.@@@..@@...@..@@@@@@@@@@@.....@.@@..@@.@.@..@@@@.@@.@...@@@.@@@@..@@@@..@.@@@.@@@@@@@.@.@@..@@@@@@@@@@@@.@.@@...@@@@@.@@@......@ +@@@@.@@@@@@.@@.@...@@@...@@@@...@.@.@@.@.@@..@@..@@@.@@.@@.@@@.....@@@@@.@..@@@...@.....@@@@@.@@.@@.@@.@.@.@@@@@@@@.@.@.@.@@@@@@@.@@..@@. +@@.@@@..@@..@@..@@@@@@@@@@@..@.@@...@..@@@@@.@@.@...@@@@..@@@.@@@@.@@@..@@.@@....@@..@@@@.@@@@.@@..@@@@.@@@.@..@@@@..@....@@...@@@@@@@@.. +.@.@.@@@..@..@@.@.@@@@@@..@@@@.@@@@....@@@@@@.@@.@@@.@.@@....@.@@.@@@.@.@@.@@.@@.@..@@@.@@@.@.@.@@@.@@@@@@.@..@@@..@.@..@@@@@@@@@@@@@@@@@ +..@@.@.@@.@@@@@.@@@@@@..@@@@@@.@.@.@@@..@@@@@@.@@@@@@@@...@@..@@@@@@@@@@..@@.@.@@.@@@@@..@.@@@@.@@@.@@@@@@@@.@@.@@@@.@..@@..@.@@..@@@@@@. +@..@.@@@@@@.@@@..@@..@@..@@..@@@@.@.@@.@@@@@.@..@@@@..@..@@.@@@@.@@@...@...@.@.@@.@@..@@.@@@@.@.@.@@@@.@.@..@@@.@@.@.@@.@@..@@@@@@@..@@@@ +@@.@@@@@.@@@.@@@..@@.@@..@.@@..@@@@.@@@..@..@@@@@@.@@@@.@.@@@@@@@.@..@@.@...@@...@@@@@...@@@@@@@.@@@@.@@.@@@@@@.@@@@@@@.@@.@..@@.@@@@@.@@ +@@@@@.@@....@@@.@@@.@.@.@.@@@@@@@@@@@@@.@@@@@@.@..@@@@@.@.@@.@.@@@@..@@@@.@@..@@..@.@@...@@.@.@@.@@@@@.@@.@@@@@@.@@.@.@...@..@..@@@@@@@@. +.@@@..@.@..@@@@@@.@@..@.@@@.@@@..@.@.@.@@@.@.@..@@@@@@.@@@@@.@@@.@@@@..@.@@.@@@@@@@...@@@.@@....@@.@@@..@.@.@@@@.@@@..@@@.@.@@..@..@@.@@@ +@@@.@@@@@@.@@@.@@@.@.@@@@.@@.@.@...@@.@.@.@@@...@@@.@..@@@@@@.@.@.@@@@@@@@@@@@..@@@@@.@@.@.@.@@@@..@@@@.@@..@..@....@.@@@.@..@@@@@..@@@@@ +@@.@..@@@..@@.@@@@@@@.@@.@..@@@.....@@@@.@@@.@.@@.@@..@@.@@@.@@.@@..@@@.@@@@.@@@@..@.@@.@.@@@@@@@.@@@..@.@.@@@@..@@..@@@@@@.@@.@@@@.@@@@. +@..@@@.@..@@.@@.@@.@.@.@@@.@..@@@@@.@@.@@......@@@.@@.@...@@@.......@@..@@...@@@@@.@@@@@@@...@@@@..@@..@.@@.@@@@@.@.@..@@@@@.@@@@@.@..@.@ +@@@.@.@.@@@@@.@.@@...@@@.@.@@@.@@@@@@.@@.@@.@@.@@@.@.@@.@@...@@@@@@@@@....@@@.@.@@.@..@@.@@@.@.@.@.@@@@@..@@@..@.@@.@.@@@@@.@.@@..@.@.@@@ +@.@@@@.@.@@@@@@.@.@.@@@@@@...@@@@..@@@.@..@.@@@@@@.@@@....@@@@.@.@@@@@.@@@.@@@@.@@@@@..@.@..@..@.@@@..@@..@..@.@@..@@..@..@@.@@@@......@@ +@.@@.@@@.@@@@@.@@@@@@.@@@@.@@@@@.@.@@.@.@@@.@.@....@.@@..@@@@@@.@.@..@..@@.@@@.@@@@....@@@.@@.@...@.@@@@.@@@@..@@@.@.@@@..@.@....@.@@@..@ +@...@..@..@@.@.@@@....@@@.@@@@@@@@@.@@.@@@@..@@.@.@@..@@..@@@@@...@@...@@@.@..@@.@@@@.@.....@.@.@@.@@@@@@.@.@@@@@@..@@.@.@@@..@.@...@@@@@ +.@@@@@...@.@@..@..@.@@@@@@....@@@@@@@@@@@@@@@@.@@@...@..@@.@..@@@@...@.@.@@@@..@.@@.@@.@.@@.@.@@.@.@.@@@@@@.@@@.@@..@.@@@@@..@@@@..@@@@.. +.@@@@@@@@.@.@@@@@@.@.@.@@@@.@@.@@.@.@@@.@@@..@.@@..@....@..@.@@...@@@@@@@@@@.@.@.@@@..@@@@@@.@@@@@.@@....@@@@@@@@@@.@.@..@@....@@@@@@@@.@ +@.@@@..@@@@.@.@@.@...@.@@..@.@@@@@@@.@@@.@@.@@.@..@@.@@@.@....@@@@..@.@.@..@@@@@@..@@@@@@@.@.@@@@@.@.@.@.@@.@....@@@..@@..@@@@.@@@.@@.... +.@.@.@@@.@@@@@@@@.@@@.@@.@@@.@@@@@@.@@..@.@@@@@@@@@@.....@@.@@@.@@@@@..@@@@.@@.@@.@@@@@@@.@@.....@..@@@@@@@@@@@@.@.@@@@@@.@@.@.@@@.@.@@.@ +@....@..@.@..@....@@.@@@.@@..@@.@@@@@.@@@@@@..@@@..@@.@...@....@.@..@.@@@@@@@...@@@@.@@@@@@@@@.@.@@..@@@@@@@@@.@..@.@@.@@@@@@@.@@@@..@@@. +@@@@@@.@.@@@@@@.@@..@@..@.@.@@.@.@.@@..@.@@..@@@.@@@@@@@@...@....@.@.@@@.@..@.@.@.@@.@...@@..@....@@.@.@@@@.@..@..@.@@.@@@@@@...@@@@@@@@. +@@..@@@.@@@@@@.@@@@.@@@@@...@@...@@..@@@@@..@@@.@@@.@.@@..@@..@@@@.@.@.@@@.@@@@.@@.@..@@...@.@@..@@.@.@@@@...@.@@@@@@@@..@@@@.@.@@@...@.@ +.@@@@..@.@@...@.@.@@@@@@@@..@@@.@@@@.@@..@..@..@.@@@.@.@.@@.@....@@.@..@@.@.@@..@.@@.@@@@.@@@@..@...@@@@.@@@@@.@@@.@@..@@@.@@@.@@@@@@@@@. +@@@@@@..@.@.@@@@@.@@@@@@..@@@@@.@@@@.@..@@@.@@@..@@....@.@@.@@@@@..@@.@.@@@@@.@.....@@@.@@@@.@..@@@.@@@@.@.@@.@@@@.@@@@..@@.@@.@@..@@@@@@ +@@@..@@.@....@@.@@....@@...@.@..@..@@@@@.@...@@...@.@@@@.@@..@@.@@@@@@@.@@@@@@.@@@@@..@@@@@@..@..@....@...@.@.@...@@@.@@@@.@@....@@..@@.. +@.@..@@.@@.@@@..@@@.@..@@..@..@@.@.@@@.@@@@@@@@.@..@.@@@...@@@@.@@@@@@...@.@@@@@@.@@@@@.@@@@@@@..@@@.@.@@@@@@@@@.@@@@...@.@@@@@.@@@@.@@.@ +@@.@@@..@.@@@@@@@@.@..@.@.@.@@@.@@.@@.@@@@...@@.@@@@@.@@@...@..@@..@@@.@@..@@@@@.@..@@@@@@@...@@.@.@@@@@@.@@@@@.@@@@.@.@@@@@@.@.@@@.@..@@ +.@.@.@@@..@.@.@.@@..@@@@@.@@@@@@@...@@@.@@@@@@.@@.@@.@@@@@.@.@@@.@...@.@@.@.@...@......@@@@@@@@@..@@...@@@@@.@@.@@@@..@@@@@@.@..@@@@@@@@@ +.@@@.@.@..@@@@.@@@@@.@@@.@@...@@@@..@@@@@.@@.@@@.@@@..@@@.@@@@..@.@.@@@@@@.@@@.@.@@@@@@.@@@.@@@.@@@.@@@..@..@.@@@@@@@@@..@@.@@@@.@@.@@@.. +.@..@..@.@@.@@.@@@@@@.@.@@@@.@..@.@..@.@..@@.@@..@@@.@.@.@.@..@..@.@@....@.@.@@@.@@@@@..@@@.@@.@@@@@@@@@@@@.@@@.@.@.@..@@@@@.@@@@@@@@@@@. +.@@.@@@@@@@.@...@@.@@@@....@....@@@.@.@.@@..@@....@.@@@.@...@.@@...@@..@@@.@..@@..@.@@.@@.@@.@@.@..@@@..@@.@.@@@@.@.@@@@@@.@@@@@@@@@@@.@@ +@@@.@@.@@@.@.@@@@@@@..@@@@@@@@..@@@.@@@@@.@@@@.@@@.@@@...@.@.@@@.@.@.@@@@@.@.@@.@@..@@@@.@@@@@@.@@..@@@@@@@@@@.@@@.@..@.@@@@@@@.@@@@@@@@. +@.@.@@@.@@@@@......@@@.@@.@.@@@@@.@@.@@..@.@@.@@....@@@@@@.@.@@.@...@@.@@@@.@@@@@@@@@@@@@@@@@.@...@@@@.@@@@@@@.@.@@@.@@.@@@...@.@@..@.@@@ +@..@@@@@@@@.@.@.@@@..@@@@@.@@..@.@@.@@@@@@@@@@.@@..@.@@..@.@@@@.@@.@@@.@@.@@@@@@.@@@..@.@@@@@@@@@..@.@@@.@@..@@@@@@@@.@@@@.@@@@@@.@..@@@@ +.@@@@.....@.@..@@@..@@.@@@@...@.@@@@@.@....@@@@@.@...@.@..@....@.@@@@.@@@@@@@..@@..@.@@@@@@.@.@@@@@..@.....@.@.@@@@@@@@@.@..@@.@..@..@.@@ +@@@.@@@.@..@@@@.@@..@@@@@.@@..@...@.@...@@@@....@@@.@@.@@@@..@@@@@.@@@@@@..@@@.@@@.@.@@@@@@@@.@@.@@.@.@.@@@.@.@@..@@@@..@@@@.@@.@@@.@@.@@ +..@@.@.@.@@@@@.@@@@.@.@.@....@@.@@.@@@.@@.@@.@@.@.@..@@@@...@..@.@@@.@.@..@@.@@@@.@@@.@@.@@@.@@.@@..@...@@..@..@@@..@.@@.@...@@@@@.@.@@.. +@@@@@.@@@@@@@@@@..@@.@@@....@@.@@@.@..@..@.@...@@@@@.@@.@@@.@.@.@@.@@.@..@@..@@@@@@@@.@..@@@.@.@@..@@@@@@@@.....@@.@@@.@@@@@..@......@@@@ +@@.....@....@@@@.@..@@@@.@@@.@@@@@@@@@...@@.@@..@..@.@.@@..@@@..@@@@@@@.@.@@@.@.@@@@.@.@.@@@.@@@@@.@@@.@..@..@@.@@@@@@@@@...@@@@.@.@.@@@@ +.@@@@..@.@@@.@.@.@@@@.@.@..@@.@@@@.@@@@@@@@@@@@@@@@.@.@@..@....@..@@@.@@@@@@@@.@@@@@.@@@@@.@.@@....@..@@@.@@..@....@@@@@@.@@@@....@@..@@@ +@@@.@.@@@@......@@...@.@.@@.@@@..@@@.@.@.@.@@@@@@.@@@.@@..@@@.@@@@....@@@@.@@@@..@@.@@@.@@@@.@@@@@@@.@@@..@@.@.@@.@.@@@@@..@@..@@..@.@@.@ +@..@@@@..@..@.@@@.@@@..@@@@@..@@.@@@.@.@..@..@@.@.@@@@@@@@@@.@@.@@..@..@@@.@@@.@@@@@....@@@..@@.@.@@@.@@.@@@.@@...@@..@.......@.@@@@@@.@. +@@.@@@@.@..@..@.@@@..@.@@@@@@.@.@..@..@.....@@@..@@@..@..@.@@.@@@.@.@@.@.@@.@....@@..@@@@@@@@@@@@...@@.@@@..@@.@@@@.@.@@..@@@@@@@.@@@.@@@ +@@@@@..@.@@@@@@...@.@@@@@.@@@.@@.@.@@@.@.@@.@@@@.@...@@@.@..@@.@@.@..@@@@.@.@@.@@@@..@@@@@@@.@@@@.@.@@@@...@.@@@@@@...@..@.@@@.@@....@.@@ +.@@.....@@@@@.@.....@@.@.@.@..@@.@..@@.@..@@.@.@.@@@@.@.@@@@@.@@@@@@.@..@.@.@@@@@@@@...@@@@.@@.@@@@@@@@@@@@.@@...@...@@.@@...@@.@.@@.@@@. +@....@@@@@.@..@..@..@@.....@@@@..@@.@..@@@@@@.@.@@@@@.@@@.@@..@@@.@...@@..@.@@@.@.@@..@....@.@@@..@@@@.@@@..@@..@@@@...@@@@.@...@@@.@@@@@ +@@.@..@..@.@..@@@..@@@@.@@@@..@@......@@@.@.@@@...@@.@@@@@@@@@@.@.@@..@@..@@..@@@@@@@@@@@@@.@...@.@.@@@@.@@.@.@@...@..@.@.@...@@@@@.@@@@@ +@@@@...@@@@..@@@..@...@@.@@@.@@@@@..@@@@.@..@.@@@@@......@@.@@...@@.@@@@.@@.@..@.@@@.@@@@@.@@@.@@..@@@..@@@@..@.@.@@.@@@@@...@.@...@...@. +@.@@@..@@.@.@@@@@..@..@.@@.@@@@.@@.@.@@..@@@@@@@@..@.@@..@..@.@@..@..@@..@@..@@@@.@.@.@.@.@@.@@@..@.@@@.@....@.@@@@@...@.@@.@...@@...@@.. +.@@.@@@...@@@..@@.@@..@@.@.@@..@@@......@@.@@@....@@@@@.@@@@..@@.@....@@@..@@@@@.@@@...@@@.@@.@@@.@.@@@@@.@.@.@@@@@@.@.@@@@@..@@..@@...@@ +@@@@@@@@...@@...@@@@@@@.@.@@.@@@.@.@.@@..@.@@..@.@.@.@@@@@@..@@@@.@@@@@...@@....@@@@.@@.@@.@..@.@@.@@..@@@@.@@@@.@@.@.@@...@@@.@@@..@@@.. +@...@..@@@@@..@@...@.@@@@.@.@.@@@@@@.@@.@.@@...@.@..@@@@@.@.@.@@.@.@.@@@.@@.@@@@@@@@.@@@.@..@.@@@.@@@@@@.@@.@@.@@..@@.@@.@@@..@.@@.@@@@@. +.@@@.@@....@@@@@@.@@@@@@@@@@@.@.@.@@@.@@@@@@@@..@@@@@.@@@@@.@@.@@@.@@@.@..@.@@...@@...@@.....@.@@@@.@@.@@.@@@.@.@..@.@@@..@..@@@.@.@@.@.@ +@.@@.@@@@.@.@.@@..@..@@@@..@@.@@@@@.@@@..@..@@@@.@@.@@@...@@@@@@@@@.@@@@@@...@@@.@..@@@@.....@.@@@@@..@.@..@@@..@.@@@.@@@.@@@@@..@.@@@... +.@.@@@.@.@...@.@@@.@.@@@@@@@@@@.@@...@..@@@.@.@@@.@.@@@@@..@@@@@@@@@@@.@@@@..@.@@@@@@@@..@@..@@@@@@@@..@@...@@@@@@@@.@.@@@@@..@@@.@.@@@@@ +..@@.@..@@.@@@.@@@@.@.@.@@..@@.@@...@.@.@@@@@.@...@@@@...@@@..@...@@@....@@@@@.@@@@.@@@@@@.@.@@@@.@.@@@.@@@.@@.@.@@.@@.....@@@...@.@@@@@@ +@@@@.@@@@@.@@.@.@.@@@@@@@@@..@@@@@@@@@..@.@@@.@@@.@@@@@.@@@@@.@.@@@@.....@.@.@@@@@@.....@@.@.@@.@..@@@@@.@..@.@..@...@@@.@..@.@@@@.@.@@@@ +@@@@.@@@..@@@.@@@@@@@@@.@@@@@@@..@.@@.@@@@.@@@..@.@..@@.@@...@@@@@.@.@@...@..@@@..@@.@.@@@@.@@@@@@@@@@@....@@.@@.@@@...@.@.@@@@.@@@.@@@.@ +@@@.@..@@@@@.@@.@@..@.@@@..@@@@@@@.@@@.@@@@@@.@@.@...@@@.@@..@@@@@.@@..@@@@@@@@.@@....@@....@@@@@@@@.@.@.@@@.@@.@.@@@@@.@.@@.@@@.@@@@.@.@ +.@@.@@@@..@@@.@.@.@@@@@@@@@@@..@..@@@@@@@@@@@..@@@.....@@@@.@@@@@@@..@@..@@@..@@@@@@..@@.@@@@@..@@@@.@.@@@@..@@@@@...@.@@@.@@@@@@.@@@.@@@ +@@..@.@.@@@@@.@@@.@@@@@@.@...@.@@.@@@..@..@.@@@@.@@.@@@@@@@..@.@@@@@@@@.@..@.@@@...@@@.@@.@@@@@@.@@@@@@..@...@@@@.@@.@@.@.@.@@.@@.@@.@.@@ +@.@@..@@...@@@@@.@@.@..@@@@@@.@@@.@.@@.@@@@@@@..@@@@@@.@@@@.....@@.@@@@..@@@...@@..@..@@@@.@@@@@@@@@..@.@@@@@..@@@.@@.@@@.@..@@@@@@.@@@@@ +@@@@@@@@@@..@.@.@@@@@..@@@@..@@.@@@@@..@@@@.@.@@@@@@@.@@@@@.@@@@.@.@@@@@@@@@@@@@@@..@@@@@@.@@@@@.@@@@@....@.@@.@@.@...@@@@@@@@.@.@@.@..@@ +..@..@@@@@.@@@@@.@@@@@@@.@@..@.@@.@@@@.@@@@@..@.@.@.@@.@@...@@@@@@@@...@..@..@..@.@@@...@@...@@.@@..@@@@.@....@@@@@.@@@@.@@@@@.@@.@@@@@.@ +@@@.@.@@...@@......@.@..@@@.@@@.@.@@.@@@..@@@@.@.@@@@.@@.@.@.@@@@.@@@@@@.@@@@@@.@@@..@@......@@@@@@@.@@@@@@@@.@@@@@@@..@.@@@..@.@..@@@.@@ +@@@@.@@...@@..@@@@@@@.@@@...@.@@.@.@@@@@@@@@@@@@@@.@@.@@.@@@..@..@..@@.@.@.@@@@@@@....@@.@@@@.@.@@@.@@@@@@..@.@@.@@@...@.@@@.@@@..@@@@..@ +.@@.@.@@@.@....@@.@@@@..@@@@..@@@.@@@...@@..@@@@..@.@.@@@@@@@.@@@@.@.@@.@@....@@.@@@@.@@@@.@.@.@@....@.@@@...@.@...@...@..@.@@@@@..@@@.@. +..@@@@@@@.@@.@..@@@..@.@....@@..@@@@@.@@@..@@@.@@@..@@.@@@.@@@@@@@.@.@@..@@@@.@.@@@......@@..@@@.@@@@...@@..@@@@@.@.@@@@@..@.@@..@..@@@@@ +.@@@.@.@.@.@.@@@@.@.@.@@..@@.@@@.@.@@@@@.@.@..@@@@@.@.@@.@@@@@@@@..@@..@@@@@@.@.@@@@.@@...@@@.@@...@@@@@@@@@.@@.@@@.@@.@@.@@...@@.@@.@.@. +@.@@@@.@@@.@@@..@..@..@@@@@.@.@.@@@@@@@.@..@@@.@.@.@@.@@@@...@@@.@.@@@@..@.@@....@@@@.@@@@.@.@.@@@@@@@.@@.@@@@..@.@@@.@@@@@@.@@@@@@@@.@.@ +.@@@@@.@@@@..@@.@.@@@.@.@@@@@@@..@@.@@.@@.@.@.@.@@@@@@@@@...@.@@@@@@@..@@@.@.@.@.@@@@.@@@.@.@@@@@@@@@@@@@@@@.@@.@@@@@.@.@..@@..@@.@@@@.@. +.@@.@@@@@@..@@.@.@@@......@@@@..@@@.@@@.@@..@@@@@.@@..@.@@@.@@.@@@@@..@@@@.@.@@..@.@.@@.@@@.@@@@@@@..@@.@.@...@@@.@..@.@@.@@@@.@..@@@@@.. +@.@@@@..@.@.@@@@@@@@@...@@@@..@.@@@..@@@@@..@..@.@@.@@.@@.@@@@.@@.@.@@@@@.@@@...@.@@..@.@@.@@@@@@@@@@@@@.@@@@@.@@.@@@..@@@@.@@@@..@@@@@@@ +@@@@@@...@..@.@@@..@@.@@@@.@@..@@@.@.@@@.@@@@@@@.@@@@..@@@@@.@.@.@@@@@@.@@.@@@..@.@.@.@...@@@..@@@@@....@@@@@@@@@@...@@@.@.@.@@@.@.@@@..@ +@.@.@@@.@@@.@.@.@@@@.@..@.@....@@..@@@@.@..@..@@@@@@@.@@@@@.@@@@@..@@.@...@@..@@.@@@@@@@@@.@.@@@@@@@.....@@@@@@@.@@@.@..@@.@@.@.@@.@@.@.. +..@@..@.@@@.@@@@.@@.@@..@@.@.@@.@....@@@@@@...@.@..@@@@@@@...@...@..@....@@@.@..@@@@@@.....@@@@@.@@@..@.@@@@@@.@@@@.@@@.@@.@@@..@@@@@..@@ +@..@.@@.@@@.@@@..@@@...@..@.@@@@@@.@.@@...@.@@..@..@@.@@....@....@@@.@@@@@.@.@@@.@.@.@@@@.@.@.@...@@@@@@@@...@@@@@@..@@@@@@@.@@@.@.@@@.@. +@@.@.@.@.@@.@.@@@@..@@@@@@@.@@..@@.@@@@@@@@.@.@@.@.@.@...@@.@.@@.@.@@@@@@@@@@@@@@.@..@.@.@@.@.@@@@.@@@@@@@@..@..@...@.@@@..@@@@.@.@@@@@@. +.@.@@@@@@.@..@@...@@@.@@@.@@@@@@.@@@.@@@@@..@@.@.@.@@@..@@@.@@..@.@.@@@@@.@..@@.@@..@@@@@@@.@..@@@@@@.@@.@@@@@.@.@@.@.@.@.@@@@@@@...@.@@. diff --git a/day4/test_input b/day4/test_input new file mode 100644 index 0000000..9ad769d --- /dev/null +++ b/day4/test_input @@ -0,0 +1,10 @@ +..@@.@@@@. +@@@.@.@.@@ +@@@@@.@.@@ +@.@@@@..@. +@@.@@@@.@@ +.@@@@@@@.@ +.@.@.@.@@@ +@.@@@.@@@@ +.@@@@@@@@. +@.@.@@@.@. \ No newline at end of file diff --git a/scripts/run-clang-tidy.sh b/scripts/run-clang-tidy.sh deleted file mode 100644 index f453298..0000000 --- a/scripts/run-clang-tidy.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -BUILD_DIR=build -if [ ! -f "${BUILD_DIR}/compile_commands.json" ]; then - echo "compile_commands.json not found; running cmake configure..." - cmake -S . -B "${BUILD_DIR}" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -fi -if ! command -v clang-tidy >/dev/null 2>&1; then - echo "clang-tidy not found in PATH" - exit 1 -fi - -# Prefer files tracked by git; fallback to find -if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then - FILES=$(git ls-files '*.cpp' '*.cxx' '*.cc' '*.h' '*.hpp' || true) -else - FILES=$(find . -iname "*.cpp" -o -iname "*.cc" -o -iname "*.cxx" -o -iname "*.h" -o -iname "*.hpp") -fi - -if [ -z "${FILES}" ]; then - echo "No source files found for clang-tidy" - exit 0 -fi - -for f in ${FILES}; do - echo "Running clang-tidy on ${f}" - clang-tidy "${f}" -p "${BUILD_DIR}" || true -done