Блог пользователя TuHoangAnh

Автор TuHoangAnh, история, 2 года назад, По-английски

given 2 intergers $$$N,M$$$.

you have an array of $$$N$$$ integers and $$$M$$$ queries. Each query has 2 types:

type "1": $$$1$$$ $$$pos$$$ $$$val$$$ (change the value at position $$$pos$$$ to $$$val$$$)

type "2": $$$2$$$ $$$l$$$ $$$r$$$ $$$k$$$ (printf the value of the minimum element in range [l,r] that's not smaller than $$$k$$$)

i used segment tree with multiset to solve this problem, i'm wondering why my code got WA.

here is my code:https://ideone.com/6DtYsJ

  • Проголосовать: нравится
  • -16
  • Проголосовать: не нравится

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I hope that should help:

https://paste.ofcode.org/Skxye9AuPvAb96XUAyXJfr

Good luck!

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by TuHoangAnh (previous revision, new revision, compare).