20241105 ◎

2036C. Anya and 1100 - 900

Codeforces Round 984 (Div.3) Editorial

Hint

With each query, to track the change in the presence of “1100” in a row, you don't have to go through the entire row — you can check just a few neighboring cells.

That makes sense, and I took time to come up with a solution, but it was too hard for me.

Tutorial

First, in a naive way, let's count count - the number of times “1100” occurs in s.

Then, for each of q queries we will update count: consider the substring s[max(1, i - 3);min(i + 3, n)] before changings_iand findbefore- the number of times that "1100" occurs in it. Then updates_i = vand simiilarly findafter- the number of times that "1100" occurs ins[max(1, i - 3);min(i + 3, n)]` after applying the query.

Thus, by doing count = count + (after - before), we get the number of times that “1100” occurs in s after the query is applied. If count > 0, the answer to the query is “YES”, otherwise it is “NO”.

It just makese sense!!

TARGET_STRING = "1100"
TARGET_LENGTH = len(TARGET_STRING)


for _ in range(int(input())):
    s: list[str] = list(input())
    q: int = int(input())

    count: int = "".join(s).count(TARGET_STRING)
    for _ in range(q):
        i, v = input().split()
        i = int(i) - 1

        before: int = "".join(
            s[max(i - TARGET_LENGTH + 1, 0) : i + TARGET_LENGTH]
        ).count(TARGET_STRING)
        s[i] = v
        after: int = "".join(
            s[max(i - TARGET_LENGTH + 1, 0) : i + TARGET_LENGTH]
        ).count(TARGET_STRING)

        count += after - before

        if count > 0:
            print("YES")
        else:
            print("NO")

Mozilla Foundation lays off about third of staff - The Register

While Mozilla Foundation declined to quantify the number of people being let go, it reported 60 employees on its 2022 Form 990 disclosure, which was filed November 15, 2023. The Register understands the current headcount is closer to 120, so presumably around 36 people stand to lose their jobs.

Mozilla Corporation - Wikipedia

Number of employees: ~750 (2020)

I found it interesting that the Mozilla Foundation operates with a very limited number of employees, though its subsidiary has a moderate number of people.

Layoffs…


Pancakes & Sausage 500 Sandwitches 300 Protein shake 300 Rice 400 Protein bars 300

Total 1800 kcal


MUST:

TODO:


index 20241104 20241106