competitive-programming Every range query/update data structure uses half-open intervals (that is, [l, r)).