[gcj] Re: Round 3, Problem A. Binary search really necessary for O(n) solution?

2014-06-22 Thread evandrix
Hi, I tried to run your solution through (using PyPy 2.3.1) A-large-practice, and received the WA judgment on your output using that code. Is it meant to produce AC code through A-large-practice.in? Lee Wei On Sunday, June 22, 2014 12:09:54 AM UTC+8, Eibe wrote: I just read the analysis for

Re: [gcj] Re: Round 3, Problem A. Binary search really necessary for O(n) solution?

2014-06-22 Thread Luke Pebody
I guess you'd probably want res = 1 - (solveig + 0.0) / sum(ts) as the penultimate line. Sent from my iPad On 22 Jun 2014, at 09:48, evandrix evand...@gmail.com wrote: Hi, I tried to run your solution through (using PyPy 2.3.1) A-large-practice, and received the WA judgment on your

[gcj] Re: Round 3, Problem A. Binary search really necessary for O(n) solution?

2014-06-22 Thread Eibe
oops, a copy and paste mistake I made. I forgot the first line of the code: from __future__ import division -- 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

Re: [gcj] Re: Round 3, Problem A. Binary search really necessary for O(n) solution?

2014-06-22 Thread Luke Pebody
Yes, this solution works. Sadly, I came up with this solution after the contest. The solution that I crafted during the contest was the binary-search method, but I had a little bug in deciding whether a given value would not work. My method worked for all of the examples in the small test, and

Re: [gcj] Re: Contest analysis for GCJ 2014 Round 3

2014-06-22 Thread Felix Halim
Hi evandrix, We have updated the sample implementation for problem D to not use STL map thus it is now O(N^2). It does take about 1 minute to run for the large input with -O2 optimization for C++11. Felix Halim On Fri, Jun 20, 2014 at 2:44 AM, evandrix evand...@gmail.com wrote: Hi, The