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 32 other people reading this forum.


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

Login to reply

👍?
helpful
10:55am Fri 4th Oct, Andrew G.

ANONYMOUS wrote:
> Hi, just wondering why the input time is taken into account in the total time. For flip, just processing the input takes about 5 seconds for a 1000x1000 grid, and the actual algorithm part takes about 8 seconds. All together it is over 10 seconds hence hits time limit but the algorithm part is under 10 seconds. Do we need to optimise it so that it is under 10 seconds all together? Thanks
Reasonable input times are accounted for in the runtime limits, and should rarely if ever be the dominating factor. The time limits and bounds are set so as to distinguish algorithms with acceptable time complexities from those that are too slow. Given that many of the accepted submissions for FLIP are able to solve each test case in under a second (and the best takes 0.6 seconds at worst), I believe that your code for processing the input is unnecessarily inefficient. DOMjudge is only able to assess the runtime of your total program, including input, so yes, you must read the input, solve the problem, and output the answer within the time limit. Cheers, Gozz

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