Comments
-18

to be more specific, it will be a substring of the string you mentioned :P

Great explanation..:)
0
And Of course handle of the today's problem setter is "map" :)
Can you please explain this?
On coders1122Codeforces Round 58, 10 years ago
0
Did you try C? I saw codes of some top rankers..but couldn't make anything from it..
On coders1122Codeforces Round 58, 10 years ago
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..
On acc1Median Heap...yeah mmm..., 10 years ago
0
>> Now I know there is priority_queue available. But it implements either min heap or max heap.

Right. If you analyse e-maxx '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
I feel that this is doable using a dumb greedy algorithm.
On Aksenov239Codeforces Beta Round #56, 10 years ago
+8
My bad..didn't realise that choosing 1 number would uniquely determine(if possible) the other numbers in a connected component ..
On Aksenov239Codeforces Beta Round #56, 10 years ago
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?
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.
I meant problem D: Ring Road 2
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.