"Joshua Chin" <23*0*7*
4@s*u*e*t*u*a*e*u*a*> wrote:
> ANONYMOUS wrote:
>
> > If you did a 1000x1000 grid, but it was all one colour, then the program would probably run very quickly. In the same way, you can try to generate a test that would cause your program to run the maximum amount of computations (worst case), and see if that exceeds the 10s limit rather than using random inputs because random ones are most likely going to run very quickly
>
> the full code is
> symbols = ['.', 'x']
> diagram = [[random.choice(symbols) for _ in range(num_columns)] for _ in range(num_rows)]
>
> it is completely random on what the grid would look like for the two colours, and i dont know how to 'really' generate a true worst case given it has to have 1000 rows and 1000 columns by hand
>
> i have tried creating a file containing the 1000x1000 grid with again completely randomised dots and x's, then feeding it into my program directly which also gives a time within 10s
>
> i am really lost on what to do since the hidden cases always output TIME LIMIT when it should give WRONG ANSWER if my program doesnt give the correct answer in the first place
If you are struggling to solve the question, and properly analyzing the worst case is part of solving, then I suggest moving on to trying different problems. You can get 93 points without solving flip.