#  User  Rating 

1  tourist  3819 
2  Benq  3745 
3  ksun48  3560 
4  Radewoosh  3511 
5  Um_nik  3489 
6  peehs_moorhsum  3460 
7  Petr  3414 
8  Miracle03  3410 
9  maroonrk  3400 
10  sunset  3338 
#  User  Contrib. 

1  1gon  208 
2  awoo  182 
3  Errichto  180 
4  Um_nik  179 
5  isthisfft  174 
5  maroonrk  174 
7  Radewoosh  172 
7  tourist  172 
9  SecondThread  170 
10  rng_58  166 
18
to be more specific, it will be a substring of the string you mentioned :P 
0
Great explanation..:)

0
And Of course handle of the today's problem setter is "map" :)

0
Can you please explain this?

0
Did you try C? I saw codes of some top rankers..but couldn't make anything from it..

0
I made the exact same mistake :(

0
Interesting concept..can we know in advance what is the set of languages from which you will choose ? And won't there be in unfair advantage to guys who already know that language well..

0
>> Now I know there is priority_queue available. But it implements either min heap or max heap.
Right. If you analyse emaxx 's comment then you would realise that median heap can be implemented by maintaining two heaps and doing some operations to balance the number of elements in these two heaps. You may test your implementation in this problem: www.spoj.pl/problems/WEIRDFN 
0
I feel that this is doable using a dumb greedy algorithm.

+8
My bad..didn't realise that choosing 1 number would uniquely determine(if possible) the other numbers in a connected component ..

0
So, using this we would know the product of numbers for each pair of nodes having an edge..that would still leave us with a large state space right?

0
Sorry, for the silly question. It wouldn't matter as i just realized, since irrespective of direction they will have conflict and hence must be placed in opposite sides.

0
I meant problem D: Ring Road 2

0
For problem we consider that the road can be build only in clockwise direction. What about the possibility that we can build the road in anti clock wise direction ? Was it implied in the problem statement that the roads will be clockwise?

0
Thanks Mike.

0
For problem D I was getting Wrong answer because of printing a newline after "a b"
And i wasted lot of time thinking that my approach was correct. I tried removing the newline from print statemnt and got AC!. I think the judge should ignore the Presentation error Or at least detect that and display the status accordingly. 
Name 
