EQDIV - Unable to understand the intention behind this question

I am still trying to find out the intention behind eqdiv question in long Challenge .
Will the writter wants us to write hardcode solution for the problem ?or he/she forgets that
the main aim of long challenges. It feels very annoying to spend time on such a useless question .which has no use of concepts .
Worst question of Long Challenge .

3 Likes

Exactly my point! I wasted 4 days on this question and still manage to score only 30.

2 Likes

The problem was both interesting and used concepts that you may find in the editorial. Though the final solution used hardcoded results and most of the computations were local, I had fun (and a little frustration to be honest) while solving it :slightly_smiling_face:

6 Likes

I found the problem good! Although it took time but meanwhile I learnt a lot about theorems regarding sum of kth powers

1 Like

The problem was shit that needs hard coded solutions
It makes people to write 300-500 lines of code to hard code the solutions
It is not a competitive standard question

4 Likes

And the people who solved used…what if not concepts? It needs concepts, key observations, knowledge of a well known dp algo and kownledge of how to avoid huge numbers
To me was a really good and challenging problem

6 Likes

dp algorithm worked only for subtask after that it is only a hardcore solution

Then please tell us what is the main aim of long challenges.
Also what in the world do you mean by no use of concepts?
At least make a decent enough argument rather than vaguely throwing around accusations.

4 Likes

Aim : To better understand the use of data structures and algorithm

and if it have anything to do with concepts then you don’t have to write a hardcore solution .
you are free to waste your time in writing a hardcore soution doesn’t mean everything is free to waste it’s time (atleast i am not ).

2 Likes

I agree. But there are a few things I’ve learnt in search for a better partitioning algorithm.
I solved this problem using Kamarkar-Karp Algo and DSU for 30 pts with a few hardcoded cases (on which it failed) and a learnt abt a few other partitioning algos like CKK and their time complexity and hardness.

After some attempts and analysing the constraints it was quite clear that the problem was pattern based or some other unknown research, so I left it for editorial and went on for other problems.

I think every problem that was unsolved should be celebrated because it offers something new to learn.

3 Likes

Well then in that case any ad-hoc problems shouldn’t be allowed in long contests because we don’t better understand the use of DSA, right?

Dude please tell me you actually understand the complete solution. The part where you are talking about hard coding is only for upto a certain small N. After that you have to repeat a pattern. Finding out about this pattern IS the goddam problem. You had to prove a relation and then you figure out the pattern. The way you are talking is as if you have to hard code the entire problem which definitely isn’t the case.

2 Likes

Well I am the author of this problem. Yeah, obviously, you don’t even try to read editorial (why should you do such a weird thing ?).
About hardcoding values, it is not that hard to open attached solution. If you do, you can note that my full solution is less than 75 lines (and I was nowhere near to write as short as possible). No hardcoding at all, moreover I don’t even have any things like if (k = 1) in my code.
You don’t even try to understand problem, what is the reason to write this then?

11 Likes

Again, you also don’t even try to open attached solution (as well as many others short codes in discussion). As for my point of view, it is suitable for long challenge.

4 Likes

upto small N is 64 . and i think no one is expecting a problem in Long challenge which makes them write the answer for test cases like that .

1 Like

Lol, it wasn’t necessary at all. There are numerous solutions without any hardcore. You should better read editorial and comments rather than writing this shit.

6 Likes

This kind of learning attitude will never help you.

1 Like

To be honest ,many of us wrote a small code of around 70-80 lines to generate the main code,
see this , I made the output as from below code and copied to the main code.
(C++)

dp gives me the output and the string, and by the way people thinking that you need to dp upto 64, you need to do only upto 34 to be precise and 35th element you can get by greedy method from n to 35( n<=64) . For ,above 64 ,if you know the fact that it is a pattern, (this pattern of size 32 can be found in O(1),no brute, just greedy).

vector int vec;
for(int i=1;i<=34;i++)
{
vec.push_back(i);
cout<<“ans4[”<<i<<"]="<<dp(vec)<<";";
cout<<“str4[”<<i<<"]="<<str[i]<<";";
}

Hope you get this, this problem is not bad, you just saw many submissions and just complaining without giving a insight to it.

2 Likes

Perhaps your are right , as I saw 7-8 solutions all are hardcode solutions . And rather than seeing editorial solution , I was more interested in seeing general solutions .

Wait a second are you talking about actually constructing solutions by hand for n upto 64? I don’t think anyone did that. I for example used a side script to create the solutions for n upto 48. Which has a dp solution. Now I also read the author’s comment and he has a much more elegant solution no hard coding so I think it will be nice of you to apologise to him.

3 Likes

On that I agree with you I learnt that too… implementing CKK required thinking.

1 Like