HACKING in CodeChef Needed! | Maximum Light Up | DIWALI1 | CodeChef Starters 13

Maximum Light Up | DIWALI1 | CodeChef Starters 13

@admin @suryaprak_adm
Wasn’t the Question Tested Before the Contest?

Since, Definitely This Brute Force Solution Should Not Pass the Test Cases, But it Does.

Link to my WRONG Solution Getting Accepted : https://www.codechef.com/viewsolution/51709139

Constraints for Reference:


For TestCase:

1000000000 1 1 1 1 1
1000000000 1 1 1 1 1
1000000000 1 1 1 1 1
1000000000 1 1 1 1 1
1000000000 1 1 1 1 1

1000000000 1 1 1 1 1
1000000000 1 1 1 1 1

This Should Definitely Give TLE :timer_clock: !

Correct me, If it is Wrong!


bro, check this question

problem link

time limit : 4sec

So, what’s the problem in keeping TL = 4s? Were you able to pass some kind of brute force?

I think the Time Limit is 1 Second.

Problem Link


No way , it was giving me TLE.

see TL

I think , TL is 1 sec. but It wrote by mistake

Why do you think that the TL is 1 sec?

1 Like

because I wrote solution in (T*n^2);
it was giving me tle

n^2 solution will give you tle even it is 4 secs

According to constraints, you need 100 secs to pass O(T \cdot N^2) solution.

1 Like

May be even more, around 10^5 seconds - more than a day.

1 Like

I was little bit confuse for that complexity. thanks for discussion :blush:

I am always confuse with time complexity.

how many instruction can execute in 1 Sec ?

As I know , In one sec, it may 2*10^6.
Am I right ?

Or Can it vary according to the problem ?

In 1 sec : 1e8
so, 2 secs : 2*1e8, not (1e8)^2

@praveen_86 Please Use Proper Threads for Discussion.

The Above Post was for Different Question, and You are Confusing the Audience of Post.

Main Aim : Suggestion for HACKING Feature [Post-Contest], In Order to Make the Test Cases Strong. [Since Testers Might Miss Some Corner Cases and Brute Force Solutions Starts Getting Accepted]


I agree making good tests is a bit difficult, but if the whole community would be involved somehow, the platform would improve and skills of participants also as the main aim is to improve ourselves not rating, so if only correct solutions would pass people would scratch their heads for an optimized solution only and not just writing everything that comes in mind and get it passed.

1 Like

sure bro