20240515

GPT-4o

I finally tried GPT-4o; it's a game changer!

The experience with the real time conversation feature is imporessive. The AI understands what I say and responds back to me instantly. I'm not sure about its knowledge base or problem-solving ability, but I'm sure that it will replace most businesses offering online English lessons. I can just begin the conversation in the ChatGPT application anytime. The AI can behave what I'm asked.

I just subscribed to the paid tier for both my wife and me. I hope it helps us improve our English and get used to AI.

1971E. Find the Car

Takeaway:

def binary_search(a: list, k: int, d: int) -> int:
    """returns index of the left side of the section"""
    left_i: int = 0
    right_i: int = k
    mid_i: int = -1

    while right_i - left_i > 1:
        mid_i = (left_i + right_i) // 2
        if d == a[mid_i]:
            return mid_i
        elif d < a[mid_i]:
            right_i = mid_i
        elif d > a[mid_i]:
            left_i = mid_i

    return left_i


t = int(input())
for tc in range(t):
    n, k, q = map(int, input().split())
    a = [0] + list(map(int, input().split()))
    b = [0] + list(map(int, input().split()))

    result = []
    for qc in range(q):
        d: int = int(input())
        i: int = binary_search(a, k, d)
        # offset = math.floor((b[i + 1] - b[i]) / (a[i + 1] - a[i]) * (d - a[i])) -> cause differences for some test cases
        offset: int = (b[i + 1] - b[i]) * (d - a[i]) // (a[i + 1] - a[i])
        result.append(b[i] + offset)
    print(" ".join(str(e) for e in result))

Yogurt 500 Lunchable 500 something like Chipotle 500 Eggs 400 Bubble tea 600

Total 2500 kcal


TODO:


index 20240514 20240516