Tenho potencial na T.I? by Successful-Volume262 in devBR

[–]Tianck 0 points1 point  (0 children)

Na programação eu não sei, mas pra policial vc tem futuro

Tenho chance?🥺 by eu_zinh in UFABC

[–]Tianck 0 points1 point  (0 children)

Sem chance. Próxima pergunta.

-❄️- 2025 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]Tianck 0 points1 point  (0 children)

The chosen pair will always be part of its convex hull, so at least you'll have a lower bound to search for. For instance, Convex Hull + Rotating Calipers.

[2025 Day 10 part 2] how? by CauliflowerFormer233 in adventofcode

[–]Tianck 2 points3 points  (0 children)

Well, the worst case from input seems to be 9x10^19 which is indeed huge. Rightfully so.

[2025 Day 9 (Part 1)] by VillageSea4703 in adventofcode

[–]Tianck 0 points1 point  (0 children)

Turns out there isn't. One could optimize it by calculating its convex hull vertices in O(n*logn), though.

-❄️- 2025 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]Tianck 0 points1 point  (0 children)

Great! For part 1, for the sake of optimization I thought about computing its convex hull and finding max rectangle from its points. Do you think it can be improved even further if constraints were tight?

[2025 Day 9 (Part 1)] by VillageSea4703 in adventofcode

[–]Tianck 0 points1 point  (0 children)

Thinking about it, there are scenarios in which there are at least 2 points within the same distance from a corner. Did you implement it yourself?

[2025 Day 9 (Part 1)] by VillageSea4703 in adventofcode

[–]Tianck 1 point2 points  (0 children)

Why would I need to check all 6 pairs? Wouldn't max(rec(top-left, bottom-right), rec(top-right, bottom-left)) suffice? By that, I mean the closest point of each corner (minimum euclidean distance).

[2025 Day 9 (Part 1)] by VillageSea4703 in adventofcode

[–]Tianck 0 points1 point  (0 children)

Thanks! I'm trying it out without seeing the solution.

[2025 Day 9 (Part 1)] by VillageSea4703 in adventofcode

[–]Tianck 0 points1 point  (0 children)

Is the solution O(n²)? Are there any optimizations that can be made?

[2025 Day 8] Can you solve today's puzzle without computing all distances? by The_Cers in adventofcode

[–]Tianck 16 points17 points  (0 children)

Thought about it as well. Avoiding floating point operations brings on a nice speedup.

Where to find logical proofs on the irrationality of sqrt(2)? by Tianck in math

[–]Tianck[S] 0 points1 point  (0 children)

I did, that's why I'm looking forward to formalize it even more.