Skip to content

Commit 733e40f

Browse files
committed
Runtime: 195 ms (Top 40.35%) | Memory: 37.6 MB (Top 80.95%)
1 parent 8258a74 commit 733e40f

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
// Runtime: 195 ms (Top 40.35%) | Memory: 37.6 MB (Top 80.95%)
12
class MyCalendar {
23
public:
3-
vector<pair<int,int>>cal;
4-
MyCalendar() {
4+
vector<pair<int,int>>cal;
5+
MyCalendar() {
56

6-
}
7+
}
78

8-
bool book(int start, int end) {
9-
for(int i=0;i<cal.size();i++){
10-
if(end<=cal[i].first || start>=cal[i].second)continue;
11-
else return false;
12-
}
13-
cal.push_back({start,end});
14-
return true;
15-
}
9+
bool book(int start, int end) {
10+
for(int i=0;i<cal.size();i++){
11+
if(end<=cal[i].first || start>=cal[i].second)continue;
12+
else return false;
13+
}
14+
cal.push_back({start,end});
15+
return true;
16+
}
1617
};

0 commit comments

Comments
 (0)