Mellanläge sparar (byter maskin)
This commit is contained in:
@ -13,7 +13,7 @@ namespace _2018_06
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string[] resTab = File.ReadAllLines(@"..\..\..\Data\Adventofcode_181206\2018_06_data.txt");
|
||||
List<Tuple<int, int>> koords = new List<Tuple<int, int>>();
|
||||
List<Tuple<string, int, int>> koords = new List<Tuple<string, int, int>>();
|
||||
Tuple<int, int> 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<int,int> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user