반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- incr
- 백준
- boj #19237 #어른 상어
- msSQL
- 경력
- BOJ
- 이분탐색
- compose
- dfs
- 기술면접
- 6987
- 백트래킹
- upper_bound
- 처우산정
- 성적평가
- 연결요소
- @P0
- 퇴사통보
- 오퍼레터
- softeer
- Kafka
- BFS
- 처우협의
- 매개변수탐색
- 물채우기
- 13908
- 소프티어
- 파라메트릭
- OFFSET
- Docker
Archives
- Today
- Total
기술 블로그
스킬트리 본문
728x90
반응형
https://programmers.co.kr/learn/courses/30/lessons/49993
C++ STL인
find()와 is_sorted()의 개념만 알고있으면,
매우 쉽게 풀 수 있다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <bits/stdc++.h> using namespace std; int solution(string skill, vector<string> skill_trees) { int answer = 0; for (auto i : skill_trees) { vector<int> v; for (auto j : skill) v.push_back(find(i.begin(), i.end(), j) - i.begin()); if (is_sorted(v.begin(), v.end())) ++answer; } return answer; } | cs |
728x90
반응형