>From the contest analysis: "Finally, if you use precomputation in your solution, remember that you are required to provide us not only with the code that you actually used to solve the problem (containing the precomputed values), but also the code that you used for precomputation."
~mhb On Mon, Apr 15, 2013 at 2:06 PM, Carlos Guia <[email protected]>wrote: > What I understand about the rules is that you must give the full source > used, to precompute and generate the output. So, if you have a precomputing > code that dumps the values to a file and your output generator uses the > values directly from the file (not inside the code). You should be fine, as > long as you provide both codes. > > So you should provide everything that is needed to compute the output, > even if it's trickier than just running one program. > > So instead of a comment saying you have more, just provide the code that > generates the whole thing. > > Carlos Guía > > > On Mon, Apr 15, 2013 at 10:36 AM, Tigro <[email protected]>wrote: > >> I'm relatively new to GCJ so please forgive me the foolish question :) >> Namely: if there is some task where you could greatly benefit from >> precomputing some resources (like precomputing fair and square numbers for >> Fair and Square task, for example) and then using the calculated ones in >> your code, could you do it even when they don't fit in your source code as >> long as you give the right annonation? >> >> I mean: say we computed all fair and square numbers up to 10^5000 (yeah, >> I know the limit was lower, it's hypothetical) - we won't be able to have >> them in an array like fairAndSquare = [<whole lotta numbers here>] cause >> our code will greatly exceed the limit. Hence, can we calculate the >> solution using such code but at the same time submit a source code with the >> array in a form like: farAndSquare = [0, 1, 4, 9, 121, 484, 10201, 12321, >> 14641, 40804 """<I precomputed 1000 more and used it in my solution>"""]? >> Is it legal or does the code have to behave in such a way that in case it >> was compiled any time later and given the test input as standard input, it >> would produce the exactly same output we submitted as the standard output? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Code Jam" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/google-code/-/Qv1_5pXPU7MJ. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
