Buggy python submission (verdict: Time Limit Exceeded):
from itertools import chain
n = int(input())

p = [[] for _ in range(4)]
for _ in range(n):
    a, b, d = input().split()
    a, b = map(int, (a, b))
    p[0 if d == 'R' else 1 if d == 'L' else 2 if d == 'U' else 3].append((a, b))
to_min = [None] * 4
to_max = [None] * 4
for i in range(4):
    if p[i]:
        to_min[i] = (max if i & 1 else min)(a if i < 2 else b for a, b in p[i])
        to_max[i] = (min if i & 1 else max)(a if i < 2 else b for a, b in p[i])
still = [None] * 2
for i in range(2):
    j = (1-i)*2
    if p[j] or p[j + 1]:
        still[i] = min(b if i else a for a, b in chain(p[j], p[j+1])), max(b if i else a for a, b in chain(p[j], p[j+1])) 

def f_width(i, t):
    if still[i]:
        leftmost, rightmost = still[i]
    else:
        leftmost, rightmost = 10 ** 18, - 10 ** 18
    i *= 2
    if to_min[i] != None:
        leftmost = min(leftmost, to_min[i] + t)
    if to_max[i+1] != None:
        leftmost = min(leftmost, to_max[i+1] - t)
    if to_min[i+1] != None:
        rightmost = max(rightmost, to_min[i+1] - t)
    if to_max[i] != None:
        rightmost = max(rightmost, to_max[i] + t)
    return rightmost - leftmost

t = []
for i in range(2):
    l, r = 0, 10 ** 18
    while r - l > 1e-10:
        c1, c2 = l + (r - l) / 3, l + (r - l) * 2 / 3
        if f_width(i, c1) > f_width(i, c2):
            l = c1
        else:
            r = c2
    t.append(r)
l, r = min(t), max(t)
while r - l > 1e-10:
    c1, c2 = l + (r - l) / 3, l + (r - l) * 2 / 3
    if f_width(0, c1) * f_width(1, c1) > f_width(0, c2) * f_width(1, c2):
        l = c1
    else:
        r = c2
print('{0:.9f}'.format(f_width(0, r) * f_width(1, r)))


Fixed submission:
from itertools import chain
n = int(input())

p = [[] for _ in range(4)]
for _ in range(n):
    a, b, d = input().split()
    a, b = map(int, (a, b))
    p[0 if d == 'R' else 1 if d == 'L' else 2 if d == 'U' else 3].append((a, b))
to_min = [None] * 4
to_max = [None] * 4
for i in range(4):
    if p[i]:
        to_min[i] = (max if i & 1 else min)(a if i < 2 else b for a, b in p[i])
        to_max[i] = (min if i & 1 else max)(a if i < 2 else b for a, b in p[i])
still = [None] * 2
for i in range(2):
    j = (1-i)*2
    if p[j] or p[j + 1]:
        still[i] = min(b if i else a for a, b in chain(p[j], p[j+1])), max(b if i else a for a, b in chain(p[j], p[j+1])) 

def f_width(i, t):
    if still[i]:
        leftmost, rightmost = still[i]
    else:
        leftmost, rightmost = 10 ** 18, - 10 ** 18
    i *= 2
    if to_min[i] != None:
        leftmost = min(leftmost, to_min[i] + t)
    if to_max[i+1] != None:
        leftmost = min(leftmost, to_max[i+1] - t)
    if to_min[i+1] != None:
        rightmost = max(rightmost, to_min[i+1] - t)
    if to_max[i] != None:
        rightmost = max(rightmost, to_max[i] + t)
    return rightmost - leftmost

t = []
for i in range(2):
    l, r = 0, 10 ** 10
    cnt = 0
    while cnt < 100000:
        cnt += 1
        c1, c2 = l + (r - l) / 3, l + (r - l) * 2 / 3
        if f_width(i, c1) >= f_width(i, c2):
            l = c1
        else:
            r = c2
    t.append(l)
l, r = min(t), max(t)
cnt = 0
while cnt < 100000:
    cnt += 1
    c1, c2 = l + (r - l) / 3, l + (r - l) * 2 / 3
    if f_width(0, c1) * f_width(1, c1) > f_width(0, c2) * f_width(1, c2):
        l = c1
    else:
        r = c2
print('{0:.13f}'.format(f_width(0, l) * f_width(1, l)))

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import chain
n = int(input())

p = [[] for _ in range(4)]
for _ in range(n):
    a, b, d = input().split()
    a, b = map(int, (a, b))
    p[0 if d == 'R' else 1 if d == 'L' else 2 if d == 'U' else 3].append((a, b))
to_min = [None] * 4
to_max = [None] * 4
for i in range(4):
    if p[i]:
        to_min[i] = (max if i & 1 else min)(a if i < 2 else b for a, b in p[i])
        to_max[i] = (min if i & 1 else max)(a if i < 2 else b for a, b in p[i])
still = [None] * 2
for i in range(2):
    j = (1-i)*2
    if p[j] or p[j + 1]:
        still[i] = min(b if i else a for a, b in chain(p[j], p[j+1])), max(b if i else a for a, b in chain(p[j], p[j+1])) 

def f_width(i, t):
    if still[i]:
        leftmost, rightmost = still[i]
    else:
        leftmost, rightmost = 10 ** 18, - 10 ** 18
    i *= 2
    if to_min[i] != None:
        leftmost = min(leftmost, to_min[i] + t)
    if to_max[i+1] != None:
        leftmost = min(leftmost, to_max[i+1] - t)
    if to_min[i+1] != None:
        rightmost = max(rightmost, to_min[i+1] - t)
    if to_max[i] != None:
        rightmost = max(rightmost, to_max[i] + t)
    return rightmost - leftmost

t = []
for i in range(2):
    l, r = 0, 10 ** 18
    while r - l > 1e-12:
        c1, c2 = l + (r - l) / 3, l + (r - l) * 2 / 3
        if f_width(i, c1) > f_width(i, c2):
            l = c1
        else:
            r = c2
    t.append(r)
l, r = min(t), max(t)
while r - l > 1e-12:
    c1, c2 = l + (r - l) / 3, l + (r - l) * 2 / 3
    if f_width(0, c1) * f_width(1, c1) > f_width(0, c2) * f_width(1, c2):
        l = c1
    else:
        r = c2
print('{0:.10f}'.format(f_width(0, r) * f_width(1, r)))


Fixed submission:
from itertools import chain
n = int(input())

p = [[] for _ in range(4)]
for _ in range(n):
    a, b, d = input().split()
    a, b = map(int, (a, b))
    p[0 if d == 'R' else 1 if d == 'L' else 2 if d == 'U' else 3].append((a, b))
to_min = [None] * 4
to_max = [None] * 4
for i in range(4):
    if p[i]:
        to_min[i] = (max if i & 1 else min)(a if i < 2 else b for a, b in p[i])
        to_max[i] = (min if i & 1 else max)(a if i < 2 else b for a, b in p[i])
still = [None] * 2
for i in range(2):
    j = (1-i)*2
    if p[j] or p[j + 1]:
        still[i] = min(b if i else a for a, b in chain(p[j], p[j+1])), max(b if i else a for a, b in chain(p[j], p[j+1])) 

def f_width(i, t):
    if still[i]:
        leftmost, rightmost = still[i]
    else:
        leftmost, rightmost = 10 ** 18, - 10 ** 18
    i *= 2
    if to_min[i] != None:
        leftmost = min(leftmost, to_min[i] + t)
    if to_max[i+1] != None:
        leftmost = min(leftmost, to_max[i+1] - t)
    if to_min[i+1] != None:
        rightmost = max(rightmost, to_min[i+1] - t)
    if to_max[i] != None:
        rightmost = max(rightmost, to_max[i] + t)
    return rightmost - leftmost

t = []
for i in range(2):
    l, r = 0, 10 ** 10
    cnt = 0
    while cnt < 100000:
        cnt += 1
        c1, c2 = l + (r - l) / 3, l + (r - l) * 2 / 3
        if f_width(i, c1) >= f_width(i, c2):
            l = c1
        else:
            r = c2
    t.append(l)
l, r = min(t), max(t)
cnt = 0
while cnt < 100000:
    cnt += 1
    c1, c2 = l + (r - l) / 3, l + (r - l) * 2 / 3
    if f_width(0, c1) * f_width(1, c1) > f_width(0, c2) * f_width(1, c2):
        l = c1
    else:
        r = c2
print('{0:.13f}'.format(f_width(0, l) * f_width(1, l)))