diff options
author | Anthony Wang | 2022-11-15 19:10:49 -0500 |
---|---|---|
committer | Anthony Wang | 2022-11-15 19:10:49 -0500 |
commit | cd9b330a1f0da99e3dc8ba01d5690cfeec424220 (patch) | |
tree | 68d46b7ab742924ff0f713ba43f35f06ecf76e3c /segmenttree.c | |
parent | a73b0c48a60bb96306e9c5ef7351200cb04ee03d (diff) |
Fix #2: Make sure 0-weight cards are never selected
Diffstat (limited to 'segmenttree.c')
-rw-r--r-- | segmenttree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/segmenttree.c b/segmenttree.c index 418c78e..e9f38da 100644 --- a/segmenttree.c +++ b/segmenttree.c @@ -39,7 +39,7 @@ void query(int *res, int v, int l, int r, int n) { return; } int m = l + r >> 1; - if (seg[n << 1] >= v) { + if (seg[n << 1] > v) { query(res, v, l, m, n << 1); } else { |