1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | class Solution { public: int findMinArrowShots(vector<vector<int>>& points) { sort(points.begin(), points.end()); // int cur = points[0].second; int cur = points[0][1]; int ans = 1; for(int i = 1; i < points.size(); i++){ if(points[i][0] > cur){ ans++; cur = points[i][1]; } else cur = min(cur, points[i][1]); } return ans; } }; | cs |
230105 데일리
꽃지(sanholobeats)
2023-01-05 18:43
추천 0
댓글 3
다른 게시글
-
2244. Minimum Rounds 이거 푸는데TS(119.64) | 23.01.05추천 0
-
데일리 문제 어떻게 알아봄...? [1]TS(119.64) | 23.01.05추천 0
-
230104 데일리 [1]꽃지(sanholobeats) | 23.01.04추천 0
-
Minimum Rounds to Complete All Task개발뉴비(coderhs) | 23.01.04추천 0
-
944. Delete Columns to Make Sorted in TS익명(119.64) | 23.01.04추천 0
-
백준 17726 Inheritance꽃지(sanholobeats) | 23.01.04추천 0
-
백준 14503번 로봇 청소기개발뉴비(coderhs) | 23.01.04추천 0
-
오늘의 릿코드 Delete Columns to Make Sorted [1]개발뉴비(coderhs) | 23.01.03추천 0
-
오늘의 데일리 [1]꽃지(sanholobeats) | 23.01.03추천 0
-
리트코드 해보면서 느낀 점익명(119.64) | 23.01.03추천 0
무슨 언어인가요
cpp입니다
므찌네여