Skip to content

Commit 41bd3dd

Browse files
authored
Update grumpy-bookstore-owner.cpp
1 parent 88d8e3b commit 41bd3dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/grumpy-bookstore-owner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Solution {
55
public:
66
int maxSatisfied(vector<int>& customers, vector<int>& grumpy, int X) {
77
int result = 0, max_extra = 0, extra = 0;
8-
for (auto i = 0; i < customers.size(); ++i) {
8+
for (int i = 0; i < customers.size(); ++i) {
99
result += grumpy[i] ? 0 : customers[i];
1010
extra += grumpy[i] ? customers[i] : 0;
1111
if (i >= X) {

0 commit comments

Comments
 (0)