Search found 6 matches

by LifeMaker
Fri Aug 03, 2012 5:11 pm
Forum: Volume 1 (100-199)
Topic: 191 - Intersection
Replies: 103
Views: 18588

Re: 191 WA , plizzzzzzzzzzzz help me

The trick is that: "The rectangle consists of four straight lines and the area in between." so the line segment can intersect with a the area of the rectangle, and not necessarily intersect with the one of the sides of the rectangle.

so, for this test case:

Code: Select all

1
1 1 2 2 0 4 4 0
the ouput is

Code: Select all

T
by LifeMaker
Wed Nov 24, 2010 12:10 am
Forum: Volume 107 (10700-10799)
Topic: 10731 - Test
Replies: 13
Views: 5539

Re: 10731 - Test

i'm also getting WA for this problem, and it got me frustrated :( i apply tarjan's algorithm, to get SCC. i put each scc in a structure called Element which contains arrayList<Character> then i sort it and i convert the sorted list to a string. after sorting i add this scc element to and array list ...
by LifeMaker
Fri Sep 24, 2010 9:39 am
Forum: Volume 116 (11600-11699)
Topic: 11635 - Hotel booking
Replies: 39
Views: 11220

Re: 11635--Hotel Booking

i'm really interested in knowing the correct approach to this problem, so can anyone please reply to this thread i tried different approaches, but they all failed. now i got AC but in 2.7 seconds :-? (so clearly my algo. isn't good and there are much better ones) the idea of my soln is that i apply ...
by LifeMaker
Mon Sep 20, 2010 4:37 pm
Forum: Volume 118 (11800-11899)
Topic: 11834 - Elevator
Replies: 11
Views: 4498

Re: 11834 - Elevator

thanks a lot krien, i got it now :)
by LifeMaker
Mon Sep 20, 2010 2:00 pm
Forum: Volume 118 (11800-11899)
Topic: 11834 - Elevator
Replies: 11
Views: 4498

Re: 11834 - Elevator

sorry pdwd, but i didn't understand what ctgPi said :oops: i'd be really grateful if you could illustrate it more
and if this approach is totally wrong, what is the correct approach to this problem :-?
by LifeMaker
Sun Sep 19, 2010 11:39 pm
Forum: Volume 118 (11800-11899)
Topic: 11834 - Elevator
Replies: 11
Views: 4498

11834 - Elevator

Hi all, i was trying to solve this problem "Elevator" from the Brazilian National Contest http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=226&page=show_problem&problem=2934 my approach is to get the minimum diagonal of a rectangle to enclose the 2 circles, and if this d...

Go to advanced search