@dupanos

19. co-founder of https://nitter.cf/t.co/RL41sdL0xD & https://nitter.cf/t.co/DSCDfZsKeq blessed since birth.

Joined August 2022
Pinned Tweet
nobody reads the email. they read the first line and decide if you are worth the second
39
14
1
87
3,453
you were not given the dream so you could talk about it. you were given it because you can carry it
6
1
16
183
a cold email that talks about you gets deleted. it was never about you
10
4
20
311
nobody respects the guy who agrees with everything. they just use him
16
8
42
413
you dont have a motivation problem. you have a vague goal problem. nobody is lazy about things they actually want
22
4
35
407
god does not give you the strength before the thing. he gives it during. thats why waiting to feel strong never works
8
5
23
272
you cannot convince someone who is comfortable. find the ones already in pain
11
13
1
35
464
if you need someone else to change so you can be okay, they own you
12
6
26
378
tired is not a reason. tired is the state you do it in
20
14
47
522
praying for a door to open and then not walking through it is the most common way people stay stuck
10
11
49
558
talk to ten customers before you build the second feature. most people build ten features and talk to nobody
5
4
24
315
every time you explain why you are not upset, you are upset
15
5
37
397
every time you say i cant your brain files it as a fact. it does not check.
18
9
46
363
gratitude is not a mood. its a decision you make before the day gives you a reason
19
11
44
423
someone who talks to you about everyone will talk to everyone about you
16
5
36
423
one bad day is a day. two is a pattern. three is a decision
18
8
43
467
dusan retweeted
Replying to @dupanos
one relies on a gatekeeper and the other relies on distribution
1
1
1
45
Day 30 of 30! One leetcode problem a day or I pay a follower $500. No AI. No autocomplete. No copilot This may be the hardest problem I solved in my career Tomorrow will be the final post for this challenge Problem of the day : 3655. XOR After Range Multiplication Queries II Same problem as yesterday but 100x the constraints. The parameter that makes it slow is the parameter that makes it fast. k is the stride. A large k means a short progression, so walking it directly is cheap. A small k means a long progression, but small k also means there are fewer than sqrt(n) possible values of k, so every query sharing a stride can be settled in one sweep. Balancing at sqrt(n) is not a heuristic. It is where the two costs cross. At n = q = 100,000 both sides land near 3 * 10^7. Measured worst case: 70 ms, with the two halves contributing roughly equally. Two bugs in here are quiet and both cost me time: → the closing marker goes at last+k, not r+1. r+1 usually sits in a different residue class, so cancelling there corrupts a chain the query never touched, and the wrong answer shows up nowhere near the query that caused it. → last is l plus ((r-l)/k)*k, not r, because the progression normally stops short of r. Neither shows up on k = 1 tests. That is exactly what makes them dangerous. *code in the first comment
Day 29 of 30 One leetcode problem a day or I pay a follower $500. No AI. No autocomplete. No copilot Problem of the day : 3653. XOR After Range Multiplication Queries I My first question was not how to make it faster. It was whether faster can exist. The task: apply a bunch of strided range multiplications mod p, then XOR the whole array. Range multiply screams lazy propagation or a difference array. Defer the updates, materialise once. It cannot work here. The output is a XOR, and XOR does not interact with multiplication mod p in any structured way. You cannot combine two elements without knowing both exact values, and you cannot get a bit of a product from bits of its factors. The final array has to exist in full before anything can be read off it. That kills deferral at the root and leaves one question: is the direct walk affordable? Worst case is a million modular multiplications. 667 microseconds. Done. The actual bug available is arithmetic, not algorithmic. Skip the mod inside the loop and from a starting value near 10^9, the second multiply is already 10^19. 64 bits gone, silently, no error. → check whether the fast thing can exist before you build it → sometimes the loop in the statement is the solution, not a placeholder for one
1
2
6
303
college teaches you to get picked. building teaches you to pick. only one of those pays
18
7
33
443
reading is not the work. sending is. nobody got paid for the tab they had open.
15
8
36
382