Skip to content

Commit 8a471ab

Browse files
authored
Update online-election.cpp
1 parent 197d0f4 commit 8a471ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/online-election.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TopVotedCandidate {
1616
}
1717

1818
int q(int t) {
19-
return prev(upper_bound(lookup_.begin(), lookup_.end(),
19+
return prev(upper_bound(lookup_.cbegin(), lookup_.cend(),
2020
make_pair(t, numeric_limits<int>::max())))->second;
2121
}
2222

0 commit comments

Comments
 (0)