## Search found 37 matches

Mon Oct 31, 2011 11:24 am
Forum: Volume 123 (12300-12399)
Topic: 12307 - Smallest Enclosing Rectangle
Replies: 4
Views: 2614

### Re: 12307 - Smallest Enclosing Rectangle

The basic idea is correct. Attention to colinear points especially when you're calculating convex hull by granham's original algorithm, not andrew's variation (this one is preferred). You can send me an email with your code and I'll test it with judge data.
Tue May 03, 2011 3:30 pm
Forum: Volume 119 (11900-11999)
Topic: 11991 - Easy Problem from Rujia Liu?
Replies: 32
Views: 8735

### Re: 11991 - Easy Problem from Rujia Liu?

@MRH

if i understand your algorithm correctly, if all the numbers are equal, each query would be linear on average, so TLE
Thu Apr 28, 2011 1:21 pm
Forum: Volume 119 (11900-11999)
Topic: 11991 - Easy Problem from Rujia Liu?
Replies: 32
Views: 8735

### Re: 11991 - Easy Problem from Rujia Liu?

Does the following code make sense to you? inline int readint() { char c = getchar(); while(!isdigit(c)) c = getchar(); int x = 0; while(isdigit(c)) { x = x * 10 + c - '0'; c = getchar(); } return x; } BTW: You don't need this kind of tricks to get AC for any problem in this problemset. In most case...
Mon Feb 07, 2011 5:45 am
Forum: Volume 119 (11900-11999)
Topic: 11922 - Permutation Transformer
Replies: 0
Views: 1622

### 11922 - Permutation Transformer

I'm making this problem for educational purpose. So here are the 2 methods used by me (method 1) and Derek Kisman (method2). Method 1 is theoretically faster, but given the limitations of the problem, both programs run very fast. He hints are encoded by rot13, so you won't be able to see them "accid...
Mon Jan 03, 2011 3:40 pm
Forum: Volume 116 (11600-11699)
Topic: 11675 - Happy Friends
Replies: 6
Views: 3086

### Re: 11675 -Happy Friends

I think for every problems in UVA need hints to learn problem solving. So request to everyone, give hints to learn new technique . Uva problem setter always try to adapt new problem with new idea. But how can we learn new Idea? Thanks all problem setter. Right, you need to keep learning :) If you c...
Sat Dec 18, 2010 9:17 am
Forum: Volume 118 (11800-11899)
Topic: 11878 - Homework Checker
Replies: 23
Views: 8361

### Re: 11878 - Homework Checker

try this: printf("%d",count); ==> printf("%d\n",count);
Sat Nov 06, 2010 10:02 am
Forum: Volume 118 (11800-11899)
Topic: 11883 - Repairing a Road
Replies: 6
Views: 2691

### Re: 11883

asif_iut wrote:what should have been the idea for solving this problem??
you may take a look at this: http://en.wikipedia.org/wiki/Ternary_search
Wed Nov 03, 2010 5:14 am
Forum: Volume 118 (11800-11899)
Topic: 11883 - Repairing a Road
Replies: 6
Views: 2691

### Re: 11883

asif_iut wrote:thanks a lot bm_anas...i made a stupid error as well as reduced the eps to 1e-2 and AC!!!! thanks once again...
oops, this is not the intended way to solve this problem. The test cases are not strong enough but I admit that I have no idea how to generate good ones. Any one has some ideas?
Wed Nov 03, 2010 5:04 am
Forum: Volume 118 (11800-11899)
Topic: 11881 - Internal Rate of Return
Replies: 3
Views: 2672

### Re: 11881 Internal Rate of Return

Sorry, I was not aware of this error during the contest. The wrong formula is resulted from to the quick generation of HTML from DOC.
Now the figure is corrected. Thanks for pointing it out!
Sun Jul 22, 2007 12:10 pm
Forum: Volume 112 (11200-11299)
Topic: 11215 - How Many Numbers?
Replies: 11
Views: 4865
I been thinking about this problem and the algorithm I thinking is straightforward but it seems too slow: Create an array "ops" with the four operations: +, -. *, / Read an array "numbers" and store the n numbers of input Create a function to create all possible sets of size n-1 where each element ...
Mon Jul 16, 2007 10:13 pm
Forum: Volume 111 (11100-11199)
Topic: 11199 - Equations in Disguise
Replies: 16
Views: 7048
Hello rio, Thanks very much! I tried something similar to the second idea you proposed and some prune. My program took about 30 seconds for the testdata you provide above. It is faster than before, but still slow, and it still got TLE in the onlinejudge. Can we check whether the expression has solu...
Thu Jun 14, 2007 2:35 pm
Forum: Volume 112 (11200-11299)
Topic: 11214 - Guarding the Chessboard
Replies: 13
Views: 4705
Akter_Sust wrote:For all this test case output is 2.
But type of the 2 and 3 no of test case is not in the judge test case
because one of my accepted code is fail generate this output.
Thanks I guess I'll improve the data someday later
Thu Jun 07, 2007 5:57 pm
Forum: Volume 112 (11200-11299)
Topic: 11209 - Be Together Again and Forever
Replies: 9
Views: 3337
yiuyuho wrote:736 yiuyuho Be Together Again and Forever Solved C++ 0.850 2007-06-03 08:28:28

The time during contest was < 1sec...there must have been an error...lol!
maybe that's because the old server (on which you got TLE) uses a older version of g++?
I'm not sure.
Thu Jun 07, 2007 9:03 am
Forum: Volume 112 (11200-11299)
Topic: 11209 - Be Together Again and Forever
Replies: 9
Views: 3337

### Re: 11209 Be Together Again and Forever

yiuyuho wrote:I think I get this problem during contest and I submitted the same algorithm to the OJ and get TLE....did the data got enhanced?

What's happening?
I wanted to enhance the data but finally i did not What is the runtime during the contest?
Thu Jun 07, 2007 4:13 am
Forum: Volume 112 (11200-11299)
Topic: 11214 - Guarding the Chessboard
Replies: 13
Views: 4705
I have the running theory.. that in the rare(?) case that the greedy algorithm fails, it will only be off by one -- I wonder if there's some way to detect this case quickly and subtract one? hmm... Yep, that is exactly how I worried when designing test cases. So I used a few pairs of test cases wit...