import decimal

def binpow(a, b):
    if b == 0:
        return decimal.Decimal('1.0')
    res = binpow(a, b // 2)
    res = res * res
    if b % 2 == 1:
        res = res * a
    return res

def solve():
    n, m = map(int, input().split())
    r = decimal.Decimal(input())
    ws = []
    for i in range(n):
        u, v = map(int, input().split())
        ws.append((u, v))
    ws.sort()

    qs = []
    for i in range(m):
        x = int(input())
        qs.append((x, i))
    qs.sort()

    ans = [0] * m
    cd, cws = 0, 0
    cx = decimal.Decimal(0)
    
    for i in range(m):
        rd = qs[i][0]
        while cws < n and ws[cws][0] <= rd:
            ecc = ws[cws][0] - cd
            cx *= binpow(decimal.Decimal('1.0') - r, ecc)
            cx += decimal.Decimal(ws[cws][1]) * r
            cd = ws[cws][0]
            cws += 1
        ecc = rd - cd
        cx *= binpow(decimal.Decimal('1.0') - r, ecc)
        cd = rd
        ans[qs[i][1]] = cx

   
