Skip to content

Commit e0e5e9f

Browse files
author
rom.spiridonov
committed
feat: feat: add solutions to lc problem: No.3413
1 parent 934b448 commit e0e5e9f

File tree

1 file changed

+5
-2
lines changed
  • solution/3400-3499/3413.Maximum Coins From K Consecutive Bags

1 file changed

+5
-2
lines changed

solution/3400-3499/3413.Maximum Coins From K Consecutive Bags/Solution.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ class Solution {
44
int start = -1, end = -1, value = 0;
55

66
interval() = default;
7-
interval(int _start, int _end, int _value) : start(_start), end(_end), value(_value) {}
7+
interval(int _start, int _end, int _value)
8+
: start(_start)
9+
, end(_end)
10+
, value(_value) {}
811

9-
bool operator < (const interval &other) const {
12+
bool operator<(const interval& other) const {
1013
return start < other.start || (start == other.start && end < other.end);
1114
}
1215
int64_t cost() const { return int64_t(value) * (end - start + 1); }

0 commit comments

Comments
 (0)