Fix #2: Make sure 0-weight cards are never selected

This commit is contained in:
Anthony Wang 2022-11-15 19:10:49 -05:00
parent a73b0c48a6
commit cd9b330a1f
Signed by: a
GPG Key ID: 42A5B952E6DD8D38

View File

@ -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 {