## Search found 100 matches

Fri Aug 17, 2007 4:13 am
Forum: Volume 1 (100-199)
Topic: 110 - Meta-Loopless Sorts
Replies: 92
Views: 8499
I think my method that involved stringstreams and std::strings was too much overhead for the extended amounts of things to do, I changed it to use C strings and it no longer times out, it gives WA but that's something I'll have to deal with.
Thu Aug 16, 2007 5:41 pm
Forum: Volume 1 (100-199)
Topic: 110 - Meta-Loopless Sorts
Replies: 92
Views: 8499

### 110: is the judge cheating?

Hello, I am getting TLE in the 110 problem, which is odd nonetheless since this is how my algorithm works: - generate solutions for 1->8 cases and store in array - for each input output value in array, The solution generation takes 1 second in my computer, so it is quite unbelievable to think it is ...
Thu Jul 19, 2007 8:38 pm
Forum: Volume 8 (800-899)
Topic: 847 - A Multiplication Game
Replies: 41
Views: 20904
why 13123 makes Stan the winner? My AC program makes Ollie the winner for 13123. In fact, I'd like to know very much your strategy to make Stan win. Wanna play a game of multiplication with n=13123? I will play Ollie, anyone volunteer to play Stan? :P My AC program makes Stan the winner for 13123. ...
Thu Feb 22, 2007 6:28 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 193778
In a less esoteric way of doing things, 100 has a fast solution in which you keep an array as a table for solutions you got already. For example f(15) requires your to solve f(46) so if you later go through f(46) you don't have to calculate f(46) again since the program 'remembers' the solution for ...
Thu Feb 22, 2007 6:19 am
Forum: Volume 111 (11100-11199)
Topic: 11168 - Airport
Replies: 19
Views: 9162
Thanks for your help everyone. It was a very silly thing indeed. Turns out that in some place I was doing printf("%0.3lf",0); as a rushed modiffication to handle some special cases. But 0 is not a double, it is an integer, so the code was actually undefined, it could pretty much generate random numb...
Wed Feb 21, 2007 11:38 pm
Forum: Volume 111 (11100-11199)
Topic: 11168 - Airport
Replies: 19
Views: 9162
returns 0.167 which I think is the right answer.
Wed Feb 21, 2007 10:19 pm
Forum: Volume 111 (11100-11199)
Topic: 11168 - Airport
Replies: 19
Views: 9162
Thanks.

I forgot about the n=1 case. But still WA.

- Works when all points are in a line
- Works with n<3

Any other special cases?
Wed Feb 21, 2007 9:55 pm
Forum: Volume 4 (400-499)
Topic: 414 - Machined Surfaces
Replies: 49
Views: 9458
12 X XXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX...
Wed Feb 21, 2007 6:11 am
Forum: Volume 6 (600-699)
Topic: 681 - Convex Hull Finding
Replies: 60
Views: 21296
I got AC after trying a lot of times, some hints: - Sure Finding Hull precisely considering all the degeneracy is a hard task, but that is not a reason to skip the formatting of the output. Before jumping on conclusions about your convex hull finding algorithm double check that your program is using...
Wed Feb 21, 2007 4:49 am
Forum: Volume 111 (11100-11199)
Topic: 11168 - Airport
Replies: 19
Views: 9162
My new algorithm is giving me WA, but it does krijger's output correctly so I am pretty much betting it is not a mistake with the algorithm but something silly. What output do you get for the input generated by:? int main() { printf("1\n10000\n"); int i=0; while (i<10000) { int j=80000-(i %6); print...
Tue Feb 20, 2007 4:21 pm
Forum: Volume 101 (10100-10199)
Topic: 10135 - Herding Frosh
Replies: 33
Views: 13213
...
Now I got WA, anyone got more test cases? The sample one and the one posted here are correct for my algorithm

Edit: I found a lot of i/o that is wrong, nevermind.
Tue Feb 20, 2007 4:14 pm
Forum: Volume 101 (10100-10199)
Topic: 10135 - Herding Frosh
Replies: 33
Views: 13213
odd that I missed it thanks.
Tue Feb 20, 2007 3:18 am
Forum: Volume 101 (10100-10199)
Topic: 10135 - Herding Frosh
Replies: 33
Views: 13213
Hi! Figuring out the answer to your question has now taken me roughly an hour (though the answer is quite simple). Good question. :) The problem with your algorithm is that your choice of M is not necessarily the optimal choice. For instance, if the origin is very close to v_i, it is better to put ...
Tue Feb 20, 2007 12:48 am
Forum: Volume 111 (11100-11199)
Topic: 11168 - Airport
Replies: 19
Views: 9162
Before reading your post, I tried with an average point. So I only had to get the line with the minimum distance to it and then get the average distance, it seems it did not work since I got WA... Might as well try with the median. But well, I am gonna research until I find a way to calculate the av...
Mon Feb 19, 2007 8:05 pm
Forum: Volume 111 (11100-11199)
Topic: 11168 - Airport
Replies: 19
Views: 9162

### 11168 - Airport

Hello. The issue: TLE . This is my algorithm:
- Get Convex hull.
- Form lines using each consecutive pair of points in the convex hull and calculate average distance
- Get min of that.

I guess that the issue lies in calculating the average distance so many times... Any ideas?