any suggest to solve this problem using rmq(segment tree) http://codeforces.com/contest/71/problem/D

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

1 | Benq | 3797 |

2 | tourist | 3723 |

3 | Radewoosh | 3720 |

4 | ecnerwala | 3579 |

5 | ksun48 | 3463 |

6 | Um_nik | 3457 |

7 | maroonrk | 3446 |

8 | jiangly | 3432 |

9 | Petr | 3370 |

10 | scott_wu | 3350 |

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

1 | 1-gon | 208 |

2 | awoo | 184 |

2 | rng_58 | 184 |

4 | Errichto | 182 |

5 | SecondThread | 177 |

6 | maroonrk | 176 |

6 | Radewoosh | 176 |

6 | -is-this-fft- | 176 |

9 | Um_nik | 173 |

10 | antontrygubO_o | 169 |

any suggest to solve this problem using rmq(segment tree) http://codeforces.com/contest/71/problem/D

↑

↓

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/22/2021 08:53:40 (h1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

I remembered that I solved this problem in a very straightforward manner, with quite long codes. Well, it is a little difficult for me to relate this problem with RMQ....

it may need 2d segment tree

Now I understand why I can not establish the relationship between segment tree and that problem....

If you figure out how to solve it based on 2D segment tree, it is really nice for you to share some materials or discussion about it. I think 2D segment tree is really an advanced technique, at least for me.

yes i dont use 2d segment tree before but i think i need to learn it if i do it i will share it :)