Browse Source

initial state after day 7

main
Luna Lailatova 3 years ago
commit
089cc4671a
  1. 12
      day1-2.py
  2. 14
      day1.py
  3. 21
      day2-2.py
  4. 19
      day2.py
  5. 47
      day3-2.py
  6. 24
      day3.py
  7. 60
      day4-2.py
  8. 53
      day4.py
  9. 1001
      day5.output.txt
  10. 75
      day5.py
  11. 42
      day6-2.py
  12. 16
      day6.py
  13. 24
      day7-2.py
  14. 23
      day7.py
  15. 2000
      input.txt
  16. 1000
      input2.txt
  17. 1000
      input3.txt
  18. 599
      input4.txt
  19. 500
      input5.txt
  20. 10
      testdata5.txt

12
day1-2.py

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
f = open('input.txt', 'r')
input = f.readlines()
count = 0
for i in range(len(input)):
input[i] = input[i].strip()
input[i] = int(input[i])
for x in range(len(input) - 3):
a = input[x] + input[x + 1] + input[x + 2]
b = input[x + 1] + input[x + 2] + input[x + 3]
if a < b:
count += 1
print(count)

14
day1.py

@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
f = open('input.txt', 'r')
input = f.readlines()
pre = 999999999999999999999999999999999999999999999
count = 0
for i in range(len(input)):
input[i] = input[i].strip()
input[i] = int(input[i])
print(len(input))
print(input)
for x in input:
if pre < x:
count = count + 1
pre = x
print(count)

21
day2-2.py

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
from os import readlink
f = open ('input2.txt', 'r')
input = f.readlines()
forward = 0
depth = 0
aim = 0
for i in range(len(input)):
input[i] = input[i].strip()
for i in range(len(input)):
direct, amount = input[i].split(" ", 1)
if direct == 'forward':
forward += int(amount)
depth += aim * int(amount)
if direct == 'down':
aim += int(amount)
if direct == 'up':
aim -= int(amount)
x = depth * forward
print(x)

19
day2.py

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
from os import readlink
f = open ('input2.txt', 'r')
input = f.readlines()
forward = 0
depth = 0
for i in range(len(input)):
input[i] = input[i].strip()
for i in range(len(input)):
direct, amount = input[i].split(" ", 1)
if direct == 'forward':
forward += int(amount)
if direct == 'down':
depth += int(amount)
if direct == 'up':
depth -= int(amount)
x = depth * forward
print(x)

47
day3-2.py

@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
f = open ('input3.txt', 'r')
inp = f.readlines()
oxy = 0
co = 0
for i in range(len(inp)):
inp[i] = inp[i].strip()
inp2 = inp
for i in range(12):
if len(inp) == 1:
break
zero = 0
one = 0
for line in inp:
if line[i] == '0':
zero += 1
else:
one += 1
if zero <= one:
inp = list(filter(lambda line: line[i] == '1', inp))
else:
inp = list(filter(lambda line: line[i] == '0', inp))
for i in range(12):
if len(inp2) == 1:
break
zero = 0
one = 0
for line in inp2:
if line[i] == '0':
zero += 1
else:
one += 1
if zero <= one:
inp2 = list(filter(lambda line: line[i] == '0', inp2))
else:
inp2 = list(filter(lambda line: line[i] == '1', inp2))
print(inp, " ", inp2)
for i in range(12):
if inp[0][i] == '1':
oxy = (oxy << 1) + 1
else:
oxy <<= 1
if inp2[0][i] == '1':
co = (co << 1) + 1
else:
co <<= 1
print(co," ", oxy)
print(co * oxy)

24
day3.py

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
f = open ('input3.txt', 'r')
inp = f.readlines()
ones = [0] * 12
zeroes = [0] * 12
gamma = 0
epsilon = 0
for i in range(len(inp)):
inp[i] = inp[i].strip()
for line in inp:
for i in range(len(line)):
if line[i] == '1':
ones[i] += 1
if line[i] == '0':
zeroes[i] += 1
for i in range(len(ones)):
if ones[i] < zeroes[i]:
gamma <<= 1
epsilon = (epsilon << 1) + 1
else:
gamma = (gamma << 1) + 1
epsilon <<= 1
print(epsilon * gamma)
print(gamma)
print(epsilon)

60
day4-2.py

@ -0,0 +1,60 @@ @@ -0,0 +1,60 @@
import re
def check(cards, num):
for i in cards:
for x in i:
for t in range(5):
if x[t] == num:
x[t] = None
#print(cards)
def bingo(cards):
rv = set()
for i in range(len(cards)):
counter = 0
for x in cards[i]:
# print(x)
if x[0] is None and x[1] is None and x[2] is None and x[3] is None and x[4] is None:
rv.add(i)
for t in range(5):
counter = 0
for x in cards[i]:
if x[t] is None:
counter += 1
if counter == 5:
rv.add(i)
return list(rv)
nums = [4,75,74,31,76,79,27,19,69,46,98,59,83,23,90,52,87,6,11,92,80,51,43,5,94,17,15,67,25,30,48,47,62,71,85,58,60,1,72,99,3,35,42,10,96,49,37,36,8,44,70,40,45,39,0,63,2,78,68,53,50,77,20,55,38,86,54,93,26,88,12,91,95,34,9,14,33,66,41,13,28,57,29,73,56,22,89,21,64,61,32,65,97,84,18,82,81,7,16,24]
f = open('input4.txt', 'r')
cards = []
card = []
score = 0
for i in f:
i = i.strip()
if len(i) == 0:
cards.append(card)
card = list()
continue
t = list(map(int, re.split('\s+', i)))
card.append(t)
if len(card) > 0:
cards.append(card)
for z in nums:
check(cards, z)
bing = bingo(cards)
if len(bing) > 0 and len(cards) > 1:
print('Found bingo: ', bing, ' after pulling number ', z, ', cards left: ', len(cards))
for card in reversed(sorted(bing)):
cards.pop(card)
continue
if len(cards) == 1 and len(bing) > 0:
for x in cards[0]:
for i in x:
if i is not None:
score += i
break
print(cards)
print(z)
print(score*z, ' eöokrggm')

53
day4.py

@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
import re
def check(cards, num):
for i in cards:
for x in i:
for t in range(5):
if x[t] == num:
x[t] = None
print(cards)
def bingo(cards):
for i in cards:
counter = 0
for x in i:
if x[1] is None and x[2] is None and x[3] is None and x[4] is None and x[5] is None:
return i
for t in range(5):
counter = 0
for x in i:
if x[t] is None:
counter += 1
if counter == 5:
return i
return None
nums = [4,75,74,31,76,79,27,19,69,46,98,59,83,23,90,52,87,6,11,92,80,51,43,5,94,17,15,67,25,30,48,47,62,71,85,58,60,1,72,99,3,35,42,10,96,49,37,36,8,44,70,40,45,39,0,63,2,78,68,53,50,77,20,55,38,86,54,93,26,88,12,91,95,34,9,14,33,66,41,13,28,57,29,73,56,22,89,21,64,61,32,65,97,84,18,82,81,7,16,24]
f = open('input4.txt', 'r')
cards = []
card = []
score = 0
for i in f:
i = i.strip()
if len(i) == 0:
cards.append(card)
card = list()
continue
t = list(map(int, re.split('\s+', i)))
card.append(t)
if len(card) > 0:
cards.append(card)
for z in nums:
check(cards, z)
bing = bingo(cards)
if bing is not None:
print(bing)
print(z)
for x in bing:
for i in x:
if i is not None:
score += i
break
print(score*z)

1001
day5.output.txt

File diff suppressed because it is too large Load Diff

75
day5.py

@ -0,0 +1,75 @@ @@ -0,0 +1,75 @@
import sys
def aa(num):
return str(num) if num > 0 else '.'
xone = []
xtwo = []
yone = []
ytwo = []
print('Reading ', sys.argv[1])
with open(sys.argv[1], 'r') as f:
for i in f.readlines():
inp = i.strip()
temp1, temp2 = inp.split(" -> ", 1)
tempx1, tempy1 = temp1.split(",")
tempx2, tempy2 = temp2.split(",")
xone.append(int(tempx1))
xtwo.append(int(tempx2))
yone.append(int(tempy1))
ytwo.append(int(tempy2))
maxx = max(xone + xtwo)
maxy = max(yone + ytwo)
print('Max x: ', maxx, ', max y: ', maxy)
class grid:
def __init__(self, maxx, maxy):
self._points = []
for i in range(maxy + 1):
self._points.append([0] * (maxx + 1))
def mark(self, x, y):
self._points[y][x] += 1
def count(self):
counter = 0
for i in self._points:
for t in i:
if t > 1:
counter += 1
return counter
gri = grid(maxx, maxy)
for i in range(len(xone)):
if xone[i] == xtwo[i]:
poiA = min(yone[i], ytwo[i])
poiB = max(yone[i], ytwo[i])
print('Drawing y line from ', xone[i], ',', poiA, ' to ', xtwo[i], ',', poiB + 1)
for t in range(poiA, poiB + 1):
gri.mark(xone[i], t)
elif yone[i] == ytwo[i]:
poiA = min(xone[i], xtwo[i])
poiB = max(xone[i], xtwo[i])
print('Drawing x line from ', poiA, ',', yone[i], ' to ', poiB + 1, ',', ytwo[i])
for t in range(poiA, poiB + 1):
gri.mark(t, yone[i])
else:
xdir = -1 if xone[i] > xtwo[i] else 1
ydir = -1 if yone[i] > ytwo[i] else 1
xcoords = list(range(xone[i], xtwo[i] + xdir, xdir))
ycoords = list(range(yone[i], ytwo[i] + ydir, ydir))
#print(ycoords)
#print(xcoords)
for x, y in zip(xcoords, ycoords):
gri.mark(x, y)
# Print the grid as ASCII art.
for p in gri._points:
print(''.join([aa(x) for x in p]))
solu = gri.count()
print(solu, ' intersections found')

42
day6-2.py

@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
#inp = [3,4,3,1,2]
inp = [1,4,1,1,1,1,5,1,1,5,1,4,2,5,1,2,3,1,1,1,1,5,4,2,1,1,3,1,1,1,1,1,1,1,2,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,4,1,1,1,1,5,1,4,1,1,4,1,1,1,1,4,1,1,5,5,1,1,1,4,1,1,1,1,1,3,2,1,1,1,1,1,2,3,1,1,2,1,1,1,3,1,1,1,2,1,2,1,1,2,1,1,3,1,1,1,3,3,5,1,4,1,1,5,1,1,4,1,5,3,3,5,1,1,1,4,1,1,1,1,1,1,5,5,1,1,4,1,2,1,1,1,1,2,2,2,1,1,2,2,4,1,1,1,1,3,1,2,3,4,1,1,1,4,4,1,1,1,1,1,1,1,4,2,5,2,1,1,4,1,1,5,1,1,5,1,5,5,1,3,5,1,1,5,1,1,2,2,1,1,1,1,1,1,1,4,3,1,1,4,1,4,1,1,1,1,4,1,4,4,4,3,1,1,3,2,1,1,1,1,1,1,1,4,1,3,1,1,1,1,1,1,1,5,2,4,2,1,4,4,1,5,1,1,3,1,3,1,1,1,1,1,4,2,3,2,1,1,2,1,5,2,1,1,4,1,4,1,1,1,4,4,1,1,1,1,1,1,4,1,1,1,2,1,1,2]
class Fish:
def __init__(self, day, fesh):
self.fishcount = 0
self.days = day
self.fishcount += fesh
def dayend(self):
if self.days > 0:
self.days -= 1
return None
elif self.days == 0:
self.days = 6
return self.fishcount
def howmuchfish(self):
return self.fishcount
fishies = []
fishcounter = 0
for t in range(1, max(inp) + 1):
fishies.append(Fish(t, 0))
for i in inp:
for t in fishies:
if t.days == i:
t.fishcount += 1
for i in range(256):
newborn = 0
for t in fishies:
temp = t.dayend()
if temp is not None:
newborn += temp
fishies.append(Fish(8, newborn))
for t in fishies:
fishcounter += t.howmuchfish()
print(fishcounter)

16
day6.py

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
#inp = [3,4,3,1,2]
inp = [1,4,1,1,1,1,5,1,1,5,1,4,2,5,1,2,3,1,1,1,1,5,4,2,1,1,3,1,1,1,1,1,1,1,2,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,4,1,1,1,1,5,1,4,1,1,4,1,1,1,1,4,1,1,5,5,1,1,1,4,1,1,1,1,1,3,2,1,1,1,1,1,2,3,1,1,2,1,1,1,3,1,1,1,2,1,2,1,1,2,1,1,3,1,1,1,3,3,5,1,4,1,1,5,1,1,4,1,5,3,3,5,1,1,1,4,1,1,1,1,1,1,5,5,1,1,4,1,2,1,1,1,1,2,2,2,1,1,2,2,4,1,1,1,1,3,1,2,3,4,1,1,1,4,4,1,1,1,1,1,1,1,4,2,5,2,1,1,4,1,1,5,1,1,5,1,5,5,1,3,5,1,1,5,1,1,2,2,1,1,1,1,1,1,1,4,3,1,1,4,1,4,1,1,1,1,4,1,4,4,4,3,1,1,3,2,1,1,1,1,1,1,1,4,1,3,1,1,1,1,1,1,1,5,2,4,2,1,4,4,1,5,1,1,3,1,3,1,1,1,1,1,4,2,3,2,1,1,2,1,5,2,1,1,4,1,4,1,1,1,4,4,1,1,1,1,1,1,4,1,1,1,2,1,1,2]
offspring = 0
for t in range(80):
#inp.extend([8] * offspring)
offspring = 0
for fish in range(len(inp)):
if inp[fish] > 0:
inp[fish] -= 1
elif inp[fish] == 0:
inp[fish] = 6
offspring += 1
inp.extend([8] * offspring)
#print('day ', t, ' : ', inp)
print(len(inp))

24
day7-2.py

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
#inp = [16,1,2,0,4,2,7,1,2,14]
inp = [1101,1,29,67,1102,0,1,65,1008,65,35,66,1005,66,28,1,67,65,20,4,0,1001,65,1,65,1106,0,8,99,35,67,101,99,105,32,110,39,101,115,116,32,112,97,115,32,117,110,101,32,105,110,116,99,111,100,101,32,112,114,111,103,114,97,109,10,601,578,981,315,530,525,671,1501,616,214,724,1247,543,58,183,282,242,54,90,130,1788,360,1719,710,1165,1476,29,744,164,293,1360,274,47,119,16,387,134,547,72,48,77,416,863,39,65,144,500,678,430,160,1689,550,753,1478,480,56,583,85,206,93,335,990,174,276,1119,52,308,470,563,387,897,21,85,720,983,178,383,134,299,722,57,391,489,768,232,646,1312,1316,31,57,927,176,531,421,1162,369,934,7,172,237,340,169,261,1371,1351,1268,72,58,375,1570,1238,55,513,403,1462,141,263,419,1316,852,251,39,358,209,204,439,150,1667,344,205,1299,1226,992,967,536,1160,1503,1154,1323,486,1079,329,823,506,1252,387,28,69,649,296,233,62,219,344,464,1284,291,234,47,949,1126,935,1367,1450,1431,379,344,478,731,648,77,184,927,211,262,728,1093,381,140,239,332,1436,78,665,1486,601,1444,364,1057,753,488,127,1001,350,1016,357,638,309,40,333,136,655,779,821,414,275,140,149,185,445,1169,476,196,907,1570,193,161,43,204,1489,1125,1024,101,17,592,1378,338,1625,3,269,1568,254,803,25,776,109,52,291,1595,255,739,34,768,378,632,4,181,373,162,562,74,85,160,16,47,38,266,1610,9,7,1398,358,287,450,188,1390,37,98,80,685,1645,50,55,16,542,20,443,848,49,808,76,233,69,110,471,73,408,638,89,861,280,1062,75,314,808,237,96,401,57,48,1306,115,1164,1533,5,1032,1314,66,630,96,496,116,1558,438,13,182,1360,802,101,327,370,444,335,812,430,900,1259,1117,318,118,433,501,401,101,582,27,454,981,776,14,26,163,384,1652,87,788,474,588,155,845,207,33,200,622,840,1360,432,11,525,86,296,481,200,529,95,924,431,40,846,220,285,14,66,755,111,647,643,1201,81,483,555,125,426,1499,29,115,48,39,92,316,434,217,218,116,9,33,496,358,1106,736,1181,1153,117,20,1719,1113,1620,26,581,407,114,1559,6,1918,964,909,340,630,817,473,111,1485,434,262,1702,651,11,182,1043,1904,633,336,252,677,1238,637,1008,82,327,171,185,19,141,395,1209,53,798,836,1378,598,262,298,265,287,85,21,249,848,162,89,1050,108,34,41,25,291,918,28,1234,139,351,867,146,79,995,1173,635,24,31,81,214,1114,155,1256,159,206,586,426,452,650,1653,47,42,264,240,500,864,893,1308,1249,853,286,62,592,102,77,1082,91,120,625,211,978,319,655,200,152,86,396,52,308,1479,38,41,53,179,648,216,41,641,659,1556,226,1421,291,33,1461,1095,529,309,1100,314,1695,505,1200,150,946,53,124,139,1506,52,33,463,613,33,1264,386,678,563,564,318,273,912,60,31,150,1321,133,1333,302,1243,49,421,808,1399,555,195,611,268,39,1302,1154,92,664,117,92,124,332,561,1436,865,198,71,271,909,40,1185,664,251,422,306,122,814,158,1676,122,217,312,952,845,104,572,1796,392,651,176,714,44,757,111,56,489,333,738,369,304,1239,105,297,277,674,213,938,2,681,336,171,1252,166,88,489,273,260,565,231,319,1085,650,211,510,12,511,325,46,107,980,1136,16,95,308,935,514,469,20,44,209,345,467,1310,500,75,594,166,199,741,193,28,52,106,1437,366,575,1200,609,678,534,573,723,325,8,386,268,690,321,186,375,2,104,657,1341,601,175,0,745,146,508,180,426,811,7,215,300,86,25,372,233,900,276,1625,808,1941,510,234,813,131,334,58,783,992,236,244,174,609,1581,1767,204,187,208,1340,347,803,146,299,140,142,339,60,118,300,809,276,413,267,946,77,154,466,425,193,187,852,674,2,17,1006,1007,166,195,137,97,41,407,65,1072,20,789,311,1227,20,132,1536,995,194,506,635,115,1500,529,93,72,950,208,944,1177,476,207,1228,5,974,226,225,290,690,581,218,401,49,361,1408,242,254,24,313,441,635,126,513,994,299,1722,52,1123,44,1332,628,534,789,298,692,45,596,1583,77,15,38,1293,1181,1498,772,148,297,49,692,87,594,49,148,170,54,1079,7,468,847,336,421,34,1108,406,892,689,245,298,85,1187,1142,286,310,207,34,660,549,39,1172,97,1,750,47,0,77,1632,135,54,18,22,1292,230,1031,11,225,820,461,1208,108,1443,274,1134,41,287,166,274,1032,585,1491,75,549,1231,1314,443,212,395,386,698,58,644,395,81,905,366,233,716,656,799,643,1011,173,790,360,269,930,13,606,488,387,1206,51]
maxP = max(inp)
minP = min(inp)
fuelpoints = [None, 0]
for i in range(minP, maxP + 1):
fuelcounter = 0
for pos in inp:
temp = i - pos
if temp < 0:
temp = temp*-1
temp = (temp*temp + temp)//2
fuelcounter += temp
if fuelpoints[0] is None:
fuelpoints[0] = fuelcounter
fuelpoints[1] = i
elif fuelpoints[0] > fuelcounter:
fuelpoints[0] = fuelcounter
fuelpoints[1] = i
print(fuelpoints)

23
day7.py

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
#inp = [16,1,2,0,4,2,7,1,2,14]
inp = [1101,1,29,67,1102,0,1,65,1008,65,35,66,1005,66,28,1,67,65,20,4,0,1001,65,1,65,1106,0,8,99,35,67,101,99,105,32,110,39,101,115,116,32,112,97,115,32,117,110,101,32,105,110,116,99,111,100,101,32,112,114,111,103,114,97,109,10,601,578,981,315,530,525,671,1501,616,214,724,1247,543,58,183,282,242,54,90,130,1788,360,1719,710,1165,1476,29,744,164,293,1360,274,47,119,16,387,134,547,72,48,77,416,863,39,65,144,500,678,430,160,1689,550,753,1478,480,56,583,85,206,93,335,990,174,276,1119,52,308,470,563,387,897,21,85,720,983,178,383,134,299,722,57,391,489,768,232,646,1312,1316,31,57,927,176,531,421,1162,369,934,7,172,237,340,169,261,1371,1351,1268,72,58,375,1570,1238,55,513,403,1462,141,263,419,1316,852,251,39,358,209,204,439,150,1667,344,205,1299,1226,992,967,536,1160,1503,1154,1323,486,1079,329,823,506,1252,387,28,69,649,296,233,62,219,344,464,1284,291,234,47,949,1126,935,1367,1450,1431,379,344,478,731,648,77,184,927,211,262,728,1093,381,140,239,332,1436,78,665,1486,601,1444,364,1057,753,488,127,1001,350,1016,357,638,309,40,333,136,655,779,821,414,275,140,149,185,445,1169,476,196,907,1570,193,161,43,204,1489,1125,1024,101,17,592,1378,338,1625,3,269,1568,254,803,25,776,109,52,291,1595,255,739,34,768,378,632,4,181,373,162,562,74,85,160,16,47,38,266,1610,9,7,1398,358,287,450,188,1390,37,98,80,685,1645,50,55,16,542,20,443,848,49,808,76,233,69,110,471,73,408,638,89,861,280,1062,75,314,808,237,96,401,57,48,1306,115,1164,1533,5,1032,1314,66,630,96,496,116,1558,438,13,182,1360,802,101,327,370,444,335,812,430,900,1259,1117,318,118,433,501,401,101,582,27,454,981,776,14,26,163,384,1652,87,788,474,588,155,845,207,33,200,622,840,1360,432,11,525,86,296,481,200,529,95,924,431,40,846,220,285,14,66,755,111,647,643,1201,81,483,555,125,426,1499,29,115,48,39,92,316,434,217,218,116,9,33,496,358,1106,736,1181,1153,117,20,1719,1113,1620,26,581,407,114,1559,6,1918,964,909,340,630,817,473,111,1485,434,262,1702,651,11,182,1043,1904,633,336,252,677,1238,637,1008,82,327,171,185,19,141,395,1209,53,798,836,1378,598,262,298,265,287,85,21,249,848,162,89,1050,108,34,41,25,291,918,28,1234,139,351,867,146,79,995,1173,635,24,31,81,214,1114,155,1256,159,206,586,426,452,650,1653,47,42,264,240,500,864,893,1308,1249,853,286,62,592,102,77,1082,91,120,625,211,978,319,655,200,152,86,396,52,308,1479,38,41,53,179,648,216,41,641,659,1556,226,1421,291,33,1461,1095,529,309,1100,314,1695,505,1200,150,946,53,124,139,1506,52,33,463,613,33,1264,386,678,563,564,318,273,912,60,31,150,1321,133,1333,302,1243,49,421,808,1399,555,195,611,268,39,1302,1154,92,664,117,92,124,332,561,1436,865,198,71,271,909,40,1185,664,251,422,306,122,814,158,1676,122,217,312,952,845,104,572,1796,392,651,176,714,44,757,111,56,489,333,738,369,304,1239,105,297,277,674,213,938,2,681,336,171,1252,166,88,489,273,260,565,231,319,1085,650,211,510,12,511,325,46,107,980,1136,16,95,308,935,514,469,20,44,209,345,467,1310,500,75,594,166,199,741,193,28,52,106,1437,366,575,1200,609,678,534,573,723,325,8,386,268,690,321,186,375,2,104,657,1341,601,175,0,745,146,508,180,426,811,7,215,300,86,25,372,233,900,276,1625,808,1941,510,234,813,131,334,58,783,992,236,244,174,609,1581,1767,204,187,208,1340,347,803,146,299,140,142,339,60,118,300,809,276,413,267,946,77,154,466,425,193,187,852,674,2,17,1006,1007,166,195,137,97,41,407,65,1072,20,789,311,1227,20,132,1536,995,194,506,635,115,1500,529,93,72,950,208,944,1177,476,207,1228,5,974,226,225,290,690,581,218,401,49,361,1408,242,254,24,313,441,635,126,513,994,299,1722,52,1123,44,1332,628,534,789,298,692,45,596,1583,77,15,38,1293,1181,1498,772,148,297,49,692,87,594,49,148,170,54,1079,7,468,847,336,421,34,1108,406,892,689,245,298,85,1187,1142,286,310,207,34,660,549,39,1172,97,1,750,47,0,77,1632,135,54,18,22,1292,230,1031,11,225,820,461,1208,108,1443,274,1134,41,287,166,274,1032,585,1491,75,549,1231,1314,443,212,395,386,698,58,644,395,81,905,366,233,716,656,799,643,1011,173,790,360,269,930,13,606,488,387,1206,51]
maxP = max(inp)
minP = min(inp)
fuelpoints = [None, 0]
for i in range(minP, maxP + 1):
fuelcounter = 0
for pos in inp:
temp = i - pos
if temp < 0:
temp = temp*-1
fuelcounter += temp
if fuelpoints[0] is None:
fuelpoints[0] = fuelcounter
fuelpoints[1] = i
elif fuelpoints[0] > fuelcounter:
fuelpoints[0] = fuelcounter
fuelpoints[1] = i
print(fuelpoints)

2000
input.txt

File diff suppressed because it is too large Load Diff

1000
input2.txt

File diff suppressed because it is too large Load Diff

1000
input3.txt

File diff suppressed because it is too large Load Diff

599
input4.txt

@ -0,0 +1,599 @@ @@ -0,0 +1,599 @@
30 46 94 20 2
53 67 69 75 65
27 24 85 28 60
57 58 42 36 78
35 98 87 91 93
72 71 91 73 19
2 13 14 8 74
42 34 31 56 9
82 59 44 67 79
49 6 98 10 30
95 24 25 11 34
57 65 41 92 8
91 26 1 62 38
47 93 4 37 0
15 44 33 20 97
24 69 55 7 25
45 64 56 71 18
94 10 62 19 36
53 74 49 61 80
50 68 60 76 84
86 78 29 1 71
2 9 24 34 96
47 75 61 13 26
10 66 28 83 14
91 63 45 76 50
61 60 22 11 95
25 81 13 15 53
59 89 65 18 39
58 50 1 47 52
48 16 29 75 56
62 0 93 41 53
69 47 29 50 46
81 8 20 38 23
4 64 5 37 27
32 75 48 33 15
97 75 15 55 36
98 77 76 3 69
11 39 88 18 93
94 99 59 50 63
33 26 35 58 14
58 91 7 36 81
44 90 46 57 93
16 35 28 61 34
60 3 96 65 14
24 49 94 11 77
5 91 53 85 36
6 64 41 7 50
87 94 96 15 49
18 78 37 52 75
28 34 16 71 48
75 14 2 52 49
79 37 13 53 12
91 73 94 72 36
48 54 3 93 5
40 85 42 9 50
26 53 24 58 95
15 54 65 80 30
90 72 27 40 47
81 22 57 1 17
82 46 20 94 49
60 25 86 18 92
2 85 89 5 55
12 71 74 46 68
33 52 82 84 29
76 43 40 11 31
21 23 93 46 60
99 20 75 55 4
73 9 74 92 16
25 35 0 70 90
27 86 42 94 15
69 73 42 46 53
5 71 50 6 74
14 44 99 62 87
54 84 86 94 21
29 51 38 67 8
43 28 24 46 22
61 15 4 52 17
62 77 18 56 85
93 60 33 71 41
63 2 6 68 92
60 92 52 36 38
66 34 26 19 25
24 65 90 39 74
17 97 96 7 48
50 55 57 73 64
19 77 60 66 16
41 54 5 49 6
69 61 94 86 98
67 37 87 71 72
44 96 90 40 74
90 49 68 74 32
31 85 42 65 53
76 43 41 36 20
16 75 46 47 86
54 44 95 13 23
56 0 88 99 76
10 42 96 30 14
67 73 16 21 35
80 41 64 40 78
13 19 4 24 20
79 98 28 58 41
24 97 85 22 89
12 81 68 50 47
2 34 16 6 95
64 51 11 43 26
6 39 79 95 3
82 9 61 80 33
94 87 13 70 11
0 8 37 35 19
62 75 84 55 93
44 51 54 27 94
77 32 81 71 62
98 91 68 41 89
6 39 40 56 53
73 88 5 49 80
97 29 15 61 83
46 69 51 71 17
40 94 49 14 66
52 20 57 62 80
19 72 75 84 36
27 26 95 78 92
98 18 31 51 45
39 43 94 33 13
50 16 71 30 22
70 81 36 38 64
90 7 71 11 63
25 39 61 17 46
51 86 56 81 84
14 33 37 23 60
52 64 8 65 29
41 92 40 71 33
90 2 24 37 25
0 94 74 53 69
81 61 1 70 88
44 34 99 29 75
63 39 44 3 82
68 95 67 28 49
22 53 76 81 47
15 75 0 54 6
86 37 65 52 77
11 64 39 47 72
97 59 83 19 58
12 65 92 89 28
9 78 40 79 99
17 50 71 18 68
31 78 27 32 18
97 20 60 68 88
12 5 99 49 82
35 6 87 2 61
70 53 63 36 93
89 4 50 54 80
85 36 17 5 71
44 95 57 73 60
46 92 25 8 59
98 82 21 93 99
27 12 82 95 47
8 21 69 83 64
11 7 88 26 30
70 96 18 75 53
28 22 56 52 29
56 1 30 13 53
37 86 98 19 9
3 67 16 71 85
83 79 48 54 14
47 62 44 95 65
51 18 87 35 55
52 85 79 56 82
83 26 24 29 43
80 76 4 45 13
11 12 99 94 47
14 1 52 95 63
54 27 67 92 98
34 61 26 32 33
76 77 49 83 2
97 59 12 71 80
78 16 59 44 5
73 21 53 37 50
25 86 88 61 74
80 30 69 56 57
98 39 26 58 51
71 48 28 14 81
69 67 6 77 47
94 83 8 40 20
30 58 9 99 76
51 24 91 21 52
84 76 33 14 72
37 36 25 12 34
39 54 89 81 30
2 15 46 10 22
41 75 27 66 69
8 20 53 16 86
38 99 4 11 60
55 14 47 1 48
51 50 69 52 37
3 56 32 79 68
69 40 17 70 98
12 86 41 35 50
60 44 8 20 81
14 82 25 55 4
87 67 85 3 5
72 90 14 78 94
2 85 91 97 42
84 9 27 70 95
55 56 74 73 1
11 59 13 67 18
5 84 21 73 13
11 46 35 79 99
57 25 48 52 2
51 70 56 54 94
37 62 47 43 41
99 30 74 11 51
48 90 1 27 76
71 63 28 86 10
52 5 83 16 69
70 93 92 73 43
52 70 58 95 82
74 18 90 99 39
12 51 71 48 47
92 11 91 16 61
41 62 97 68 0
20 32 76 50 55
4 70 14 36 82
74 10 97 26 87
61 83 56 98 71
64 38 8 65 92
63 68 84 36 41
71 44 12 77 50
18 92 54 58 23
89 98 72 69 25
62 38 42 5 52
59 65 60 84 49
51 69 12 15 38
70 1 79 22 35
66 88 85 83 32
3 33 78 48 16
79 91 35 90 77
22 59 58 96 97
99 84 34 2 74
10 92 5 4 45
53 21 42 71 56
43 23 45 81 34
1 52 7 24 51
42 22 17 20 77
31 21 29 19 79
58 87 30 60 49
81 64 86 76 70
44 14 43 90 2
96 16 42 22 7
5 57 19 84 21
95 74 80 28 72
3 57 12 95 35
61 72 98 39 17
62 87 30 66 4
26 58 16 20 47
37 46 13 42 85
55 24 36 49 85
19 39 88 73 61
1 60 45 72 29
47 12 53 76 44
28 98 70 54 0
77 29 17 36 96
35 64 93 37 83
12 10 57 82 7
90 69 0 86 32
74 66 72 63 97
53 18 82 30 4
6 47 28 80 71
39 36 22 20 51
7 57 26 34 79
72 10 56 89 1
92 20 76 27 51
72 82 39 95 38
19 33 70 62 26
79 99 40 30 8
94 80 10 91 4
56 21 15 54 60
69 64 55 0 59
39 95 98 34 99
24 76 3 6 30
65 45 96 82 26
59 55 44 79 12
87 73 37 76 91
68 92 51 49 36
99 54 3 71 64
25 60 94 45 81
23 67 96 86 98
14 47 45 66 62
73 76 74 54 50
64 60 35 10 58
99 81 34 9 13
71 44 19 13 2
18 80 24 11 85
36 1 99 26 52
48 76 84 88 63
61 30 49 86 35
20 85 55 47 99
18 49 38 65 61
37 48 32 6 15
80 94 66 89 91
1 44 36 92 21
72 65 4 76 16
80 97 15 56 33
14 40 50 11 57
34 37 68 88 44
6 38 21 49 7
39 80 87 32 21
41 97 66 15 83
68 69 28 88 62
18 2 48 58 77
63 64 17 13 95
44 3 41 55 85
83 75 13 0 81
95 9 23 8 26
71 94 37 70 45
77 82 62 87 19
65 16 30 91 52
78 67 24 58 11
75 47 90 0 8
83 88 73 60 2
46 59 77 32 19
82 80 0 24 85
92 99 50 94 38
19 98 10 51 32
36 73 67 43 57
46 21 13 69 37
89 94 78 1 9
16 34 18 15 38
69 82 35 92 27
66 64 68 63 26
62 21 65 36 71
15 4 25 50 41
69 98 12 74 21
2 13 66 55 83
93 90 23 27 33
82 52 68 61 60
57 21 28 29 5
67 35 19 62 68
91 83 3 33 99
20 30 79 50 85
60 89 4 7 36
43 4 81 19 77
89 92 46 52 35
1 21 2 75 88
8 97 26 62 71
9 93 30 50 66
42 46 38 85 82
18 80 91 1 40
72 81 89 51 31
37 20 24 67 92
32 43 95 70 84
90 48 63 15 45
67 52 2 26 31
30 13 36 77 49
60 8 86 70 99
94 27 85 78 34
76 65 22 60 55
81 88 54 4 26
72 39 86 12 8
68 46 98 28 99
45 69 21 7 35
47 22 34 19 95
30 15 39 51 10
11 37 48 44 71
2 89 92 78 35
21 73 33 20 69
6 70 84 25 3
21 12 55 78 49
80 60 98 58 83
17 96 69 9 66
76 59 39 86 51
97 60 93 22 99
2 4 25 45 78
43 53 63 41 6
64 74 16 56 28
77 12 20 35 49
82 10 91 16 77
17 85 48 24 1
61 96 38 68 99
41 42 25 66 56
97 18 63 93 29
95 37 83 61 17
11 15 43 6 24
0 28 51 87 9
76 52 2 64 32
85 41 99 29 7
11 86 3 39 80
35 78 26 34 65
46 79 44 64 66
29 74 63 20 0
92 28 41 69 50
99 58 15 51 28
1 36 45 38 34
46 94 35 44 88
39 20 8 59 61
3 4 37 14 63
31 91 85 61 29
66 54 9 49 2
81 62 70 98 38
68 1 16 95 78
59 52 53 21 36
69 59 50 48 56
17 61 16 92 47
63 60 62 5 3
37 97 38 83 58
73 18 71 19 94
55 9 34 57 85
31 37 30 16 64
44 91 94 6 7
90 87 77 59 50
12 79 43 17 89
90 53 57 28 58
56 49 29 8 12
77 27 62 30 82
71 98 63 37 83
9 15 84 36 74
80 56 52 44 71
40 5 26 28 46
11 70 57 95 93
85 29 21 84 35
20 15 81 54 91
60 86 80 79 11
90 82 84 48 43
92 81 39 57 47
64 36 4 71 9
78 62 53 51 66
84 51 19 73 55
42 18 75 96 9
47 46 12 98 93
62 57 24 6 74
50 53 30 70 80
57 60 1 49 20
93 0 39 6 74
86 9 56 41 25
53 99 83 38 80
37 79 18 23 45
33 95 37 86 45
62 65 16 3 77
4 14 82 61 13
18 71 11 8 23
50 67 35 75 76
43 30 48 38 86
62 46 72 21 97
0 18 91 17 42
6 99 56 22 64
15 25 79 13 55
54 34 98 43 86
39 47 56 52 95
62 92 6 70 29
65 78 57 99 35
72 55 20 88 77
87 97 67 99 20
58 50 30 78 31
4 6 96 85 70
80 59 77 88 93
9 0 90 86 3
18 17 81 50 8
12 62 73 32 72
41 90 42 11 79
1 7 94 13 0
77 33 23 83 74
71 84 22 14 54
98 34 56 81 33
58 39 6 46 96
15 7 11 13 37
70 5 2 9 68
28 58 11 63 26
6 14 44 70 93
32 52 60 96 3
76 0 75 66 71
50 54 34 30 98
91 26 2 53 92
45 67 68 32 50
80 30 15 78 73
10 14 28 27 0
21 38 88 22 5
42 11 23 88 41
54 58 8 74 40
6 13 80 89 82
81 3 5 53 76
47 39 9 25 46
82 14 52 43 95
15 37 12 58 80
64 97 45 61 49
71 65 29 25 9
21 11 51 1 87
20 80 50 27 90
21 35 9 40 81
89 16 26 74 84
29 97 88 19 32
85 63 10 46 52
16 66 0 53 40
94 42 80 86 25
11 15 68 35 5
60 89 41 92 79
51 77 88 36 67
51 65 33 97 81
78 96 86 64 22
10 28 93 2 14
71 29 92 6 62
98 38 35 0 70

500
input5.txt

@ -0,0 +1,500 @@ @@ -0,0 +1,500 @@
644,38 -> 644,265
941,468 -> 941,89
807,552 -> 618,363
896,510 -> 896,744
227,909 -> 227,745
24,66 -> 946,988
563,529 -> 563,270
894,707 -> 359,172
146,253 -> 146,569
544,683 -> 140,683
755,612 -> 755,463
394,320 -> 891,320
68,616 -> 68,628
801,770 -> 801,942
650,290 -> 580,360
376,18 -> 181,213
285,391 -> 805,911
57,153 -> 501,153
686,301 -> 686,316
81,971 -> 683,369
75,456 -> 75,355
769,59 -> 769,81
49,958 -> 49,718
492,754 -> 492,256
606,133 -> 391,133
134,683 -> 134,656
195,463 -> 658,926
982,498 -> 982,927
841,122 -> 889,74
968,891 -> 968,189
104,941 -> 104,868
801,450 -> 272,979
212,749 -> 212,366
880,928 -> 880,757
503,483 -> 283,263
792,924 -> 792,540
58,87 -> 905,934
275,661 -> 36,422
475,654 -> 466,645
34,946 -> 969,11
725,664 -> 725,150
837,680 -> 837,952
109,987 -> 644,452
860,984 -> 860,691
672,800 -> 107,235
216,888 -> 301,888
399,676 -> 718,357
957,544 -> 784,544
677,743 -> 633,743
491,866 -> 77,452
967,949 -> 45,27
659,699 -> 659,27
987,116 -> 696,116
465,847 -> 309,847
353,19 -> 353,627
265,713 -> 592,386
541,765 -> 461,765
21,409 -> 895,409
950,149 -> 766,149
856,889 -> 895,889
335,962 -> 485,812
425,774 -> 400,749
71,932 -> 989,14
484,974 -> 44,974
86,797 -> 86,470
876,962 -> 876,384
45,631 -> 169,507
161,789 -> 523,427
791,640 -> 791,581
415,170 -> 835,590
299,275 -> 988,964
105,233 -> 231,359
202,226 -> 202,958
814,717 -> 618,521
185,442 -> 559,68
26,149 -> 665,149
673,369 -> 247,795
171,963 -> 171,46
689,801 -> 94,206
619,243 -> 619,637
426,245 -> 660,11
47,503 -> 47,179
341,363 -> 487,217
371,774 -> 371,871
781,794 -> 781,180
391,632 -> 92,632
517,150 -> 517,715
903,10 -> 18,895
34,500 -> 426,500
82,955 -> 886,151
142,297 -> 142,527
60,965 -> 36,965
250,807 -> 372,685
227,393 -> 610,776
269,893 -> 269,556
969,223 -> 611,223
255,92 -> 194,92
220,233 -> 958,233
144,209 -> 144,979
48,413 -> 48,195
209,151 -> 648,590
867,648 -> 871,644
499,555 -> 807,555
571,729 -> 865,435
683,151 -> 485,151
803,26 -> 803,691
533,921 -> 300,688
625,695 -> 483,553
719,370 -> 139,950
981,17 -> 16,982
367,617 -> 367,636
249,644 -> 835,644
260,825 -> 260,519
275,144 -> 275,315
767,314 -> 962,119
76,625 -> 76,166
403,680 -> 313,680
977,21 -> 16,982
578,753 -> 271,753
212,358 -> 477,623
596,220 -> 868,220
67,797 -> 935,797
181,107 -> 181,379
741,332 -> 419,10
732,827 -> 732,989
835,111 -> 436,510
480,328 -> 480,682
327,673 -> 327,70
911,547 -> 833,625
944,509 -> 874,579
169,340 -> 731,902
156,842 -> 825,173
976,40 -> 51,965
199,416 -> 916,416
51,970 -> 792,229
14,577 -> 501,577
246,464 -> 246,289
641,464 -> 100,464
984,11 -> 43,952
548,36 -> 156,428
519,799 -> 519,43
332,364 -> 332,774
85,123 -> 85,753
778,12 -> 40,750
507,56 -> 507,840
973,632 -> 670,632
895,928 -> 37,70
661,784 -> 661,718
114,25 -> 938,849
428,752 -> 428,543
357,270 -> 957,870
27,70 -> 899,942
85,780 -> 747,780
717,565 -> 951,565
191,748 -> 651,748
679,301 -> 679,417
150,266 -> 150,184
774,964 -> 64,254
34,248 -> 34,279
782,610 -> 802,610
109,146 -> 822,859
825,848 -> 825,666
251,718 -> 615,718
912,722 -> 289,722
729,579 -> 729,889
214,756 -> 214,716
58,497 -> 58,927
62,55 -> 742,55
110,429 -> 110,154
55,794 -> 638,794
182,96 -> 676,96
632,334 -> 202,764
36,541 -> 36,397
191,819 -> 191,277
971,491 -> 839,491
849,561 -> 538,250
176,523 -> 10,689
162,638 -> 717,638
132,843 -> 646,329
873,67 -> 873,389
167,631 -> 167,473
49,337 -> 465,337
550,429 -> 438,429
305,720 -> 476,720
547,636 -> 547,902
21,627 -> 49,627
286,70 -> 989,70
87,930 -> 896,121
659,916 -> 200,916
234,589 -> 234,308
530,962 -> 90,962
366,478 -> 676,788
284,520 -> 284,546
580,74 -> 146,508
561,977 -> 561,237
85,150 -> 804,869
740,850 -> 159,269
458,705 -> 458,639
969,563 -> 381,563
139,439 -> 139,263
135,971 -> 908,198
440,632 -> 102,632
446,549 -> 446,734
24,49 -> 212,237
692,882 -> 527,882
156,895 -> 156,239
359,246 -> 359,603
12,349 -> 604,941
375,161 -> 732,161
674,287 -> 322,287
902,957 -> 328,383
352,185 -> 352,766
222,205 -> 222,419
769,815 -> 769,739
83,147 -> 880,147
136,148 -> 136,279
807,241 -> 439,241
464,240 -> 478,254
37,839 -> 646,839
351,316 -> 639,604
449,492 -> 449,125
69,892 -> 933,28
565,161 -> 598,161
147,802 -> 905,44
809,861 -> 38,90
34,80 -> 34,538
896,405 -> 582,405
474,201 -> 893,201
289,64 -> 975,750
378,785 -> 375,782
709,472 -> 357,472
17,14 -> 987,984
625,46 -> 647,46
20,84 -> 914,978
364,811 -> 397,811
395,726 -> 628,726
831,89 -> 593,89
370,562 -> 827,562
278,371 -> 609,40
904,529 -> 391,16
232,829 -> 232,63
927,121 -> 194,854
547,280 -> 547,895
292,904 -> 292,897
99,525 -> 99,868
371,44 -> 643,44
942,74 -> 986,118
708,179 -> 110,179
485,637 -> 713,637
477,512 -> 102,137
636,657 -> 727,657
686,564 -> 256,564
636,169 -> 377,169
627,943 -> 627,703
987,795 -> 987,758
364,827 -> 642,827
613,694 -> 864,945
910,521 -> 777,654
119,394 -> 22,394
594,439 -> 515,360
177,11 -> 177,73
456,628 -> 456,467
246,214 -> 594,562
47,790 -> 47,491
788,21 -> 788,343
136,847 -> 136,543
958,302 -> 733,302
50,981 -> 923,108
298,179 -> 298,921
962,644 -> 93,644
988,671 -> 988,258
646,140 -> 646,852
721,264 -> 721,563
972,407 -> 684,119
245,422 -> 401,422
16,494 -> 16,16
564,72 -> 361,72
436,390 -> 166,120
511,571 -> 241,571
259,215 -> 259,975
648,841 -> 898,841
918,881 -> 438,401
458,561 -> 752,855
791,192 -> 319,192
383,929 -> 217,929
733,26 -> 527,26
620,160 -> 620,734
818,181 -> 61,181
39,21 -> 927,909
952,208 -> 952,749
194,55 -> 304,55
519,673 -> 519,875
730,919 -> 733,919
963,269 -> 933,299
707,112 -> 178,112
924,349 -> 264,349
910,94 -> 96,94
747,289 -> 89,947
164,956 -> 164,655
264,300 -> 753,789
207,672 -> 207,488
243,838 -> 812,269
455,320 -> 425,320
59,964 -> 59,841
350,373 -> 526,549
604,683 -> 604,83
537,281 -> 537,933
737,634 -> 737,28
92,909 -> 725,276
859,335 -> 859,487
605,495 -> 371,495
783,155 -> 783,930
388,591 -> 388,133
374,634 -> 472,634
963,914 -> 64,15
57,435 -> 140,435
759,619 -> 105,619
326,501 -> 326,821
942,136 -> 414,136
490,376 -> 490,260
377,59 -> 377,773
894,169 -> 99,964
350,511 -> 726,511
787,728 -> 787,750
688,11 -> 688,68
107,514 -> 183,514
861,12 -> 22,851
149,49 -> 149,713
826,737 -> 890,737
299,307 -> 299,549
251,648 -> 862,37
898,85 -> 412,85
936,168 -> 845,168
278,677 -> 302,677
493,878 -> 493,133
539,205 -> 539,522
412,495 -> 412,929
334,605 -> 334,817
68,462 -> 462,856
234,134 -> 234,942
293,823 -> 678,823
852,874 -> 158,874
859,612 -> 435,612
10,876 -> 613,273
370,13 -> 118,13
616,774 -> 14,172
193,543 -> 81,543
784,179 -> 14,949
324,533 -> 153,533
15,976 -> 976,15
943,52 -> 20,975
100,34 -> 671,605
140,552 -> 140,27
448,497 -> 186,497
734,355 -> 734,933
544,131 -> 259,131
193,84 -> 663,84
190,949 -> 833,306
430,34 -> 328,34
21,46 -> 483,508
621,202 -> 98,202
196,874 -> 889,181
106,217 -> 850,961
701,891 -> 488,678
21,597 -> 894,597
249,21 -> 249,614
887,808 -> 887,948
255,711 -> 913,53
173,447 -> 173,78
956,224 -> 956,747
513,882 -> 48,417
772,591 -> 930,591
976,98 -> 86,988
264,67 -> 264,931
987,982 -> 48,43
494,514 -> 494,416
867,785 -> 556,474
350,902 -> 257,902
978,977 -> 978,735
312,240 -> 371,240
890,112 -> 890,662
753,327 -> 427,653
83,888 -> 927,44
142,480 -> 12,480
965,39 -> 85,919
158,926 -> 158,801
439,22 -> 439,860
10,26 -> 765,781
775,838 -> 775,732
871,607 -> 871,288
337,850 -> 337,533
89,581 -> 89,582
524,977 -> 524,88
473,283 -> 639,449
23,324 -> 23,372
671,486 -> 278,879
266,98 -> 989,98
51,947 -> 634,947
47,18 -> 47,43
95,239 -> 609,753
953,34 -> 71,916
243,685 -> 243,427
642,537 -> 304,199
545,41 -> 914,41
112,860 -> 112,159
12,12 -> 989,989
622,907 -> 648,907
230,983 -> 230,941
111,868 -> 852,127
315,895 -> 799,411
771,533 -> 584,720
65,492 -> 657,492
820,315 -> 820,627
710,554 -> 829,554
100,967 -> 877,190
530,733 -> 530,202
880,28 -> 83,825
914,448 -> 494,28
886,344 -> 966,344
782,923 -> 857,848
597,632 -> 597,946
366,789 -> 366,96
568,834 -> 187,834
451,687 -> 224,687
123,12 -> 914,803
734,42 -> 526,42
844,116 -> 844,521
744,976 -> 744,792
337,837 -> 617,837
848,139 -> 848,571
853,264 -> 112,264
986,965 -> 92,71
888,892 -> 53,57
150,342 -> 150,516
457,264 -> 796,264
544,595 -> 544,406
243,118 -> 482,357
138,804 -> 138,646
99,80 -> 99,34
442,883 -> 442,165
428,72 -> 428,826
450,815 -> 901,364
852,516 -> 852,384
13,969 -> 972,10
921,50 -> 32,939
969,470 -> 969,539
691,238 -> 763,238
171,733 -> 823,81
722,963 -> 21,262
849,203 -> 849,151
12,99 -> 884,971
903,240 -> 148,240
633,140 -> 633,202
194,393 -> 747,393
748,43 -> 126,665
182,155 -> 182,298
668,814 -> 668,306
619,384 -> 255,384
166,341 -> 795,970
898,870 -> 57,29
976,148 -> 976,244
386,525 -> 662,249
719,67 -> 131,655
419,847 -> 188,847
953,823 -> 743,823
307,299 -> 307,78
948,253 -> 756,253
926,938 -> 46,58
982,618 -> 652,618
539,742 -> 539,177
531,974 -> 531,781
880,922 -> 283,325
707,257 -> 707,673
327,308 -> 930,911
526,170 -> 980,624
445,653 -> 445,986
842,737 -> 754,737
847,982 -> 16,151
137,426 -> 292,271
126,556 -> 50,556
168,766 -> 168,767
152,46 -> 363,46
50,381 -> 760,381
43,943 -> 43,374
45,964 -> 956,53
37,403 -> 576,403
130,317 -> 576,763
882,840 -> 179,137
572,608 -> 572,274
874,977 -> 32,135
794,56 -> 730,120
812,841 -> 812,440
111,66 -> 137,92
255,287 -> 255,787
121,137 -> 121,63
81,811 -> 81,586
303,365 -> 910,972
177,134 -> 962,919
405,41 -> 405,645
219,934 -> 441,934

10
testdata5.txt

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
0,9 -> 5,9
8,0 -> 0,8
9,4 -> 3,4
2,2 -> 2,1
7,0 -> 7,4
6,4 -> 2,0
0,9 -> 2,9
3,4 -> 1,4
0,0 -> 8,8
5,5 -> 8,2
Loading…
Cancel
Save