Problems with high constraints

...
Last edited on
> Is there a particular programming technique or ds that shall be used to solve this ?
Yes, it's called maths.

> any kind of hint on how to approach any kind of question with such high constraints will be appreciated.
Resist the temptation to reach for the keyboard for at least 24 hours.
Use that time to study how the problem works on paper.

Your goal is to find a solution approach on paper which scales much better than "try every possible combination". Use that lump of grey matter between your ears to invent smarter ways of solving the problem.
...
Last edited on
> Thanks for the amount of wit you have tried to show in your reply,
I wasn't being funny.

What do you want?
If you're hoping for someone to click on your problem, spend time thinking about the problem and then just lead you by the nose through an advanced solution, just so you can pretend that you understand how to solve the problem, then think again sunshine.

Doing that would teach you nothing, and for sure you would be back here at the beginning of September with another brute-force solution, and the SAME question on how to solve the hard test cases.

There is no point in you hanging around on codechef (or any other contest site) if all you're going to do is post links and claim you have some half-arsed brute-force solution.

I told you what you need to do for ALL the problems, not just this one.
And that is, you've got to THINK about the problem before you start coding.

Writing the first thing that comes into your head is almost certainly the wrong approach - stop doing it!.



Good riddance to another CC wannabe trying to elevate their score through someone else's efforts, because they're unable/unwilling to put in the effort themselves.

The original problem for reference -> https://www.codechef.com/AUG19A/problems/ENCODING

Not that there was anything like a solution in what the OP posted.
Yet another typical codechef question:

"Chef is trying to open the oven in his kitchen to cook some cookies in order to lure children into his pedophile dungeon."

Jesus! (YAP)


(BTW, who reported salem? Why? Jesus! (YAP))
It was probably the sore kanker.

I like my "Reported" by some CC luser badge - I intend to collect many more :D
Topic archived. No new replies allowed.