http://www.spoj.com/problems/HEAPULM/

how to solve this problem?? I tried a lot but i didn't get any idea how to solve this..

Thanks in Advance :)

# | User | Rating |
---|---|---|

1 | tourist | 3434 |

2 | fateice | 3337 |

3 | Um_nik | 3292 |

4 | OO0OOO00O0OOO0O0…O | 3280 |

5 | Syloviaely | 3274 |

6 | Petr | 3223 |

7 | Swistakk | 3105 |

8 | mnbvmar | 3096 |

9 | yosupo | 3091 |

10 | dotorya | 3081 |

# | User | Contrib. |
---|---|---|

1 | rng_58 | 163 |

2 | tourist | 160 |

3 | csacademy | 152 |

4 | Petr | 151 |

5 | Swistakk | 148 |

6 | Um_nik | 144 |

7 | Vovuh | 142 |

7 | Nickolas | 142 |

9 | BledDest | 138 |

9 | PikMike | 138 |

9 | matthew99 | 138 |

http://www.spoj.com/problems/HEAPULM/

how to solve this problem?? I tried a lot but i didn't get any idea how to solve this..

Thanks in Advance :)

↑

↓

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/23/2018 05:17:19 (d2).

Desktop version, switch to mobile version.

User lists

Name |
---|

Umm, The problem just asks you to create a treap, which is a very standard data structure. Simple googling will provide you with a code and explanation.

http://www.geeksforgeeks.org/treap-set-2-implementation-of-search-insert-and-delete

I found this problem in a list of segment tree problem, so i thought it is solvable by segtree , but thanks for your idea :)