It's UWAweek 47

help3001

This forum is provided to promote discussion amongst students enrolled in CITS3001 Advanced Algorithms.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 202 articles.
Currently 31 other people reading this forum.


 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
9:11am Sun 6th Oct, Max WG.

"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.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy