Compare commits

...

68 Commits

Author SHA1 Message Date
3a02aab611 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2023-08-21 19:49:11 -07:00
5139b587f8 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-21 16:57:27 -07:00
7edc3b57a3 Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone Build is failing
2023-08-21 16:51:57 -07:00
8ac9ff3a56 Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-08-21 16:47:08 -07:00
a59b689df0 Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-08-21 16:41:43 -07:00
1ae4efcadd Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-08-21 16:39:32 -07:00
7c9ab504ef Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-08-21 16:35:45 -07:00
387c7f0bc8 Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-08-21 16:30:44 -07:00
4f85d53783 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing
2023-08-21 15:57:27 -07:00
fc61b2f92a Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-21 15:37:31 -07:00
749617c3f9 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-21 15:35:05 -07:00
7b0329fb1c Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-21 15:32:15 -07:00
11c2b7fa97 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-21 15:30:35 -07:00
bcc375cfcd Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-21 15:28:33 -07:00
141d09be04 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 23:10:50 -07:00
13021e8ff1 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 23:08:44 -07:00
4d040db6d0 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2023-02-23 21:30:26 -08:00
01ff52e294 revert 1ec1163442137d2ec7a67f2b5e0ccdb37069afa1
Some checks failed
continuous-integration/drone/push Build is failing
revert Update '.drone.yml'
2023-02-23 21:29:27 -08:00
5d3acb153c Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-23 21:26:45 -08:00
1ec1163442 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-23 21:16:32 -08:00
a2a71d14bb Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-23 21:08:52 -08:00
6a1d455c62 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-23 21:07:21 -08:00
71cc84d8b0 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-23 21:04:50 -08:00
451f6f49a0 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-23 21:02:57 -08:00
b27b26a6e4 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-23 21:00:50 -08:00
db86b16b72 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-23 20:56:41 -08:00
92eb389db3 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-23 20:54:53 -08:00
530b4d5f18 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 22:19:17 -08:00
9a0b62d4b5 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 22:18:21 -08:00
4ee123e47c Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 22:17:23 -08:00
01da304acb Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-12-30 22:16:53 -08:00
8e56ad685d Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 22:16:03 -08:00
306ccafc85 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 22:15:10 -08:00
8e2bccd90f Update 'AOC2021.Test/DayTest.cs'
Some checks failed
continuous-integration/drone/push Build is failing
2022-12-30 22:12:08 -08:00
44df745c09 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-12-30 22:09:01 -08:00
9f4fa69d11 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-12-30 22:06:56 -08:00
0f8e99652b Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-12-30 22:06:24 -08:00
01bed1a245 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-12-30 22:05:25 -08:00
ae2093a112 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-12-30 21:36:58 -08:00
c0c4573116 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-30 21:35:57 -08:00
3e3a214bd3 Updated test case
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-06 11:32:11 -08:00
a15762ad3e Merge branch 'master' of https://git.siglerdev.us/97WaterPolo/AOC2021
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-06 11:27:42 -08:00
2a52652163 Added console output on test cases 2022-02-06 11:26:59 -08:00
7a3d96517b Update 'README.MD'
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-05 23:04:20 -08:00
Alexander Sigler
78ab98234c Added Day 10 and 11 with test cases
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-31 13:28:15 -08:00
Alexander Sigler
e381eb3d37 Added Day 9 code and input
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-28 16:49:14 -08:00
Alexander Sigler
636616b703 Export day 8 input and changes Answer handling 2022-01-28 09:29:27 -08:00
Alexander Sigler
d3df398bda Added day 8
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-27 16:39:33 -08:00
d3c7de189b Rewrite index to swagger page
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-26 23:20:32 -08:00
5fea499da4 Include swagger in release build
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-26 23:14:36 -08:00
9294581824 Include correct version of aspnet runtime
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-26 23:10:18 -08:00
1ec1f2e0bf Added exposed ports for container
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-26 23:04:30 -08:00
abaac3051d Fixed dockerfile to copy the correct directory to the build file
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-26 23:01:16 -08:00
2994876cab Disabled auto generation of assembly info
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 22:05:23 -08:00
6271a9feb0 Drone
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-26 22:01:21 -08:00
91a652b474 Done yml change
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-26 22:00:21 -08:00
8a943f9fa2 Drone update to fix vs
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 21:58:15 -08:00
137aaae4f8 Remove files generated by dotnet test
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 21:56:01 -08:00
74db9dfe12 Fixed path seperator char for loading input text
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 21:47:55 -08:00
342b985685 Compare the file names
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 21:44:45 -08:00
3da83d1e8d Debug for file loading
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 21:40:17 -08:00
a99591fc3c Throw exception if input not found
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 21:38:55 -08:00
5593bf56c3 Debug for test project
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 21:35:47 -08:00
5cb7425124 Drone yml changes to include file.
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 21:32:15 -08:00
3521f249a7 Added test cases to build and updated CI to use proper directories when copying
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 21:18:10 -08:00
60d6a1fdcd Moved drone configuration to correct location
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-26 21:12:28 -08:00
3737ac3e93 Added docker file to create container and drone.yml for CI 2022-01-26 21:09:51 -08:00
9d0b2d4920 Add 'README.MD' 2022-01-11 23:36:55 -08:00
32 changed files with 1546 additions and 31 deletions

75
.drone.yml Normal file
View File

@ -0,0 +1,75 @@
kind: pipeline
type: docker
name: AOC2021
environment:
REGISTRY_URL: 192.168.68.63:3000
steps:
- name: init
image: busybox
commands:
- echo 'Starting build pipeline for AOC2021'
- name: test
image: mcr.microsoft.com/dotnet/sdk:5.0
commands:
- dotnet build AOC2021.Test
- cp -a AOC2021.Test/Input/. /drone/src/AOC2021.Test/bin/Debug/net5.0/
- ls /drone/src/AOC2021.Test/bin/Debug/net5.0/
- dotnet test AOC2021.Test --logger "console;verbosity=detailed"
- name: docker-tag-demo
image: debian:stable-slim
commands:
- echo "The current branch is ${DRONE_BRANCH}"
- echo "The current commit hash is ${DRONE_COMMIT_SHA}"
- echo "The image tag is ${DRONE_BRANCH//\//-}-${DRONE_COMMIT_SHA:0:8}"
- echo "The url is $REGISTRY_URL"
- echo "The url is ${REGISTRY_URL}"
- echo "The url is $${REGISTRY_URL}"
- export REPO_URL=$${REGISTRY_URL}/97waterpolo/aoc-2021-2-0821
- echo "The repo url is $REPO_URL"
- echo "The repo url is ${REPO_URL}"
- echo "The repo url is $${REPO_URL}"
- name: build-aoc-2021-2
image: plugins/docker
settings:
username:
from_secret: gitea_user
password:
from_secret: gitea_password
#registry: 192.168.68.63:3000
registry:
from_secret: gitea_registry_url
#repo: 192.168.68.63:3000/97waterpolo/aoc-2021-2-0821
repo:
from_secret: gitea_registry_repo_url
dockerfile: AOC2021/Dockerfile
insecure: true
environment:
DRONE_REGISTRY_URL:
from_secret: gitea_registry_url
depends_on:
- docker-tag-demo
- name: build-aoc-2021
image: plugins/docker
settings:
username:
from_secret: gitea_user
password:
from_secret: gitea_password
registry: git.siglerdev.us/97waterpolo
repo: git.siglerdev.us/97waterpolo/aoc-2021-2-23-25
dockerfile: AOC2021/Dockerfile
depends_on:
- test
- name: finish
image: busybox
commands:
- echo 'Finished deployment for AOC2021'
depends_on:
- build-aoc-2021

View File

@ -18,6 +18,18 @@
</ItemGroup>
<ItemGroup>
<None Update="Input\Day10_input.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Input\Day10_test.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Input\Day11_input.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Input\Day11_test.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Input\Day1_input.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@ -60,6 +72,18 @@
<None Update="Input\Day7_test.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Input\Day8_input.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Input\Day8_test.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Input\Day9_input.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Input\Day9_test.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@ -1,11 +1,8 @@
using AOC2021.Models;
using AOC2021.Tests.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AOC2021.Test
{
@ -21,21 +18,20 @@ namespace AOC2021.Test
Console.WriteLine($"Testing {request.Day} Part A, Test data");
if (!string.IsNullOrEmpty(request.Answer.Day_A_Test))
response.Answer.Day_A_Test = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = test, Version = AOCVersion.A }).Answer;
Console.WriteLine(response.Answer.Day_A_Test);
response.Answer.Day_A_Test = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = test, Version = AOCVersion.A, IgnoreLogMessages = true }).Answer.ToString();
Console.WriteLine($"Testing {request.Day} Part A, Input data");
if (!string.IsNullOrEmpty(request.Answer.Day_A_Input))
response.Answer.Day_A_Input = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = input, Version = AOCVersion.A }).Answer;
Console.WriteLine(response.Answer.Day_A_Input);
response.Answer.Day_A_Input = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = input, Version = AOCVersion.A, IgnoreLogMessages = true }).Answer.ToString();
Console.WriteLine($"Testing {request.Day} Part B, Test data");
if (!string.IsNullOrEmpty(request.Answer.Day_B_Test))
response.Answer.Day_B_Test = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = test, Version = AOCVersion.B }).Answer;
Console.WriteLine(response.Answer.Day_B_Test);
response.Answer.Day_B_Test = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = test, Version = AOCVersion.B, IgnoreLogMessages = true }).Answer.ToString();
Console.WriteLine($"Testing {request.Day} Part B, Input data");
if (!string.IsNullOrEmpty(request.Answer.Day_B_Input))
response.Answer.Day_B_Input = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = input, Version = AOCVersion.B }).Answer;
Console.WriteLine(response.Answer.Day_B_Input);
response.Answer.Day_B_Input = GetAOCDay(request.Day).ExecuteDay(new AOCRequest() { Input = input, Version = AOCVersion.B, IgnoreLogMessages = true }).Answer.ToString();
return response;
}
@ -58,16 +54,16 @@ namespace AOC2021.Test
private string GetTextInput(string day, string type)
{
var constructedFileName = $"Input{Path.DirectorySeparatorChar}{day}_{type}.txt";
foreach (var file in Directory.GetFiles("Input"))
{
var constructedFileName = $"Input\\{day}_{type}.txt";
if (file.ToLower().Equals(constructedFileName.ToLower()))
{
Console.WriteLine("Loading " + file);
return File.ReadAllText(file);
}
}
return null;
throw new Exception($"No Text Input found for {day} {type}");
}
}
}

View File

@ -6,6 +6,7 @@ using AOC2021.Test.Models;
using System.Diagnostics;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace AOC2021.Tests
@ -22,6 +23,7 @@ namespace AOC2021.Tests
[TestMethod]
public void Day1()
{
Console.WriteLine(Directory.GetCurrentDirectory());
var request = new TestRequest() { Day = "day1", Answer = new Answer() { Day_A_Test = "7", Day_A_Input = "1759", Day_B_Test = "5", Day_B_Input = "1805" } };
var result = _tester.Test(request);
Assert.IsTrue(request.Answer.Equals(result.Answer));
@ -73,6 +75,37 @@ namespace AOC2021.Tests
var result = _tester.Test(request);
Assert.IsTrue(request.Answer.Equals(result.Answer));
}
[TestMethod]
public void Day8()
{
var request = new TestRequest() { Day = "day8", Answer = new Answer() { Day_A_Test = "26", Day_A_Input = "543", Day_B_Test = "61229", Day_B_Input = "994266" } };
var result = _tester.Test(request);
Assert.IsTrue(request.Answer.Equals(result.Answer));
}
[TestMethod]
public void Day9()
{
var request = new TestRequest() { Day = "day9", Answer = new Answer() { Day_A_Test = "15", Day_A_Input = "577", Day_B_Test = "1134", Day_B_Input = "1069200" } };
var result = _tester.Test(request);
Assert.IsTrue(request.Answer.Equals(result.Answer));
}
[TestMethod]
public void Day10()
{
var request = new TestRequest() { Day = "day10", Answer = new Answer() { Day_A_Test = "26397", Day_A_Input = "168417", Day_B_Test = "288957", Day_B_Input = "2802519786" } };
var result = _tester.Test(request);
Assert.IsTrue(request.Answer.Equals(result.Answer));
}
[TestMethod]
public void Day11()
{
var request = new TestRequest() { Day = "day11", Answer = new Answer() { Day_A_Test = "1656", Day_A_Input = "1793", Day_B_Test = "195", Day_B_Input = "247" } };
var result = _tester.Test(request);
Assert.IsTrue(request.Answer.Equals(result.Answer));
}
//[TestMethod]
public void MapVsEnumberable()

View File

@ -0,0 +1,94 @@
(<[<[((<[<([<<[]()>{{}()}>({<>[]}<[][]>)])<<[{{}[]}[{}<>]]([()<>][()()])>>>]((<{{([]{})<[]<>>}(<[
<[{({[[<{[{{{<<><>><{}>}<([]()){()[]}>}({(()()){{}<>}})}{([<()()>[<><>]><<{}[]>({}<>)>)}]{{[((<>()){<>[]
[[{[[(<((<[<<{{}()}<()[]>>(<<>{}>{{}()})>]<<[[{}()](()<>)][<<>{}><[]()>]>{((<>()){{}()))}>>[{[<[<>{}
{{((({({(<[({<<>()>([]<>)}({()[]}(<>{}))}[({{}{}}([]()))<({}[])[[]()]>]](<{([]<>)(<><>)}{[[]]
[[({[{(((<(<{({}[])}((()<>)([]<>))>({{[]<>}{{}[]}}{[<>[]][()()]})){(<{{}[]}{{}[]}><([][])[<>{}]>)}><<{{{()}[
(<{([{<[([(<({{}{}}{<>()})[<{}<>>{()()}]><((<>}(()<>))>){<[[()[]](()[])]>[{<{}[]>(<>())}]}](<[({(
<{{{<({[{<<[<({}()){[][]}>[<{}{}>[{}<>]]][[(()<>)([][])]]>><{<[(<><>)]>{(<()[]><[]{}>)<<<><>>(<>[]
({{{{<<[{([(({{}{}})<[[]<>]>)])}]>>}[(<[<<<{[{{}()}]<[{}{}]>}>>{(({(<>())<()()>}(<[][]>{()()})))}){[<<([()
<(([{(<{{{{([({}{})(<>[])][[()[]][<>{}]])<[<()[]>]}}{<<{{}<>}><{<>}([][])>>{<{{}{}}<{}<>>><((){})
<(<<[([<[<({{{<>[]}<()[]>}}[([()<>]([]()))(({}<>){[]{}})])>]{({[([<>()])]})}]{[[<(<{()<>}[{}<>]>{[()[]][<><>]
{[[[((<(<[<(<[()()]>)<<<{}<>><<>[]>>(<(){}>)>>](<([<(){}><[]()>](([])))[<{{}{}}{<><>}>{<<>>{<>
[<{([{<[<<<[({[][]}<{}[]>){(()<>)<{}<>>}]><{{{[]<>}<()<>>}[(()[])[{}<>]]}(({<>[]}<{}()>)(<{}[]>([]{}))
{<[<[<<[<[{[{(()<>)}(<<>{}>[<>()])](([<>[]](<>[]))[[[]<>]([]<>)])}]><{{<{{[]<>}{{}[]]}<[<><>
[((<<{<[{<{(<[[]{}]>)}<<({()[]}[[]])<(()<>)[(){}]>>(<[{}<>]{<>[]}>)>>{[<<{()<>}]<[[]<>]({}{})>>[<[(
<<<<{[<(<[[<<{()[]}({}<>)>{{[]<>}{[]()}}>](([{()}]([(){}][<>[]])))]{[(<(()[])[<>[]]>{([]())}){(
({<[({([{[(<[{<>{}}(<>[])][<()()><()<>>]>)]}({<<<{[]{}}[<><>]>>><{((<><>))<<<>[]>{<>[]}}}([(()<>)<<>{
<(<({{[<[{<[[{()[]}]((<>()))]<[[()[]](<><>)][[{}{}]<()>]>>}]>]{<(({<((())[<>{}])[<[]<>>{<>{}}]>}<<{[<>[]]
{[([{((<({<{[{[][]}<[]{}>]{{<>{}}<{}[]>}}>[<{(<>[]){[]{}}}<{[][]}{{}}>>]}{((<[[]()]<[]>>)[[<()[]>
(<{(({[(<{{(({<>[]}[{}])[[()()][[]()]])}[{(<()()>{[]<>})(<(){}><[]()})}[(([]{})<<><>>)<(<>())<<>
<(<{<({<((<{(({}{})><(<>[])>}>[<{<<>{}>([]{})}{[<>{}]([]())}>([[()[]]<{}<>>]({[][]}<()[]>))]){<[(<{}<>
([{({([({([[[{[]{}}({}<>)]]((<{}()><<>{}>){({}[])<{}<>>})]>}{[({{(()<>){<>[]}}[<()[]>[()<>]]}<<<<
{(<<[{(<<<(<<{[]<>}<[]()>><(<>)(()[])>><{(()<>){{}<>}}>)({{(<>())[<>[]]}}<[[{}{}](()())]<{{}()}(
<<(<<{[{([{([[<>()][[]()]](<()<>>[[][]])))<(<<[]<>>>)[({<>[]})]>][<<<(<><>)(<>)>[([]{})]>>])[[{(<(<>()){[]
<<<{[(<(<[(([{{}}]((<><>)[{}<>])))<({{<>{}}[{}<>]})>]{<[<(<><>)[{}{}]>[[{}[]]({}{})]]{<[[]<>
<{(({{{[[[<([{{}[]}]({(){}}((){})))>]]<(({[{<>()}({}{})]})(((<(){}>[(){}])[{[]{}}(<><>)]))
<[[{((<{([(<<{()<>}(()[])><<[][]>>>{(<{}[]>({}<>))})<<<<()()>{[]()}>(<<>()>)>>])}>))}[<<{[<{{{{<[]<>>
({(<{<(([[({{{[]{}}[()<>])}{(((){})<()[]>)})[<([[][]][[]()]){{<>()}[[][]]}>(<(<>)<<>[]>>{[<>[]]{[](
((({(<<({<[[[{<>}[<>()]]<<{}<>>({}[])>]]<({<{}{}>[()[]]}{<{}<>>{<>()}}){[(()())<{}[]>][([]{})[[]<>]]}>>[{[<((
{[[<[([{{<[<[[<>()][{}[]]]{<<>()>{[]()}}>]{[<[<><>]<<>{}>><{<><>}<<>{}>>)[{<{}<>><<>[]>}{{<><>}}]}>{
<(<{(({([<[([([][])(()<>)]{[<><>](()<>)})((([]{})[[]()]))]([({[]()}{<>{}}){{{}})])>]{<<({<<>[]
<<{([{<[{{(({{{}()}{[][]}}<{[]()}{<><>}>){{<()[])<<><>>}[<{}[]><{}[]>]}){<<{[]()}<<><>>>{<{}{}>({}(
<[[<<(<({<([((()<>){()[]})[([][])<{}[]>]]({<<>()>((){})}([[]()]({}<>})))>})[<<{({([]())<<>{}>}{{()
<{(<[[<(<<({(<[][]><<>{}>)[<{}{}>[()<>]]}(({()[]}<{}[]>)))>[<[{(<>{}){()<>]}<[{}[]][<><>]>]>]>[<[({<
(<(([{{[<(<[<{()}{[][]}>]>{(((<>())[{}{}])<[[]]<(){}>))})>](<[(<(<[][]><<>()>){<{}[]>([]{})}>{(([]))<([]<>)[(
{((<{(({({<[{<{}<>><<>[]>}((<>{})[[][]]]]{([()[]](()()))([[]<>]{{}()})}>})(<[<<<[]{}><()[]>><<{}<>><<
{<{(<[<{[[{{{[{}()]}({()()})}((([]<>){()<>})(<<><>>))}<[{{()()}{[]()}}]>]<[((<[]()>((){}))([()()][<>
([({((([<({[[[[]()](()<>)][({}())<<><>>]]}<{<[{}<>][{}{}]>(([]<>){[]()})}[<<[]()>[{}()]>]>)<([([()
<<{({<<[{[<{<(<><>)([])>({{}[]}{[][]})}<([()()])(([]{}))>>([(<[][]>{{}<>})[[<>{}]<()<>>}]{[{{}[]}({}<>)]<[[]<
([<{[[[([[<[(((){})[{}()]){{[]<>}(()<>}}][({(){}}{<>[]})]>]])({<[{<(()<>)>({[]{}}<{}()>)}(([()()]<<><>>
([({{[<([[{<[{()[]}[<>]]({<>()})><{({}[])(()<>)}{(<>{}){{}<>}}>}]])>]<([([[{[[<>{}]{[]{}}]{<[][]]{{}[]}
[[{(({[{{[[[<(()[])[[]<>]>]{<{()[]}{()()}>{(<>[])({}[])}}](<((<><>)[<><>])([<><>])))][[[(<(
[{(<<{(((([[<<{}<>>({}())><<<>[]>[{}{}]>][<(<>[])<{}>>[<[][]>{{}[]}]]]<<(<[][]>{[]()})({{}()}<{}<>>)><([<
{<[[<{{<[[(<{{()()}<[]<>>}><<{<>}<{}{}>><<[][]>>>)<{{[()<>]{{}{}}}<({}[])[(){}]>}>]]>}<<(({{(((){}
((<([[<{{<(<([<>()]{(){}}]({[]()}<()()>)>(([{}[]]((){}))))<[{[<>{}]({}<>)}]>>}[[<({(<>())(<><>)}){([<><>][[][
<[([<(({<(([<({}<>)[()]><<[][]><<>()>>]<{([]{})}<{<>{}}{[]()}>>)){[[{[<>{}][[][]]}]<[[<>()][{}[]]]>][<[[()
((({({[[[[{{<(<><>)((){})>}}]{{[[[<>[]][<>[]]]{{()<>}[[][]]}]{{{{}{}}{<>[]}}([{}][<><>])}}({(
<<<{[<(<({[{[({}[]){()()}]}]}{[(({{}()}[[]<>])[([]<>)(<>)])]{{({()<>}{<><>})<<{}()>>}<[<[]{}>]{([]<
(({[(<<<<{((((<>{}){[]<>})[{[]<>}])(([[][]]<()<>>)<[{}<>]<[]{}>>)){(({()[]}<[][]>)[[<>[]]{()<>}])([[()[]]]<
<([<<[<<[{[[<<[][]>>{((){})[<>[]]}]((<{}{}>[[]<>]){<{}()>(()<>]})]({[(<>{})(<><>)](<(){}>[
((<{[{[[{<<((<<>{}>{<>()}){{[]()}((){})})((([]<>)<<>[]>)<(()){<>[]}>}><[<(<>[])<{}()>>]{<<
[(<[{([{<{([[(()){(){}>]{{{}<>}<[]()>}][(<()<>>[(){}])<[()](()<>)>])}({([[[]{}]({}())]({()<>}{
[<[{[<[{[[<[{([]){{}{}}}]>][[<<(<>{})<<>{}]><{{}()}>>(([{}<>]({}))[(<>{})<[][]>])]]]}]<[(({
(([{{<<{<[[(((<>())<[]{}>)([()()}(()())))[((<>()))<[{}()]({}[])>]](<{{<>}{{}<>}}>)]>[{<{{[
<<[[{<([<<<<{({}<>]([]())}({{}()}<()<>>)>[<<()()>{()()}>({()<>}[{}()])]>{<(<[][]>)>[<[{}{}]>((<>()
(<{[<[({{[[([<[]{}>[[]()]]{{{}[]}(<><>)})]<[([<>{}]<{}[]>)[<{}<>>{[]()}]]<(<<><>>(()()))<[<><>}{{}{}}>>>](
[<((<{{[(<(((<[]()>([][]))(<()<>>{{}[]}))((<{}{}><{}[]>)({{}[]}[[]{}])))<{(<[][]>)<{<>()}>}{{[()<>]}{{<>(
{((([{{((<<<<[()()][(){}]>{[[][]](()<>)}>>{{{{<><>}[[]<>]}[{<><>}({}()]]}([[<>]{(){}}][[(){}](()<>)])}>[([([[
[(({<<{([{(<[<()[]><[]()>]((<>[])[<>()])>([<(){}><<>()>]{[<>()][(){}]}))}[<[{[{}()]{()()}}(<<>>{[]})]{[<<>()>
<[{[<<({<<<[((<>()){()()})[(<>[])([]{})]]><[<([][])([]<>)>(<[]{}>(()()))][{[()[]]{[]<>}}[(<>{})<<>
((<[<[(({[{[[<<>[]]{[]()}]({()<>})]{[<<>()><{}()>]}}(<(([]{}){(){}})>{<{{}()}(()())>})]}([(<{[[][]
{(((((<({[<[{<<><>>{<>[]}}(<(){}><[]()>)]<{<{}()>(<>())}[[[]<>]{{}<>}]>>{[{<()()>[[]()]}[<{}>]]}]{
(({([{<([<{{<<[]{}>[[]{}]>({{}{}}({}<>))}<[{<>{}}{()<>}][<<>{}>]>}>{({(<(){}>[{}()])[{()<>}[()<>]]}<[{[
[[{{[<<[<((<{{{}()}<[]>}{[{}<>]<()[]>}>({[[]{}]}[([]())<[]{}>])){(<<()()>>{[{}[]]<{}{}>})})>]>>]<([<[<
{({{{{[[<{<[{[{}<>]}([[]{}][{}<>])][((()()){[]()}){[<>()](<>())}]>}>[{<[{{<>{}}({}())}[<<>{}>((
({[((<{{<<<({[{}{}][(){}]})((<[]><()()>)<{<>()}[[]<>]>)>(({<{}[]>([][])}(({}{})<<>()>))<{<[
[<<[<{[[{{(<{[[]<>)({}[])}>)}}(({{((<>[])<<><>>)}{[[[]<>]]{{[][]}<{}{}>}}}){[[((<><>)[{}<>])
(({<(<([({<(<<()<>>([]<>)>[([]()><()[]>])<[<()[]>[()()]]{[[][]]{{}[]}}>>{{<<[][]><[]{}>>{[{}[]]<<>>}}{{<[]{
([{{({({{{<([({}[])[()<>]][[[]{}]([]())])>([[[()()][<>()]]([{}[]]{{}()})]<{{[]<>}({}[])}{<()[
(<{(({(<{{[<[[()<>]{<>()}][<(){}><()<>>]>{<<<>[]>[<><>]><({}<>>>}](<<{<>[]}[[]<>]>[[[]<>](()[])]>{{{[]
[[[<[([([(({{<<><>>([][])}})[([[{}()]<<><>>])<({{}<>})<{{}}({}{})>>])])<([((<[[]<>]{(){}}>{[[]<>]<[]<>>})(
(({(<({[[<{<([{}<>]{<>()})([()()](()<>))>(((()())[{}()])({()[]}{{}<>}))}>([({<(){}>([]<>)}{[<>()]<<>>}
({{[<<{<<[<<{[()()]<<>[]>}({[]}<<>{}>)>[<<{}{}>[<>[]]><({}<>)<[]()>>]>({(<()[]>(<>[]))}[([()()][{}]){{()()}{
(<({{([{<[{(([()]<<><>>))}<<<[()][{}{}]><([][])(()())>>[[<<>[]><[]>]{[<>{}]<[][]>}]>](<(<<[]>({}())
(<{<([[[<<((([<>{}]{()[]})([(){}]{{}<>}))[[[{}<>](()[])][[<>[]](<>())]])>>([{([{<><>}<{}[]>]
<{[{[{<{{({<<({}[])><{()()]<[]<>>>><[({}[])[()()]]<[{}<>]{<>{}}>>}((({()[]}{[]<>}){[[]()]([]<>)})))
[(([[[[<<<[<{{<><>}{[]()}}[({}[])<(){}>]>(([[][]]([]{}))<{{}}(()<>)>)]({<<[]{}>{[]<>}>{[()<>}{{}}}}{{[(){}]}
{(([<{<(<{<{{<()><[]{}>}}({{{}<>}}<{<>[]}<{}<>>>)>[<([{}[]]<()<>>)(<{}{}>{()[]})><<{<>[]}(()[])>>]}(
(<((<{[[{({[([()[]]<()<>>)[<<>{}>({}[])]][<[<>[]]><{(){}}>]}[<(({})({}()))(<[]{}>(<><>))>[[([]{})[{}[
{({([[[[{<([<{{}<>}[[][]]><<<>[]><<>{}>>]{{<{}<>><[][]>}({[]{}}<{}[]>)})>{{{{[[][]]}}}}}[<[[{[{}[]][()()]
[{(<([{{{<{<({{}[]}<()<>>){<<>())[{}[]]}>{{{[][]}}[[(){}]{<>()}]}}([(<<>()><[]()>)]{({[]<>}
[<[([{<((({<{{<>{}}}<<(){}><()()>>><({()}[[]{}])(([]())[<>[]])>}))){<[{{{(()[])({}())}{{()()}{{}<>}}}[(<{}
<([({({{(({{({<>}(<><>))}{([{}[]]{{}<>})}}[{({[]<>}([]<>))[<[]>([]{})]}({[[]{}]({}())}{<{}<>
[{(({(({<[[{<[(){}](<>[])>}[[[<>()]][([][])<<>()>]]](((<<><>>[(){}])([[][]]<{}{}>))[<(<>()){[]{}}>[[()[
<<{{<[(([{[{[[<><>][[]()]]<(<>[])[[]<>]>}]<([<()[]>((){})][<{}>(<>())])>}][{(<([()()][<><>])(({
({(<({([(<[<{[{}()]({}{})}<<{}{}>(()<>)>>]>{([<[<><>]<(){}>><({}[])((){})>]{{<[]()>[{}[]]}(({}{})<
<[{<{((<{((<[([]<>)]<{{}()}{()[]}>>(((())){<[]{}>[{}[]]}))<[<<{}[]>((){})>[<()()>{()()}]]<[[(
{{{((<(([{({(({}{})({}{}))}[<{()<>}[{}()]><([]()){[][]}}])[([[()[]][[]{}]])<{({}())[<>{}]}{(<>[])}
<({[{[[{(({<(<<>>[(){}])({[]{}}<[]()>)>}<{[([]())<<>{})]{(()[])<[]>}}(<[{}{}]>(((){}){{}{}}))>)
<{[[({[{[{[([[<>{}]((){})][[[][]]{()<>}])<[<{}()>(<>{})]<<<><>>[<>()]>>][[[<[]<>>{{}<>}]<{[]{}}<[]{}>>]
(({(<((({({{<<{}()>(()<>)><<<>{}>[{}{}]>}(((()<>)(()()))(<{}<>>))}[<[[[]<>]]({[][]}[<>{}])>]){[(({{}{}}){([][
[{{<({<<{(<({<{}<>>[[]<>]}<[{}[]](()()]>)>([{{<>[]}}{([][])([][])}]))({(<{[]{}}{()<>}>([<>()]{[]{}}))
[<({[(<{{{[((<[]<>>(<>[]))([[]<>]<()<>>))(<((){})>)]}}}>{{<([<[<()[]>{{}<>}](([]())[[]<>))>]{(({[][]}<<>(
([(({<([{({<(([]<>)(()[])){<()()>{<>()}}><([[][]]<()<>>)[[[][]]<()<>>]>}[{[{()[]}(<>[])]([<>[]]<<>()>)}])
{{{([<[([{(<[{[]()}<[]{}>]>)}])<<<<({(<>())<{}()>})[{({}[]}{<>[]}}<<[]<>><{}[]>>]><(<[()<>

View File

@ -0,0 +1,10 @@
[({(<(())[]>[[{[]{<()<>>
[(()[<>])]({[<{<<[]>>(
{([(<{}[<>[]}>{[]{[(<()>
(((({<>}<{<{<>}{[]{[]{}
[[<[([]))<([[{}[[()]]]
[{[{({}]{}}([{[{{{}}([]
{<[[]]>}<{[{[{[]{()[[[]
[<(<(<(<{}))><([]([]()
<{([([[(<>()){}]>(<<{{
<{([{{}}[<[[[<>{}]]]>[]]

View File

@ -0,0 +1,10 @@
6111821767
1763611615
3512683131
8582771473
8214813874
2325823217
2222482823
5471356782
3738671287
8675226574

View File

@ -0,0 +1,10 @@
5483143223
2745854711
5264556173
6141336146
6357385478
4167524645
2176841721
6882881134
4846848554
5283751526

View File

@ -0,0 +1,200 @@
bgafcde gfcd agc ebdgac adfceb bafeg efgca cgdfae cg ecadf | fabgced gc agc cdfg
gbdacfe gcabfd cdb dcfba bfacg cgad fadeb feabcg cd gcbfed | bdagcef dcb cdag gbfca
dgcbafe dbfca fbaed be cedb gefad dcfeab facdgb eba gbface | eb gadfcbe cfbad gfbeca
ebc cb aedbf agcef badecg gaebfc bcgf adbcfge ceabf daecgf | cb bce efdab ecbaf
fedbc cebad gfcbd fec gcdfab ecbfga dacgbfe gfed fe gefbdc | bfecag cef egdf fgde
bafedc baefg dbfga daegcb gae egbcfa eg cefab fgce decbafg | abdgf cgfe cedgba befga
dcba fagbed cgbfed dgfbeac da dag acbgde fcaeg becgd acgde | agd bacd dga gbecad
ec aebgcfd fecd bagfec efagd edfgab cgdfea dgcab ecdga eac | ce ec ce gbacefd
aegdbfc fe dacbf aefbgd aecgb cdfe ebadcf ecbfa cbfdga aef | dfce fe fcde afebdgc
bgaf gcbad cagdfb gb dfbeca degfcb bfadc cfgeadb bdg agcde | fdegacb acbefgd bdg gafb
gdecba dcae ec dbfeag bgead dgbce gec cgefab dcbgefa cdbfg | afdbgce agbfde abcgefd ec
gacbefd fgbedc egafdc adf fcbae afedb ad bfeadg adbg dfgeb | ad degcfa ad dfbge
fadebc baef eadfcg ebgdc eda cfgabd afbdc ea edcab cdgbefa | aefb ead ea ebaf
badgecf caefd aebfdc fecbdg fadcg fed de ebad abgecf bceaf | ed gcfebd aebd gfdca
bcdae aefcbg fgdea bf cdabegf adcebf fcbd fbead afb begadc | gbcafe faegbc fba eabdc
bfcdeg ecd eabgc adeg ed dbaec bcfad ecabfg dbgcfea dbacge | de bdfcaeg ecgfbd bcdea
deacf bf eagfdb gfecadb facbeg bfa cbdage abfce fbcg gecab | aebcf ecfagb abegfd bgeac
eag dgbecf gdfae caed dfebgca ea ebcgfa dfbag gecfda dgcfe | ae ea deac fcdega
edbga egdabc cgfdbe gabfe efcdgab gbdefa fb abdf fbg gecfa | cgaebd cbgdea acgfe begdca
cgfedb egbdc agcfd cdagb eabgdf ab abce adb agcebfd dabegc | ba bda abd deagfb
fc agfbce fdebg dgafeb ebfdc cbf cfedgba fdcg gcefdb eacdb | gbfaec fgcbed gbceafd bedagf
bdcgefa acdfbe ed gbcea cfgbad ecbda edfcag afcbd ead bdef | dfbe de dea dea
gfbeca gcefdb fegacd cgbda fbde ed bgedc begcf agdcefb ced | gbacd ced dec bcegfd
dgbacf gfabec agd egdaf badcegf ad ecgaf defgb cade dfegca | cdae dga bgcaef ad
dcf cfadb bcagd afebd fbgdec egfcbda fcea gfeabd fc ebdfac | gabdc ebfad aefc eacbdf
cfgdba fcdab cgfbade adeb afdebc egcfdb de aedfc cfage edf | ed eadb dgebcf cefdabg
bcae befga dgebfc fbagce cbefg agb fcedgab ba bdgacf dgfae | beca dcaegbf gab geafb
dgafbec fedba cbega aebfdc eabfdg bdgfce edc fdac cd adceb | abedf dfeabg dc gdbefc
adegfbc gbedcf cfabd gacedb abcfe fdbacg dgabc df dfga bfd | fdag dbf dafg fd
dfbcag ebfcad ed agecdb bfacd egbfa badfe afbcegd aed cdef | afebd ecdf cfed eadfbgc
fca dbcaf ebdcf fadbg cdbefa adec ac dacbgfe fbcdge cgefba | ac edca edac ca
agdfce cedbfag agc dcbaeg gc bcdga bgdfa cfaebd ebdac cbge | ceadb becg ebadc gc
aefbc aecdg efgcad cdebag bcg agfdbc bceag bdge bg fecdgab | bgecda bcdaeg gb caebf
cfgebd acedf ag gbad gcfbad acg bgecfa bdfcg gbadecf cdfga | dgba dgcbf gac bgfdc
cdgbafe cdgbe gd agde bcaged dfebc geacb cdg bgeacf gbdcfa | efgcba edag gecfdba cgd
bcg bcaf cegdaf dfacg dgacb fgcebda bgdcaf efbcgd bc gadbe | gcb bcg caebdfg cfab
eg cdgfae aecfd fgbaedc gbdfc facdeb cfegd ceag efg efdgab | fge acefbgd egf efg
fcdg gefda cf edabc cedgfa cfa acefd cfebadg gdbafe bgecfa | fc fca cfabged fca
ed bcadegf egdfb fgcdb edbafg facbeg abegf deba fadgec dge | eadb ged eadb adfegb
bgedc cf cefadg ecbgdf gbfae cbdf fcg ecbgad abfgced becfg | bdcf dbceg fgcbde cdbeg
cg gcaf defcag cdefg gdafe dgfabe gec dabegfc bcegad ebdcf | feadg degcf gcaf dcgefa
fdeac gdcebf daecbg bgfec fdeagbc gca gecfa aefcbg fbag ag | ga decfagb ag agfb
bc fbdc bagecdf gfdcab acdgb dcaeg dbgfa cgbaef ebgfda gbc | bdfc cb cfbd fbcd
efagc bafegd abecg eab eb fgbeca gbedcfa bfec fcgade cgbad | abfgdce degacf fcaebg cdabfeg
egbfcd afde ecgab fac fa edabcf cbdagfe afbec cfabgd fdebc | deaf feda cgbdfa fa
gbafd defca ebcf eb cefbad dcebag dcgfae edfab deb bgedcfa | be deb gdbafce be
afdgceb cf gbdeaf acdbfe abcef acf deafb fedgac cdbf cgeba | fac cfdb bdfcae fdcb
cfdba ca afbgd eabc cda afbcdeg cfedb ecfgbd efcgad bcfeda | bfgad abec abce caeb
cfebad debfacg acgfeb cab fedcb afcdb cdae febcdg ac dgbaf | bac ca faecbgd cgbfae
eg dfcegb dge abedcgf facdg bafdgc degacf dafeg agec adebf | egd fegda fedbcag eagdf
age gcbad feacb cgbdfae ge gfbe agebc fcadeg cbafde cgebaf | fagecdb bfeg baecg fceabd
bfcdge fgcbead ebdgac ba dagbfe gab dabc bcegd gface cebga | cbda gbedc egcbafd gab
dbcegfa fadceg fcage bcage gb bdagfc abdec gbfe bgafce bcg | ebfdagc ebfg ebgf egfb
gcdefa bagf dgebf bdefc bgcafde dbefga edabg gfe gf dcgeba | fg efg agfb gebfd
fabdc gdeabf dag gbace adcgb gd eagfcb gaedbc egdfabc egdc | adgbc bcadf gd cedfabg
deagcf ce dfcaeb gfadceb bgade cde daegc cgdafb gadcf efcg | dbaecf fdecbga ce ecd
dfcbag abceg db dgcefa dabec bcegdaf cdb bdef defac cfbdea | gdafec dcb febd bdef
ead fgceabd edgcaf da fgda fgcea ecdgb cgaed fdbace cbagef | ad eafcdb bfecagd ad
ab caefg agbcef efacb gecdfba ecfagd fbdec bdecga cba fgab | eafgc abfg cdagbfe dcageb
afbcge ebafcgd dacegb cfbea afbg agc egcfa ag cgdfe bdceaf | adfbceg fagb gfba aecgbf
acg cdegbf ecfadg cgdab fcbadg cdbgfae ca agedb cbgdf facb | cdeabfg ca afbc dagfec
dca dbfae bagdcf aceg ac afdegc cegfd fcedgb cbdaegf cedfa | dac acge cedgf cfdbgae
gdcafe ega cgbfde cgba afdbe bacegd ga begdc dcebagf edgab | abgc ga bacg bdacge
begfda gdafce fg gdbf gbaced agf decagbf aebdg gabfe cebfa | fag acdbeg agcdfe dgbefca
gfcdbea fecab cbadge afgce gc fgdace fdcg cga eagdf eagbfd | efgacbd gc dgfc dacbeg
gdbefc feadg dbagef afd abde gebfd cefga bdgafc da efdacbg | cbegfda adf bade cdgfbe
aefbdgc eabcfg cgefa degbf cedfg cd cadg cde fgecad fecadb | dbfegca egcdabf gcda dc
baed bcgda abdegc decag ega dgbfaec gacbfe ae cgfde dbacgf | aebd age ea bgdecfa
abecg faegcd egfcd efcga cdaf baedgf efa fcbaedg fcgedb fa | afe af aef fa
abgfce cbedgaf fbedc eacdfb dcf fd faegcd fecba dfba gdceb | faecdg gdceb dfc gcbde
fgce fgadb egdabc edg defbg eg bfced fdbace bdfgeac gbcfde | gdcbfea deg afbedc dgcaeb
eg dgcfe efdgab bfdec aecg acbegfd bdcafg adcfg efg daefgc | fge aecg gfe ecagfdb
acdfe bedcfg abgec cfeabd aedbfcg fecdag fg fcg afecg gdaf | cdaefg fdag cgf gadcfbe
aedc gbdac cbagfe bfdcg gdbfea acb cbgaed ac eadgb gecadfb | gbfdc gbdaec fbgeadc decabg
gbc afgdb cfbdga badgef gadbce egabcdf geacf bcdf cb gabfc | fgaec fcagdeb gbcfa bc
cfgabd cfdbe eafgdc badcfeg dgfab cbag eafbdg gc dfgbc cdg | fagecd cgd afdbge cg
eadcbf fcag gc gbc gadcefb gebad febdgc egcbaf ecbag bacef | dgbfec egadcbf gcfa bcegfda
acbeg acgedb eg dgbfce cdagb cgdbaf gaed bafce cfebadg ecg | dbgac eabcf eabfdgc eagd
bgefda eacg abdcfe eabcd abegcd ebg cbedg cbfdg dgfecab eg | ecag eg ge afebcd
dgecbf bg dfcba abge gadebc edagc bcg ecdfga fbgecad bgcad | cgb gbea ebgcdf gbae
dcabg gdfbca debc aed ed fabeg afdecg gbeda caegbd agbfcde | fcbdgea cedb dea efcdagb
edbcafg cgaed gc gbdc acfebd cge gceabd abecd afegd bgafce | gc facegbd edbcaf cg
gadbce gbdaf acebgf bd abcgfd edfga cdfb gbd cfgab dgafbce | gfdab fdegbac eabcfdg bgcdae
eacgf fb cegbdf dgbfca cfb dfba agfcb cgabd ebcdgfa gedacb | acbdg dbaf ceafg bf
gebac egdacf fdceg daef af gfa dagfbc fcgbead afgce cebfgd | afg bcage gcdeabf cgfea
cdabfg fgbec gcdafe ceafgb egc ec beac febdg bdegcfa fabcg | cafegdb beca ecgbfa bace
gda feabdg ebgaf bgdfc bgfcae bfeagdc edab ad adgbf fceagd | gad ad afgbde dfaebg
bfc bgfced edbfag fcea cf afgbdce cgbda abgef fcgba aebcfg | bcf efac eacf fc
bdeag bgdcf ec ebgdfac gcbde gaec dec cafdeb afdebg cebdag | gcbfd agedb acfdbe ecd
befad gd edgbf bcgafd cebgfd abgcef gfd ecgd cgdfaeb ecfgb | cegd cdeg efadbgc egcdbaf
gfdbae bc cegbfd gadcf cdaefgb gfbed fbcgd beagcd gbc becf | gedcfba edcagb fbcgdae cfbe
ecf cbdaf bdfcaeg fagdec efba bcdfe bfecda gcedb ef cbadgf | ef fbedc dbceg edgfcab
cabde ae ecfdba cbdfe faed dabcg cfbgaed gbfcea begdcf abe | adfe aeb cabgd ae
gefcabd ecabd gebafc ag ecfgbd gacdbf dfcbg fdga cagbd acg | gebcadf gefbac dgaf dagf
bgde efcgd cebgfa dbacgf cgfeb gdc fdaec dfbceg gd fegcadb | efbcadg cgd gbdcfa facebg
gefcbd bgfdcea fg dcbag fbgcd fgeb defcag fcg becfad dfcbe | cefbda cfg fegbdc fg
bcfed bcfdge aedbfg fad decbfa facge cdba efdca ad dbfagce | eabfgd fadce begfdca gecdbaf
edfgbca dbega fdb gfecab fd ebcfda cfda feabd becfa edgbfc | df ebgad cabegfd adcf
daegbc fbacg edfg befdac efbcd edafbgc cdg bcgfd fdegcb gd | dg becdf dbeafcg gadefcb
egdacf gde ed dfebcag acgdfb cfadg agebdf cgeab gecda dfce | fedagc gabfecd eadgfbc cfgebda
dfcea afbde fdgac gefbac eabcdf ace bced ec ebagfd adgbcfe | ce fcdga baecfg cea
adebg gdfcae gb acegd abg begc bdaef bfgcda dgaefbc abgdec | bg cbafgd ecbg gba
bfacde egfadcb cb fcdea eacbf cedb dcgeaf bgadfc abc ebgfa | adfebc dceb bdcafe efdac
faegbd dgfce dcgafe fgadecb bcgd bcfge bfaec gb cdbfeg fgb | aecfb fbg fcgade dafgbec
fgacbe fc ebcadg agfdb fdbca cagbdfe cdfe abcde fcb bfacde | cabed cfde bfdac dgbaf
defabc gfcbe fea bdacfg adgecf fabce ae aebd bfecdga cdafb | fea ea bgfaced bead
dfgae dcafe dce dgebfca abfcd ecab bfcdea gcfebd gafcbd ec | bcdagf cde gbedcfa bfdace
cea gaedfb acdf ac ebacgd gefdabc befda cfbae egcfb efcabd | gcaebfd cbaef dfac ca
gebac befadgc bedcgf cgb gc eagbdc cebaf cadg bgfaed aegdb | cbg cbg cbgadef acdg
gfcdeb bfdegca beac befda bcf dcfga fbcda cb adecfb gbefda | fbc dbafc cbf cfb
cbdfeag becagf acgeb be cgbda gfcdbe efba acfeg ecb eadgcf | aebf eb bagcfe eb
febg aecbdg fedacb ecg ge fbgaedc dfgce afcgd fcbed efcdgb | aedcbg baegcfd ecg bedcf
bcfedg gdbcae febd fcbag fgbcd bd ecdgfa dbc fdcagbe gdcfe | efgbadc fcbedg abfecgd cgbedf
feagc cb dcgeabf fadbgc cgfdae fbdea feagcb bcafe cbeg bac | bgce bc cgadbf cba
efagbd dageb dcgbeaf gc acg gdecab gecd fdbca gbcfea acbgd | eagbd egfabcd gfbace gca
ae cgae dea eacgfd fadgc gfebd afdcbe dfeag acbfgd dacbgef | dgbafc cbdfgae ae ead
egb gcfe abcfdeg begfcd abcdfg dabec eg bdfcg edgcb bedagf | bdecg beg gbdcef dbeac
fcgae dfcebag aefdb geacbf cda dagbcf cd adcfe fedacg gdce | bcdafg adefb fdeba gecbfa
afegd gadfb fcgadeb gbcade gdabef cefgad dfbe bdg fagbc bd | dabegc bfgca bd dgb
dfceba faecd bd afbedgc ebad fcadb bafgc dcb efgdcb gfaedc | faedc bead egcdbaf bd
cgb bdcfeg cg gdbeca cgef gdbcfea febdg fdcgb dafgeb bacfd | cgfe cgb gc gfec
cadgfb cefdbag cg begacf dfgbea bgc adgbf bgcad fdgc eabcd | cg fgceab ebdacgf ecbdgaf
bgdefc decfg cfedga cefgb bfdcea edgfacb bgcd fegba ceb cb | cfgbe dcaefg cbgfe dbcg
gefbda acde gcbaf cd cfd bdcgfae daefg gdcbfe cgefad agdcf | gcebafd efgcda cfd aecd
gedfc cead egbfda fgcdabe de fcgea gfdbc deg cagdef gebacf | deg bfgead gdfbc gde
fbgae bfecg dbcaef gdcaeb cbfdge gbc decgbfa edbfc fdgc gc | gc gbcdef fdcg gfcbe
fc caf cadbe dgabfc gebdfa fecg fagbe cebaf acbegdf cgabfe | egcf ceagbf gcfe ebgafc
abfcd cgbfa bcgafd gadefc abfde cdf dc agfbced cbegfa gcbd | cd cfd fgeacd cdf
bdgae gfbce cbagfd gedbcaf ebcgd gbcefa dc fcde cegdfb dbc | dcegb fgdcbea deabcfg bdc
ebcagf df bgcdefa fdceba cgdf dbacgf eadbg afd abgcf gabfd | ceagdbf dagcbf fd dcfbaeg
dga cadbgef efbcgd bgdca eacd cedbga gdbec gdeabf fbacg da | dag adg edac edgcb
febcg gbadce aedbcf acbed cbgae cag gadb degbcfa ga fcgdae | bgad abdgfec acbed acg
gdcaf dcbfag gdefa abcdg bcfg cf fedgacb dbaegc fcedba afc | cf afc gcfb eafdgbc
gdcaef gcabfd bcefgda cde gcdfb gbecfd ec dfaeb cefbd egbc | egbfdc ce gbdcfa afbcgd
fdea fga fa adcgbef abfcge gbeda fagdb abedgc cgbdf bdefag | fa gaecfb beadgc cbfgd
ba gcbafd decgba bfga fbadc bda dfbeacg ecfgbd cedfa fdbgc | gfab gbdfc adb ba
bd ecdgab aedfg bde fbcae decfba cgafbe fdeab dbfc fdgceba | db dbe cdfb bdgfaec
bd gcefbd ebcd dafbgc ebfgd decgaf edcfg fbd fbaeg gafcdbe | cbeagdf cebd cedb cedb
edagf cdaefbg ead efgdb bgafed cfdag bfea dabgce dfbceg ae | gcafd feab dgfca feba
gecfda bgcdf ba abd edgabf bcdeaf gedfa fdbga baeg abegcdf | ab bad bda fgebcda
egadb bec dbefga cbafg cageb ce ebdgca dceg gdebfca cfbead | ec ebc egdc ecb
cbgfe fadcbg agde cbdge egdacb degcabf bed faebdc ed dcabg | eadg facdbe bcdeg debfac
fabe fb bgf edcgaf bgacd bcfegd fcdegab adgef afbdg gbfade | bfg dbcgfae edacbgf bf
bcdfe becgd cbafegd decag geb dgfb bfcade dgcefb bg gfbaec | bdgce gb dcbge gdfb
egcadf bfg fgbdac faedg ebaf gcedb begdf fb adfebg cafdgeb | faedbcg bafcgde bf becgd
edafgb ecbgd gcdfaeb ef gbfadc cgfade gef fdegc fgcda efca | agfecdb dcabgef ef dgcaf
cbdgea fegcad bagdc abdfgc age gebac afbcdge egbfc adeb ea | ae ega ecagbd gbacd
ecdfb edafbc fe afdcb efc degcb aedf acbgfd ecgfab fecabdg | fe dbegcaf fe cedgfba
edbfgc caeb ca cbdafg bcdge bgcdae edfga eacgd gca cgabfed | facebdg ca aedbgc ac
gfeba aegc cbfega ea bea dfgbe edfacgb fadgbc gbafc aefcdb | gbecfda bcdfag gcea afcegdb
fgcea dc egfdba cdafe gfdecb fbaedc ebdfa dacb bdafgec dec | ced bcfdaeg cefda fagcbed
dbefa defacg agd dcbfg bdfagce ga efgbdc abgc fdgab bacfdg | cbga dga gedcfab fdabcg
eacbf eac dfagbce cfga fbgea ca bfced agebdc fbedga fcbega | dabfgce gfca ebfacg gbaecf
cfagb cgfdea gdc agfcbe fdeacbg bcfdg dg badg fdgacb bcdef | cgd gfacb gd gdba
cfga gbadef decabfg cbged baefcd ca cda dbagf fdbcag dbgca | afgebdc bdgeaf gafc cfag
cgfbd cdafgb gbcead dbg afdb bgecf adfcg ecbgdfa bd gdacfe | fgacd cgdfa bdaf dbg
abf fb febd dbafg febcga gbead egdacb fedgba fbagdce gdcaf | bf fb dbceafg fba
fd dgfabe ecafdg deabcg cbefa fed dbgea bdefa bgdf dbfgeca | fde bdfg fdgb gfeabcd
fgeadb abfed dgfbcea bafgd agcfd gfb bdfaec bg dgbe cegbaf | egdb fegadbc dcgaf bg
fdabc acfbgde dg fcage cdfgab dfebag dga gdafc cdgb eafbcd | gfcad aegdcbf dag afbdc
dbfe efdag fgdcae cgbfaed bgfead acebg fb bgf egabf abfcdg | ebdf gfb ebfd fgabed
bafegd egcfadb fbc bc fcebgd becaf afbed agecf beacfd bdca | cb dbca cfb afgbcde
gbefdc bfead gfcdab gbedca fc cabegdf bedfc fdc cefg cgbde | fdbceg cgfe fc bdcaefg
fg dbfea fedagbc cageb aecfdg dfgb dbfaec gafbed begaf gaf | gfecad dgcfea dafeb gfbd
dabfg eb egacdfb bfcdga faedc gdeb fbagec aeb bgefad dfeba | bafdcg gfbda gebd be
adb dgeabc bfdg gaecfd afdgc cbdgfa bd dcgeafb dafbc bafce | bd fcagbde defagcb dbfg
fge bagcf dfaebg fgebc eg cdeg fabcedg bedcf dfcegb acfbde | egcd ecgd cebafd cgdaefb
bafdgc gecabf caegf ae beaf gfacb decgf cfedbag aec cdabeg | dcfge ae egcdafb eca
fcgba ebgaf agefd agcdfb beac gdbcfe beg bcdfgae gacfbe eb | cfebgd abecdgf ceab abcfdge
abcgfd bac feabd adcgeb fcgb bc debgcfa fbdac gceafd fagdc | fbcg gcfad afbed cfbda
afdbegc dea abegd agecbd afbgdc dgbfe cabgd afcbed ceag ae | daecbfg cdbag acge ea
ebdcg cbfg cdgebf bge adbec eabgdf baecfdg fgadce gedfc bg | dcbae fbcg beg gfbc
cfbga cefabg ebfca abeg ae bcedfga gbacfd eac bdefc dcafge | abge fedbc bacgf eac
eb aedcg dbfcge cegdbaf gfbe bed dagcbf dacebf dcfgb dbceg | gbef dbe fegb eb
cgfe ced dgeba ce cegad abedcf cdaefg cfagbd cadfg gbcedaf | ecgad gcabefd dfbcgae ce
dbagc afdc dgfaeb bcfage gbedfac cafbdg cdgeb ac cab gdafb | cab dafbcg dacf acdgfeb
dgbae bfa eafgb bafegd fgaec bcfadg fb dbfe egbadc gbecadf | cdegbfa dagfcbe fdeb fab
be aecgdf gbdacef bagfc bdef beagf beg dbefag gedfa cbgade | be eb afegb beg
cfdagb ac gcfdae cbad bfgda bcfedga begcf afc ebafdg cfbga | deagcf abdc ca cagfb
eg efdbga adbcfg ebfcga aefgd bdfga adcbgef defac gbed gae | edbg gedb bfdeag dbcgaf
bacegf gbfca cfa ceab gafeb ca gcfdb gadfec dbafge gbdfaec | caf fbgedac fca afc
fbagde cbeg afecg gdaecbf fedcga gab efacbg gb acbfg cfdba | gba ecbg agb abgcf
abfg dafcgb gcafd bdcgaef ab cba ebdcf bgdaec cfaegd fcbda | acb ecadbg cgdabe fgab
agcbd cegdba feagb fd daf gbfad bacdfg cgdfabe dcefab fgcd | df dagbc fgcd fd
gdfeabc bcd debaf cb gedfab bcefd edfgc bdceaf aecb cdgbfa | ebac beac cbea abce
cbgdef eg beg dbgfc bfgcead gbefd efcg edgbca eabfd acbfdg | gbe gbe cefg gbe
fedg begcad gdb bafdge gd egbcaf gdbaf bfacd eacgdbf eafgb | cbefag baegf gefcdab bedgac
gbce dcafgb agfdceb efdac acg agcfe aefgb befagd cegfab gc | fbedgac abdefg cga cag
gabc bceadf agfcd agd ag fcdgbea gabdef gedfc dbcfa agbfdc | gacb gad bgceadf cbgafde
afedc fabced gfcbed feb cegdbaf dbfa ebfac dacfeg fb gbace | feb afdb ebf acfde
cbed edgcf ecabdfg ceg cfbgd abgfdc gebfdc ec efbagc gedfa | ec decb ecdb gec
egd gfbeac gedcb de dabgfe dcfbg cbefdag eadc dcegba acegb | ed adgfceb gde abcged
efadcgb fbdce fagedc agebfd gbafe abedf da bgad ead ceagbf | efagb ecdbf ade aebcgfd
cgeb bfaed cbedga cbaed bc bca afgcbd dgface bgfecda decga | fgadcb bca dabfe cab
dgaec deagcf egf cdeabg abgdf gdfceab dfcbeg gfead efac ef | agebcd efdbcag aefc bgefcad
fbeac gebcaf efa fgce bgfdea dgbcfae gcbdea adcbf ef egacb | gebfacd bfadcge ef eagbc
acdbgfe adfg edfcbg efacb egacf gca dgaceb egdcf ga gefcda | fdga cfgae cga ga
dfebcg gdaebf dagcf gbaecd dcgebfa bf cfbe bgf bgdce fdbgc | cgbefd bcfe gbf ecbf
dcafeg ca acf fcdeb abcfdge facdgb bfagd dfaegb bagc dfbac | dfabgce dfaegc gbafde bacg
cgefb cbe cfab afdbeg cb faebg gcfde cefbag ebadgc afdbgec | egbdcfa cbe cafb fecagbd

View File

@ -0,0 +1,10 @@
be cfbegad cbdgef fgaecd cgeb fdcge agebfd fecdb fabcd edb | fdgacbe cefdb cefbgd gcbe
edbfga begcd cbg gc gcadebf fbgde acbgfd abcde gfcbed gfec | fcgedb cgb dgebacf gc
fgaebd cg bdaec gdafb agbcfd gdcbef bgcad gfac gcb cdgabef | cg cg fdcagb cbg
fbegcd cbd adcefb dageb afcb bc aefdc ecdab fgdeca fcdbega | efabcd cedba gadfec cb
aecbfdg fbg gf bafeg dbefa fcge gcbea fcaegb dgceab fcbdga | gecf egdcabf bgf bfgea
fgeab ca afcebg bdacfeg cfaedg gcfdb baec bfadeg bafgc acf | gebdcfa ecba ca fadegcb
dbcfg fgd bdegcaf fgec aegbdf ecdfab fbedc dacgb gdcebf gf | cefg dcbef fcge gbcadfe
bdfegc cbegaf gecbf dfcage bdacg ed bedf ced adcbefg gebcd | ed bcgafe cdgba cbgef
egadfb cdbfeg cegd fecab cgb gbdefca cg fgcdab egfdb bfceg | gbdfcae bgc cg cgb
gcafb gcf dcaebfg ecagb gf abcdeg gaef cafbge fdbac fegbdc | fgae cfgab fg bagce

View File

@ -0,0 +1,100 @@
9987653234589654549865432101235789979765459832101234567943986543101239874321012932397319985214896543
9898541015678943239876973876545699868954398765212345678932399654592345965432129891985498764323789432
9765432126789654123998765987897789759893219894333656789543498986989957898543498789976579895454678943
9879656737899797434589986798998897646789398989454789898959987899876899987654989678899699976565789656
8998767945678996545678997999569965435678987678967897947898765698765678998799878466798989988676898777
7679898998799987676789398998439876323999876567898976736569894329954569789987964345987878999788999888
5569959349898799787892139987321987549898765456789765623478989497542345699876543239876567898999998999
4398943245999659898993045996210499698759876345678954212349876989321234589876455123954453567899987897
6997832134678945959889159895432349999898763234567894303456965878943445678954321019843212456789976995
9876543265789434345678999789943498899987654126898985424579854567894578789986532129654325677899854789
9987654378894321256789987687894997789976543245789876539798768978965989897898763298767534798998765699
9998867459943210167899976576789876678898674689894988798999899989876999976987654349879545899999876789
8989978967894345234989895434598985568789788799933299987988989999987899895498765767989656987899987890
7679989878965976349876789323987654345699899899321012976567678998998998789329876878998767896789899951
6567895999876765498765678912396543236899956978932129854323567897899989698934998989679878945698789543
4367896989989896989824567893459874345789543569549299765434579945799877567895789997543989432397678954
6456789678998989873213678994598765456795432678998989879765678936998765456789896789732394321234589899
7867894569987678965302759789679876567894321799997878998976789029876744348978945699901298636346698778
8998923459876567973212345698789997678965433899876768987897899998765432124567934989893397545458975667
9769212598765459895463456789894398789877549998765656346789998769876545635688949879799498656867894356
9854324987654346789654577899943239899988698999854341247898987653987678986799198765678999987978965457
9985459876532235678968688987652124989998796598763210123567897632598789987891019654569998798989976768
9876598754321014567999799999873015678999987679874331234898998543469893498989198543456989659497899879
4987999865432323456789899998754123789687798798765765345789239754567912989678976432345678943236910989
3999998978543476567896978899875234896545679969896889656890198765678909876549876321234567894345899894
9899987987654587678965356789986346789639889345987992987999349989999999995434965430999698995456789763
8789995398765698789643235894398956998798999239899893998978969999898989984329876999878989976568997654
7679876219876789896542129901239899889897778998765789879569998998787878965510999876567678987879998795
6569997901989891987843458913498788778976667897654678965456987997676567894323987955476567898989989989
5498789892399932398954567894987654567895456789642567894235695987543478999499876545313456789899876567
6987678789999543459987678959876543679932378996543456965123984399864569998989985432101239898798765456
9876546679898954567999789546987621767891567789654587893239973298765678987879876543212345995697654367
9965434569767895978999893234598832348932345698765698954398764569976789656568987654323476789987743256
8954323698956789899998942195679953567893478999876799965499865678989896543459999866455678999976551045
6561012987545698788987893989998769878987567896987899896989987889298985432198754986566789678985432136
7432123498699987667896789878899989989987679975699989689678998994367965321096563497678994567986544357
6543434679987893459945698766789994597899789654599876575569899765459876432985432398989323456987655456
7654545689876789967897987655679913456789898765989975433456789876767989949874321019998910127898767667
8965656798765667898998986543489894768998999899879874321387899989898998899865432125987891238989898798
9878969899874356789999997432356789899567899999867965434458989999999987678976743434976989349876999899
4989878998543235678989854321247895912456789998759876545789678949899998789987854589865878998785679978
3497989987654146789679765432346954323457991987643987856894589439789769893498767679764567987654598767
2356799998763259895434996566459899496567890987732298997893499998698954902999898798943458976543987656
1345998759998768999323987878698798989698999896521019498902578896587893219899999987654569998651098945
2349887646789878998909998989789657478989298765432329399312456789476789399789999898765878979732129857
3498765434899989987898999999896545365679109876543498989423969893345995987678989769876989569843598767
4599894323987899876667899899987621234568914997656987878944878932239894598547568978989895479955679878
5689989210196998765456789789876210145679323498979766567895989210198795987832456899998794398766789989
6799878923965449887567895698765421234789459989898753456789994345989689976541368954989689239877899999
7899769999874335998789989899876532365678998876789866567899985459878599987430267893976578999988998989
8998958989910126999895678916998645466989897665789877689939876598766469898521256799865456789799987879
9987847768921237899934689105679656567898786544598999994324987987654349765432345987674347889659876567
9876426457892357998925693223998769779987654323987887889212998998743234978545469876544235678998765458
8765212346895468987998789339899878989876543105986455678929899999832123987676569998432123789989896345
9893101287896778956789895498799989294987654219875334599998798987654016898987978987654234599868987456
7654242398969889545678976987689990123499864329883223678998657998762145679398989398766345678956897678
8765357899954995434569989876578921934987986598761019999999736799763234789239799219875458789345999789
9876459987899894323678998875467899895976797987652128789989945689654756894345678998986567891239899899
9987699896798789434789897654323456789985698976543234567968896798765897895656799997897678910198776999
8998988765667678945896789876212345699996789987654345678959789989878998976767899976798989321987665678
7999876554354588996945679877103456789869899898765458789345678969989329987878999865659796499895434789
6789987432143456789439998765213467899953998769896569994234569658991012998989998764546679987654323890
5679896541012345799598789874327878969892987654987678996545678967989129879099876543234567899795434891
4598765432123569898987678985456789459789898743498789989756789879878998765146998732125698901989545789
3759986543234678987656589876769898698657789992109899978997894998767899943237984321016989992978956897
2349898757655989898743456989899999998745678989234998868789923499656798895349875432234678989867897896
3498769898767995679754687894999899899987789878976987654689934987543236789767976543345689876546789965
5957656999898994889898798943499789789998898769897998743476899876432125698978989954496898765435789954
9843545989919989998989899954987679678969987658789876532545899976521034567899999795987999876323567893
8732135678909878967879999899995564599357897645679987621236798765432145678978988689999899943213679954
7643014789998765456568998788994323788969919876798768730345679896543267989569876578998798654323789875
8654123898999654345457897656789515677896323987898654321656789987655358993459875467987698765434892996
8766234567898743212345789534994323456965434598989765442767895698767467892398764345696549876545993989
9874345678999832101234679423989434699799565989679877653458954349878878921987653234986539987656789878
9965657899298743212345894212878945987678976976547989765669765689989989439876543123497698998767899764
9876798921019654323456982104567899866567899867435699878878998799997699545998653234598987899889998943
3989899892198767434569877323456998753467997654526789989989219989876578976789854447679996867995387891
1298956789299878565678965434567897542346789643214567999894329878964347897899965557798765456894216789
0987645898989989678789876545878965321578998759323456999765498767894256798949876678987654345892105899
2698766987678997989898987856989954320789869898937599878978987856943145789432988989998743236789324678
3499989898598965397997698967898765434899754997999987567899876645894235699921299096999984345679434567
9988998765467893236789579989999887545678975986878976458998765434689346789890932125789965456796545678
8976899754359992125679456799999999698789876795467891367999986323478956896799843234699878767899696899
7895789973298989014568967898989439899994987984356910179898797212667897975689754348789989878998789999
6434890989987878923699878987678921999893499878268899298789598601457898954579765678895699989349899678
5423921298756867895789999896569890198789989862156788965678987542356789343467999789934989993210998569
8737893989943458976799998765476789987679876545034567894589999753478993212979878992129878994921987678
9656794979899569987999899654345679876543987632123478943499898764589432109898769994939769789892998989
8767999868767989799898698765476789999432499843234569654986789878997643498789356989898654698789899194
9879898657657895698795439876987899987654678954545678999875688989019759569653239876789543987698789012
6998775432348894239679921997898978998767989876789789789654567899998967898764699865678952986567678929
5987654321256789197598799998929867899898999987899897698973456789787978979978989976789769878454567898
4598763210368898986487678999213456789949989998921954567892567998656899754989978987899879764323678986
3459875391239897697396568789428589890129878999530123678943688974545799843499867898963989875214567895
2345965485446797543212345678937678932398767985432654789764569763234899754998756789642199932108678914
1459879876568999852101267899548789654987659876543465999875678954356999879877645678921019853219989103
2345989987879998763254345678959898767899536987754576789986789765456895998763234599934329764324598912
3589996598989899854395456789967999878998745699865679896597897987587894309854123578896449895434567893
4678965409599798765986577899878986999899656789986789965498986987698963219767012456789567976545998954
5789654312345679876897689910989754346798787891099899876899765698999654397654323767897689987656899865

View File

@ -0,0 +1,5 @@
2199943210
3987894921
9856789892
8767896789
9899965678

View File

@ -4,7 +4,6 @@ namespace AOC2021.Test.Models
{
public class Answer
{
public string Day_A_Test { get; set; }
public string Day_A_Input { get; set; }
public string Day_B_Test { get; set; }
@ -21,14 +20,14 @@ namespace AOC2021.Test.Models
{
Answer a = (Answer)obj;
string failedAnswer = string.Empty;
if (!Day_A_Input.Equals(a.Day_A_Input))
if (!isValidAnswer(Day_A_Input, a.Day_A_Input))
throw new Exception($"Failed Day A Input ({Day_A_Input}) vs ({a.Day_A_Input})");
if (!Day_A_Test.Equals(a.Day_A_Test))
if (!isValidAnswer(Day_A_Test, a.Day_A_Test))
throw new Exception($"Failed Day A Test ({Day_A_Test}) vs ({a.Day_A_Test})");
if (!Day_B_Input.Equals(a.Day_B_Input))
if (!isValidAnswer(Day_B_Input, a.Day_B_Input))
throw new Exception($"Failed Day B Input ({Day_B_Input}) vs ({a.Day_B_Input})");
if (!Day_B_Test.Equals(a.Day_B_Test))
if (!isValidAnswer(Day_B_Test, a.Day_B_Test))
throw new Exception($"Failed Day B Test ({Day_B_Test}) vs ({a.Day_B_Test})");
if (string.IsNullOrEmpty(failedAnswer))
@ -39,5 +38,12 @@ namespace AOC2021.Test.Models
return false;
}
}
private bool isValidAnswer(string lInput, string input)
{
if (string.IsNullOrWhiteSpace(lInput) && string.IsNullOrWhiteSpace(input))
return true;
return lInput.Equals(input);
}
}
}

View File

@ -5,7 +5,12 @@ VisualStudioVersion = 16.0.31515.178
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AOC2021", "AOC2021\AOC2021.csproj", "{1C97C7BD-E112-4CC4-B870-BCEE6146C707}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AOC2021.Test", "AOC2021.Test\AOC2021.Test.csproj", "{00B6E578-8E4E-4722-A601-A8CEE90704E1}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AOC2021.Test", "AOC2021.Test\AOC2021.Test.csproj", "{00B6E578-8E4E-4722-A601-A8CEE90704E1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{124C7B74-D961-41F1-AF3D-6601591EB410}"
ProjectSection(SolutionItems) = preProject
.drone.yml = .drone.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -3,15 +3,9 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Models\Day1\**" />
<Content Remove="Models\Day1\**" />
<EmbeddedResource Remove="Models\Day1\**" />
<None Remove="Models\Day1\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />

View File

@ -5,5 +5,6 @@
</PropertyGroup>
<PropertyGroup>
<ActiveDebugProfile>AOC2021</ActiveDebugProfile>
<ShowAllFiles>false</ShowAllFiles>
</PropertyGroup>
</Project>

View File

@ -26,6 +26,10 @@ namespace AOC2021.Controllers
[Route("day5")]
[Route("day6")]
[Route("day7")]
[Route("day8")]
[Route("day9")]
[Route("day10")]
[Route("day11")]
public AOCResponse Day(AOCVersion version, [FromBody] string input, bool IgnoreLogMessages = false)
{
AOCRequest request = new AOCRequest() { Input = input, Version = version, IgnoreLogMessages = IgnoreLogMessages };

70
AOC2021/Days/Day10.cs Normal file
View File

@ -0,0 +1,70 @@
using AOC2021.Models;
using AOC2021.Models.Day10;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AOC2021.Days
{
public class Day10 : AOCDay
{
private List<ChunkReaderResult> _results;
public Day10()
{
_results = new List<ChunkReaderResult>();
}
protected override AOCResponse ExecutePartA()
{
foreach (var line in GetSplitInput())
{
_results.Add(new ChunkReader(line).Process());
}
var illegalScore = 0;
illegalScore += _results.Where(x => x.isCorrupted && x.CorruptedChar == ')').Count() * 3;
illegalScore += _results.Where(x => x.isCorrupted && x.CorruptedChar == ']').Count() * 57;
illegalScore += _results.Where(x => x.isCorrupted && x.CorruptedChar == '}').Count() * 1197;
illegalScore += _results.Where(x => x.isCorrupted && x.CorruptedChar == '>').Count() * 25137;
this._response.Answer = illegalScore;
return this._response;
}
protected override AOCResponse ExecutePartB()
{
foreach (var line in GetSplitInput())
{
_results.Add(new ChunkReader(line).Process());
}
var incomplete = _results.Where(x => x.isIncomplete);
var totalPoints = new List<long>();
foreach (var inc in incomplete)
{
var total = 0L;
foreach (var c in inc.CompletionString)
{
total *= 5;
total += GetPointValueForCompletion(c);
}
totalPoints.Add(total);
}
this.Answer = totalPoints.OrderBy(x => x).ToArray()[totalPoints.Count / 2];
return this._response;
}
private int GetPointValueForCompletion(char c)
{
switch (c)
{
case ')':
return 1;
case ']':
return 2;
case '}':
return 3;
case '>':
return 4;
}
throw new Exception("Invalid char for Part B: " + c);
}
}
}

167
AOC2021/Days/Day11.cs Normal file
View File

@ -0,0 +1,167 @@
using AOC2021.Models;
using AOC2021.Models.Day11;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AOC2021.Days
{
public class Day11 : AOCDay
{
private static readonly int BOARD_SIZE = 10;
public Octopus[,] _board;
public Day11()
{
this._board = new Octopus[BOARD_SIZE, BOARD_SIZE];
}
protected override AOCResponse ExecutePartA()
{
CreateOctoBoard();
int totalFlashes = 0;
PrintBoard("0");
for (int i = 1; i <= 100; i++)
{
//Initial energy assumption
for (int x = 0; x < BOARD_SIZE; x++)
{
for (int y = 0; y < BOARD_SIZE; y++)
{
_board[x, y].IncreaseEnergy(i);
}
}
//Energy propagation with the flash
totalFlashes += Propagate(i);
PrintBoard(i.ToString());
}
this.Answer = totalFlashes;
return this._response;
}
protected override AOCResponse ExecutePartB()
{
CreateOctoBoard();
int totalFlashes = 0;
PrintBoard("0");
int i = 1;
while(true)
{
if (DidAllFlash())
{
Log("Found case where all Octopus flashed at " + (i - 1));
this.Answer = i - 1;
break;
}
//Initial energy assumption
for (int x = 0; x < BOARD_SIZE; x++)
{
for (int y = 0; y < BOARD_SIZE; y++)
{
_board[x, y].IncreaseEnergy(i);
}
}
//Energy propagation with the flash
totalFlashes += Propagate(i);
PrintBoard(i.ToString());
i++;
}
return this._response;
}
private int Propagate(int step)
{
int totalFlashes = 0;
while (AnyLeftToFlash(step))
{
for (int x = 0; x < BOARD_SIZE; x++)
{
for (int y = 0; y < BOARD_SIZE; y++)
{
if (_board[x, y].CanFlash(step))
{
_board[x, y].Flash(step);
totalFlashes++;
foreach (var t in GetSurroundingCoords(x, y))
_board[t.Item1, t.Item2].IncreaseEnergy(step);
}
}
}
}
return totalFlashes;
}
public bool AnyLeftToFlash(int step)
{
bool flash = false;
for (int x = 0; x < BOARD_SIZE; x++)
{
for (int y = 0; y < BOARD_SIZE; y++)
{
if (_board[x, y].CanFlash(step))
{
flash = true;
break;
}
}
}
return flash;
}
private bool DidAllFlash()
{
for (int x = 0; x < BOARD_SIZE; x++)
{
for (int y = 0; y < BOARD_SIZE; y++)
{
if (_board[x,y].EnergyLevel != 0)
{
return false;
}
}
}
return true;
}
private void PrintBoard(string s)
{
Log("Step " + s);
for (int i = 0; i < BOARD_SIZE; i++)
{
string line = "";
for (int j = 0; j < BOARD_SIZE; j++)
{
line += _board[i, j] + " ";
}
Log(line);
}
}
private void CreateOctoBoard()
{
int row = 0;
foreach (var line in GetSplitInput())
{
for (int col = 0; col < line.Length; col++)
{
_board[row, col] = new Octopus(Convert.ToInt32(line[col].ToString()));
}
row++;
}
}
private List<Tuple<int,int>> GetSurroundingCoords(int x, int y)
{
var positions = new List<Tuple<int, int>>();
for (int i = -1; i <= 1; i++)
{
for (int j = -1; j <= 1; j++)
if ((x + i >= 0 && x + i < BOARD_SIZE)
&& (y + j >= 0 && y + j < BOARD_SIZE))
positions.Add(Tuple.Create(x + i, y + j));
}
return positions;
}
}
}

49
AOC2021/Days/Day8.cs Normal file
View File

@ -0,0 +1,49 @@
using AOC2021.Models;
using AOC2021.Models.Day8;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AOC2021.Days
{
public class Day8 : AOCDay
{
protected override AOCResponse ExecutePartA()
{
var count = 0;
var uniqueNumberOfLineSegments = new int[] { 2, 4, 3, 7 };
var lines = GetSplitInput();
foreach (var line in lines)
{
var displayedDigits = line.Split("|")[1].Trim();
foreach (var digit in displayedDigits.Split(" "))
{
if (uniqueNumberOfLineSegments.Contains(digit.Trim().Length))
{
Log($"{digit} has a length of {digit.Length} which is unique.");
count++;
}
}
}
this._response.Answer = count;
return this._response;
}
protected override AOCResponse ExecutePartB()
{
var sum = 0;
foreach (var line in GetSplitInput())
{
var inputNumbers = line.Split("|")[0].Trim();
var outputDigits = line.Split("|")[1].Trim();
var ssdGenerator = new SSDGenerator(inputNumbers);
ssdGenerator.Generate();
var digits = ssdGenerator.ConvertToNumbers(outputDigits);
sum += Convert.ToInt32(digits);
}
this._response.Answer = sum;
return this._response;
}
}
}

122
AOC2021/Days/Day9.cs Normal file
View File

@ -0,0 +1,122 @@
using AOC2021.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AOC2021.Days
{
public class Day9 : AOCDay
{
private int[][] _board;
private int _rowCount, _colCount;
protected override AOCResponse ExecutePartA()
{
CreateBoard();
int riskCount = 0;
var lowPoints = FindLowPoints();
foreach (var lP in lowPoints)
{
riskCount += 1 + _board[lP.Item1][lP.Item2];
}
this._response.Answer = riskCount;
return this._response;
}
protected override AOCResponse ExecutePartB()
{
CreateBoard();
var lowPoints = FindLowPoints();
var basinCount = new List<int>();
foreach (var lP in lowPoints)
{
var basin = GetBasin(lP.Item1, lP.Item2);
basinCount.Add(basin.Count());
Log($"LP: {lP.Item1},{lP.Item2} has a basin size of {basin.Count()}");
Log(string.Join(" ", basin.Select(bP => "(" + bP.Item1 + ", " + bP.Item2 + ")")));
}
//Order by int then take the top 3, and then multiple them together.
var product = basinCount.OrderByDescending(x => x).Take(3).Aggregate((total, next) => total * next);
this._response.Answer = product;
return this._response;
}
private List<Tuple<int,int>> FindLowPoints()
{
var lowPoints = new List<Tuple<int, int>>();
for (int x = 0; x < _rowCount; x++)
{
for (int y = 0; y < _colCount; y++)
{
var surround = GetSurroundingPositions(x, y);
bool isLowest = true;
foreach (var t in surround)
{
if (_board[x][y] >= _board[t.Item1][t.Item2])
isLowest = false;
}
if (isLowest)
{
lowPoints.Add(Tuple.Create(x, y));
Log($"{x},{y} is a low point with value {_board[x][y]}!");
}
}
}
return lowPoints;
}
private List<Tuple<int,int>> GetSurroundingPositions(int row, int column)
{
var positions = new List<Tuple<int, int>>();
for (int i = -1; i <= 1; i+=2)
{
if (row + i < _rowCount && row + i >= 0)
positions.Add(new Tuple<int, int>(row + i, column));
if (column + i < _colCount && column + i >= 0)
positions.Add(new Tuple<int, int>(row, column + i));
}
return positions;
}
private List<Tuple<int,int>> GetBasin(int x, int y)
{
List<Tuple<int, int>> basin = new List<Tuple<int, int>>();
AddBasin(Tuple.Create(x, y), basin);
return basin.Distinct().ToList();
}
private void AddBasin(Tuple<int,int> point, List<Tuple<int,int>> list)
{
foreach (var t in GetSurroundingPositionsThatAreNotNine(point.Item1, point.Item2).Except(list))
{
list.Add(t);
AddBasin(t, list);
}
}
private IEnumerable<Tuple<int, int>> GetSurroundingPositionsThatAreNotNine(int row, int column)
{
var positions = GetSurroundingPositions(row, column);
return positions.Where(x => _board[x.Item1][x.Item2] != 9);
}
private void CreateBoard()
{
var rows = new List<int[]>();
foreach (var line in GetSplitInput())
{
var columns = new List<int>();
foreach (var c in line)
{
columns.Add(Convert.ToInt32(c.ToString()));
}
rows.Add(columns.ToArray());
}
_colCount = rows[0].Length;
_rowCount = rows.Count;
_board = rows.ToArray();
}
}
}

23
AOC2021/Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["AOC2021/AOC2021.csproj", "AOC2021/"]
RUN dotnet restore "AOC2021/AOC2021.csproj"
COPY ["AOC2021/", "AOC2021/."]
WORKDIR "/src/AOC2021"
RUN dotnet build "AOC2021.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "AOC2021.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS=http://+:80
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "AOC2021.dll"]

View File

@ -12,7 +12,7 @@ namespace AOC2021.Models
protected AOCResponse _response;
protected ILogger _logger;
private List<string> _debugMessages;
protected object Answer { set { this._response.Answer = value; } }
public AOCDay()
{
this._response = new AOCResponse()

View File

@ -12,7 +12,7 @@ namespace AOC2021.Models
[DataMember]
public DateTime Date { get { return DateTime.Now; } }
[DataMember]
public string Answer { get; set; }
public object Answer { get; set; }
[DataMember]
public bool Status { get; set; }
[DataMember]

View File

@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AOC2021.Models.Day10
{
public class ChunkReader
{
private Stack<char> _stack;
private string _inputLine;
public ChunkReader(string line)
{
this._inputLine = line;
this._stack = new Stack<char>();
}
public ChunkReaderResult Process()
{
var result = new ChunkReaderResult() { Line = this._inputLine };
foreach (char c in this._inputLine)
{
//Implies its an opening char so we sent to stack
if (isOpeningChar(c))
{
_stack.Push(c);
continue;
}
if (_stack.Peek() == GetCorrespondingChar(c))
{
_stack.Pop();
}
else
{
result.CorruptedChar = c;
result.ExpectedChar = GetCorrespondingChar(_stack.Peek());
result.isCorrupted = true;
break;
}
}
if (!result.isCorrupted)
{
if (this._stack.Count == 0)
result.isValid = true;
else
{
result.isIncomplete = true;
while (_stack.Count() > 0)
{
result.CompletionString += GetCorrespondingChar(_stack.Pop());
}
}
}
return result;
}
private bool isOpeningChar(char c)
{
if (c == '(' || c == '[' || c == '{' || c == '<')
return true;
return false;
}
private char GetCorrespondingChar(char c)
{
switch (c)
{
case '(':
return ')';
case '[':
return ']';
case '{':
return '}';
case '<':
return '>';
case ')':
return '(';
case ']':
return '[';
case '}':
return '{';
case '>':
return '<';
}
throw new Exception("Invalid char given, no corresponing char found for: " + c);
}
}
}

View File

@ -0,0 +1,14 @@

namespace AOC2021.Models.Day10
{
public class ChunkReaderResult
{
public string Line { get; set; }
public bool isValid { get; set; }
public bool isIncomplete { get; set; }
public string CompletionString { get; set; }
public bool isCorrupted { get; set; }
public char CorruptedChar { get; set; }
public char ExpectedChar { get; set; }
}
}

View File

@ -0,0 +1,39 @@

namespace AOC2021.Models.Day11
{
public class Octopus
{
public Octopus(int initialEnergy)
{
this.EnergyLevel = initialEnergy;
}
public int LastFlashedStep { get; set; }
public int EnergyLevel { get; set; }
public void IncreaseEnergy(int step)
{
if (step != LastFlashedStep)
EnergyLevel++;
}
public bool CanFlash(int step)
{
if (EnergyLevel > 9 && step != LastFlashedStep)
{
return true;
}
return false;
}
public void Flash(int step)
{
LastFlashedStep = step;
EnergyLevel = 0;
}
public override string ToString()
{
return EnergyLevel.ToString();
}
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AOC2021.Models.Day8
{
public enum SSD : int
{
_,A,B,C,D,E,F,G
}
}

View File

@ -0,0 +1,330 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace AOC2021.Models.Day8
{
public class SSDGenerator
{
public static string ZERO = "abcefg";
public static string ONE = "cf";
public static string TWO = "acdeg";
public static string THREE = "acdfg";
public static string FOUR = "bcdf";
public static string FIVE = "abdfg";
public static string SIX = "abdefg";
public static string SEVEN = "acf";
public static string EIGHT = "abcdefg";
public static string NINE = "abcdfg";
private string _numbers;
private Dictionary<SSD, SSD?> _lookup;
private Dictionary<SSD, List<SSD>> _possibleLookup;
public SSDGenerator(string numbers)
{
_numbers = numbers;
_lookup = new Dictionary<SSD, SSD?>();
_possibleLookup = new Dictionary<SSD, List<SSD>>();
foreach (SSD ssd in Enum.GetValues(typeof(SSD)))
{
if (ssd != SSD._)
_lookup[ssd] = null;
_possibleLookup[ssd] = new List<SSD>();
}
}
public string ConvertToNumbers(string numbers)
{
var number = "";
foreach (var segments in numbers.Split(" "))
{
var constructedDigit = "";
foreach (var seg in segments)
{
foreach (var l in _lookup)
{
if (l.Value == GetProperCode(seg))
{
constructedDigit += GetProperCode(l.Key);
break;
}
}
}
number += ConvertToDigit(constructedDigit);
}
return number;
}
public void Generate()
{
var one = GetPossibleNumbers(ONE).First();
var seven = GetPossibleNumbers(SEVEN).First();
var AcharDiff = CharDiff(one, seven);
_lookup[SSD.A] = GetProperCode(AcharDiff); //We found the A value
_possibleLookup[SSD.C] = GetPossibleSSD(one); //Can also be #1 or #7 with AcharDiff as removed valued
_possibleLookup[SSD.F] = GetPossibleSSD(one); //Can also be #1 or #7 with AcharDiff as removed valued
//We know that #4 shares two of the same segments(C & F) as #1/#7. So we can remove possible values for that
var four = GetPossibleNumbers(FOUR).First();
//Remove all possible segments for C/F and assign what is left to B/D
_possibleLookup[SSD.B] = GetPossibleSSD(four, _possibleLookup[SSD.C].Select(x => GetProperCode(x)).ToArray());
_possibleLookup[SSD.D] = GetPossibleSSD(four, _possibleLookup[SSD.C].Select(x => GetProperCode(x)).ToArray());
//We have finished the unique digits. Now we move onto digits that have multiple possible values.
//Now we address the ones with 5 segments, #2, #3, #5. They all have the same possible numbers, so just use #2 as lookup
var twoThreeFivePossible = GetPossibleNumbers(TWO);
var simplifiedTwoThreeFive = twoThreeFivePossible.Select(x => RemoveKnownSSD(x)).ToArray();
var possibleValuesForSegmentDG = FindInCommon(simplifiedTwoThreeFive);
_possibleLookup[SSD.D].AddRange(GetPossibleSSD(possibleValuesForSegmentDG)); //Since D already has possible lookups, we add more
_possibleLookup[SSD.G] = GetPossibleSSD(possibleValuesForSegmentDG);
DeducePossibleLookups(); //Since we have overlapping possible values, we deduce the correct ones and simplify
//Now we address the ones with 6 segments, #0, #6, #9. They all have the same possible numbers, so just use #0 as lookup
var zeroSixNinePossible = GetPossibleNumbers(ZERO);
var simplifiedZeroSixNine = zeroSixNinePossible.Select(x => RemoveKnownSSD(x)).ToArray(); //Remove all known values
var possibleValuesForSegmentF = FindInCommon(simplifiedZeroSixNine); //F segment is in common with 0, 6, 9.
_lookup[SSD.F] = GetProperCode(possibleValuesForSegmentF[0]); //Its a single char since its the only one in common with all 3 digits
DeducePossibleLookups();
}
private void DeducePossibleLookups()
{
var reRunDeduce = false;
//Remove any possible lookup that have matched to lookup
foreach (var lookup in _lookup)
{
if (lookup.Value != null)
{
_possibleLookup[lookup.Key].Clear();
}
}
//Remove from Possible lookup any values that are already looked up.
foreach (var pL in _possibleLookup)
{
foreach (var lookup in _lookup.Where(x => x.Value != null))
{
pL.Value.Remove(lookup.Value.GetValueOrDefault());
}
}
//Duplicate possible value check (implies the duplicate value is correct one)
foreach (var pL in _possibleLookup)
{
var duplicateCount = pL.Value.GroupBy(x => x).Where(y => y.Count() > 1).Select(y => y.Key);
if (duplicateCount.Any()) //Means we have a duplicate entry for one of the possible and it means THAT is the correct value
{
_lookup[pL.Key] = duplicateCount.First();
pL.Value.Clear();
reRunDeduce = true;
}
}
//If there is only one possible value implies that it is the answer
foreach (var pL in _possibleLookup)
{
if (pL.Value.Count == 1)
{
_lookup[pL.Key] = pL.Value.First();
pL.Value.Clear();
reRunDeduce = true;
}
}
//Indicates 6 / 7 values are found, meaning the next unused value is it.
var lastOne = _lookup.Where(x => x.Value == null).Select(x => x.Key);
if (lastOne.Count() == 1)
{
var selectedValues = _lookup.Select(x => x.Value);
foreach (SSD ssd in Enum.GetValues(typeof(SSD)))
{
if (ssd == SSD._)
continue;
if (!selectedValues.Contains(ssd))
{
_lookup[lastOne.First()] = ssd;
break;
}
}
}
if (reRunDeduce)
DeducePossibleLookups();
}
private string[] GetPossibleNumbers(string searchingNumber)
{
var possibleNumbers = new List<string>();
foreach (var number in _numbers.Split(" "))
{
if (searchingNumber.Length == number.Trim().Length)
possibleNumbers.Add(String.Concat(number.OrderBy(c => c)));
}
return possibleNumbers.ToArray();
}
private string RemoveKnownSSD(string s)
{
var knownSSDs = _lookup.Select(x => x.Value);
var retVal = "";
foreach (var c in s)
{
if (!knownSSDs.Contains(GetProperCode(c)))
retVal += c;
}
return retVal;
}
private string FindInCommon(string[] values)
{
var retVal = "";
var charArrays = values.Select(x => x.ToCharArray()).ToArray();
var initial = charArrays[0];
foreach (var c in initial)
{
bool contains = true;
for (int i = 1; i < charArrays.Count(); i++)
{
if (!charArrays[i].Contains(c))
contains = false;
}
if (contains)
retVal += c;
}
return retVal;
}
private char CharDiff(string s1, string s2)
{
string diff = "";
var high = s1.Length > s2.Length ? s1 : s2;
var low = s1.Length <= s2.Length ? s1 : s2;
foreach (char c in high)
{
if (low.IndexOf(c) == -1)
diff += c;
}
if (diff.Length != 1)
throw new Exception($"Char Diff has value {diff} for {s1} and {s2}");
return diff[0];
}
private List<SSD> GetPossibleSSD(string value, params char[] removedChars)
{
var retVal = new List<SSD>();
foreach (var c in value)
{
if (!removedChars.Contains(c))
retVal.Add(GetProperCode(c));
}
return retVal;
}
public void PrintOutLookup()
{
foreach (var e in _lookup)
{
if (e.Key == SSD._)
continue;
Console.WriteLine($"{e.Key}: {e.Value}");
}
foreach (var e in _possibleLookup)
{
if (e.Key == SSD._)
continue;
Console.WriteLine($"P_{e.Key}: {string.Join(", ", e.Value)}");
}
}
public string GetProperCode(int x)
{
if (x == 0)
return ZERO;
if (x == 1)
return ONE;
if (x == 2)
return TWO;
if (x == 3)
return THREE;
if (x == 4)
return FOUR;
if (x == 5)
return FIVE;
if (x == 6)
return SIX;
if (x == 7)
return SEVEN;
if (x == 8)
return EIGHT;
if (x == 9)
return NINE;
return "";
}
public SSD GetProperCode(char c)
{
c = c.ToString().ToLower()[0];
if (c == 'a')
return SSD.A;
if (c == 'b')
return SSD.B;
if (c == 'c')
return SSD.C;
if (c == 'd')
return SSD.D;
if (c == 'e')
return SSD.E;
if (c == 'f')
return SSD.F;
if (c == 'g')
return SSD.G;
return SSD._;
}
public char GetProperCode(SSD ssd)
{
if (ssd == SSD.A)
return 'a';
if (ssd == SSD.B)
return 'b';
if (ssd == SSD.C)
return 'c';
if (ssd == SSD.D)
return 'd';
if (ssd == SSD.E)
return 'e';
if (ssd == SSD.F)
return 'f';
if (ssd == SSD.G)
return 'g';
return ' ';
}
private int ConvertToDigit(string s)
{
char[] characters = s.ToArray();
Array.Sort(characters);
s = new string(characters);
if (s.Equals(ZERO))
return 0;
if (s.Equals(ONE))
return 1;
if (s.Equals(TWO))
return 2;
if (s.Equals(THREE))
return 3;
if (s.Equals(FOUR))
return 4;
if (s.Equals(FIVE))
return 5;
if (s.Equals(SIX))
return 6;
if (s.Equals(SEVEN))
return 7;
if (s.Equals(EIGHT))
return 8;
if (s.Equals(NINE))
return 9;
return -1;
}
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AOC2021.Models.Day8
{
public class SSDNumber
{
public SSDNumber()
{
}
public bool[] Layout { get; set; }
public bool Finalized { get; set; }
}
}

View File

@ -5,6 +5,7 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using Microsoft.AspNetCore.Rewrite;
namespace AOC2021
{
@ -45,11 +46,13 @@ namespace AOC2021
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "AOC2021 v1"));
}
app.UseHttpsRedirection();
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "AOC2021 v1"));
var option = new RewriteOptions();
option.AddRedirect("^$", "swagger");
app.UseRewriter(option); //Default to swagger
app.UseRouting();
@ -59,6 +62,7 @@ namespace AOC2021
{
endpoints.MapControllers();
});
}

1
README.MD Normal file
View File

@ -0,0 +1 @@
Alexander Sigler's attempt at AdventOfCode 2021 TEST