20240806
- Visited Japan Innovation Campus
- https://jp-innovation-campus.org/
- The co-working space is free for Japanese entrepreneur. Of course
I'm not an entrepreneur, but I could drop in today.
- It was fun working from the place. The atmosphere reminded me of old
school days.
- I don't get why people do networking. Meaningful networks consist of
colleagues or close friends; exchanging cards is meaningless. I
understand that talking to people with unique experience is interesting
though.
I could not solve this problem during the contest, but after some
struggle, I managed to pass the tests.
- Each room repeats the statuses (on and off) every
2 * k
minutes.
- If there is a timing all the lights are turned on, it is
amax <= t <= amax + k.
t < amax: the last room's light are off.
t > amax + 2k: repeating the same pattern, and they
are not the earliest moment.
- Consider the time the last chip is installed as a base.
- Move all the switch cycle closest to the base
- Return the earliest intersection
from collections import defaultdict
for _ in range(int(input())):
n, k = map(int, input().split())
a: list[int] = list(map(int, input().split()))
amax: int = max(a)
amod: list[int] = [x + (amax - x) // (2 * k) * (2 * k) for x in a]
amod = [x + 2 * k if amax - x > k else x for x in amod]
amodmax = max(amod)
amodmin = min(amod)
if amodmax - amodmin < k:
print(amodmax)
else:
print(-1)
Ketone 5 mg/dl
Salad 30g Protein shake 10g
Total carbohydrate 40 g
MUST:
- Check the editorial of 1993C
TODO:
- Clean my keyboard
- DL Renewal (20240812)
- Get a photo for password renewal
index 20240805 20240807