diff --git a/2018_06/Program.cs b/2018_06/Program.cs index debb326..4fb4cf6 100644 --- a/2018_06/Program.cs +++ b/2018_06/Program.cs @@ -13,7 +13,7 @@ namespace _2018_06 static void Main(string[] args) { string[] resTab = File.ReadAllLines(@"..\..\..\Data\Adventofcode_181206\2018_06_data.txt"); - List> koords = new List>(); + List> koords = new List>(); Tuple tuple = null; foreach (string v in resTab) { @@ -23,31 +23,40 @@ namespace _2018_06 } int points = 0; - int al = 999+999, bl = 0; - int a1=999, a2 = 999; - int b1 = 0, b2 = 0; + int a=0; + int b = 0; foreach (Tuple tp in koords) { points++; WriteLine($"point {points}, X: {tp.Item1} Y: {tp.Item2}"); - if (tp.Item1 + tp.Item2 < al) + if (tp.Item1 > a) { - a1 = tp.Item1; - a2 = tp.Item2; + a = tp.Item1; } - if (tp.Item1 + tp.Item2 > bl) + if (tp.Item2 > b) { - b1 = tp.Item1; - b2 = tp.Item2; + b = tp.Item2; } } - WriteLine($"low value: {a1},{a2} high value: {b1},{b2}"); + WriteLine($"max value: {a},{b}"); ReadKey(); + + } + + public string ChNumber(int i) + { + const string nbr = "ABCDEFGHIJKLMNOPQRSTUVXYZ"; + var cnbr = nbr.ToCharArray(); + string tmpSvar = ""; + + + + return tmpSvar; } } }