MindTheGap's blog

By MindTheGap, history, 8 months ago, In English

The title is pretty self explanatory. This was featured as a problem in the past SWERC 2012-2013, and right now it only has 8 solvers, which surprises me, given the nature of the problem. I'm no master at geometry, but the straightforwardness of the statement makes it look easier than it is. Here's the link to the problems. It's problem E, Old School Days.

LINK TO CONTEST

There is also a brief explanation on the solution available on the editorial, but it hasn't been much help to me, as i do not understad how to achieve O(n^2 logn) complexity. I'm writing this entry as a way not only to have a clearer explanation on the solution online, but also to share some other similar problems about geometry. Pretty straightforward conditions with tricky optimizations and logic.

I will edit it with any other problem I find falls under this category and every useful resource you share.

PD: I'm planning a releasing a full Editorial on CSES String Problems, focusing on the use of Suffix Automaton as a Multiuse Tool for string problems, but I wonder if it's worth it, taking into account a CSES String editorial already exists here, even tho it doesn't use Suffix Automaton. Check it out! LINK TO EDITORIAL(Not mine)

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it

By MindTheGap, history, 11 months ago, In English

I will be participating in the upcoming SWERC, so I was revisiting old problems. I don't quite understand how the official solution for Problem H is valid for every possible testcase. It's a classical knapsack, but the constraints are way too high for it to fit in memory, so the official solution does the gcd of the weights, to reduce it by that number. My question is, wouldn't a testcase where gcd = 1 break that? Am I missing something from the statement? Thank you.

The Problem Name its SHARES. It was features in SWERC 2012-2013, Valencia, and also in the regional classification for SWERC, in Valencia, which I also dont understand why that would happen, as it is unfair to repeat problems in such an easy way.

Here's the link. LINK TO CONTEST

Full text and comments »

  • Vote: I like it
  • +18
  • Vote: I do not like it