We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 197d0f4 commit 8a471abCopy full SHA for 8a471ab
C++/online-election.cpp
@@ -16,7 +16,7 @@ class TopVotedCandidate {
16
}
17
18
int q(int t) {
19
- return prev(upper_bound(lookup_.begin(), lookup_.end(),
+ return prev(upper_bound(lookup_.cbegin(), lookup_.cend(),
20
make_pair(t, numeric_limits<int>::max())))->second;
21
22
0 commit comments