D, G= list(map(int, input().split()))

P = [[int(x) for x in input().split()] for d in range(D)]

Score = [[] for d in range(D)]

for d in range(D):

  for i in range(P[d][0] + 1):

    Score[d].append(100 * (d + 1) * i)

  Score[d][-1] += P[d][1]

DP = [[] for d in range(D)]

DP[0] = [x for x in Score[0]]

p_all = P[0][0]

for d in range(1, D):

  p_all += P[d][0]

  DP[d] = [0 for i in range(p_all + 1)]

  for p in range(p_all + 1):

    for s in range(min(P[d][0], p) + 1):

      if p - s < p_all - P[d][0] + 1:

        DP[d][p] = max(Score[d][s] + DP[d - 1][p - s], DP[d][p])

for i, s in enumerate(DP[D - 1]):

  if s >= G:

    print(i)

    break
D, G = list(map(int, input().split()))

S = [[0] for i in range(D + 1)]

B = [[0] for i in range(D + 1)]

sumP = 0

for i in range(D):

  p, c = list(map(int, input().split()))

  S[i + 1] += [0] * (len(S[i]) + p - 1)

  B[i + 1] += [100 * (i + 1) * (x + 1) for x in range(p)]

  B[i + 1][-1] += c

for i in range(1, D + 1):

  for j in range(1, len(S[i])):

    for k in range(max(j - len(S[i - 1]) + 1, 0), min(len(B[i]), j + 1)):

      S[i][j] = max(B[i][k] + S[i - 1][j - k], S[i][j])

for i, s in enumerate(S[D]):

  if s >= G:

    print(i)

    break
D, G = list(map(int, input().split()))
P = [[int(x) for x in input().split()] for d in range(D)]
Score = [[] for d in range(D)]
for d in range(D):
    for i in range(P[d][0] + 1):
        Score[d].append(100 * (d + 1) * i)
    Score[d][-1] += P[d][1]
DP = [[] for d in range(D)]
DP[0] = [x for x in Score[0]]
p_all = P[0][0]
for d in range(1, D):
    p_all += P[d][0]
    DP[d] = [0 for i in range(p_all + 1)]
    for p in range(p_all + 1):
        for s in range(min(P[d][0], p) + 1):
            if p - s < p_all - P[d][0] + 1:
                DP[d][p] = max(Score[d][s] + DP[d - 1][p - s], DP[d][p])
for i, s in enumerate(DP[D - 1]):
    if s >= G:
        print(i)
        break

D, G = list(map(int, input().split()))
S = [[0] for i in range(D + 1)]
B = [[0] for i in range(D + 1)]
sumP = 0
for i in range(D):
    p, c = list(map(int, input().split()))
    S[i + 1] += [0] * (len(S[i]) + p - 1)
    B[i + 1] += [100 * (i + 1) * (x + 1) for x in range(p)]
    B[i + 1][-1] += c
for i in range(1, D + 1):
    for j in range(1, len(S[i])):
        for k in range(max(j - len(S[i - 1]) + 1, 0), min(len(B[i]), j + 1)):
            S[i][j] = max(B[i][k] + S[i - 1][j - k], S[i][j])
for i, s in enumerate(S[D]):
    if s >= G:
        print(i)
        break

-P = [[int(x) for x in input().split()] for d in range(D)] -Score = [[] for d in range(D)] -for d in range(D): -    for i in range(P[d][0] + 1): -        Score[d].append(100 * (d + 1) * i) -    Score[d][-1] += P[d][1] -DP = [[] for d in range(D)] -DP[0] = [x for x in Score[0]] -p_all = P[0][0] -for d in range(1, D): -    p_all += P[d][0] -    DP[d] = [0 for i in range(p_all + 1)] -    for p in range(p_all + 1): -        for s in range(min(P[d][0], p) + 1): -            if p - s < p_all - P[d][0] + 1: -                DP[d][p] = max(Score[d][s] + DP[d - 1][p - s], DP[d][p]) -for i, s in enumerate(DP[D - 1]): +S = [[0] for i in range(D + 1)] +B = [[0] for i in range(D + 1)] +sumP = 0 +for i in range(D): +    p, c = list(map(int, input().split())) +    S[i + 1] += [0] * (len(S[i]) + p - 1) +    B[i + 1] += [100 * (i + 1) * (x + 1) for x in range(p)] +    B[i + 1][-1] += c +for i in range(1, D + 1): +    for j in range(1, len(S[i])): +        for k in range(max(j - len(S[i - 1]) + 1, 0), min(len(B[i]), j + 1)): +            S[i][j] = max(B[i][k] + S[i - 1][j - k], S[i][j]) +for i, s in enumerate(S[D]):