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
- OpenCV
- nvidia-smi
- label
- C
- Linux
- C#
- Visual Studio
- mysql
- pip
- JSON
- Python
- error
- YOLO
- C++
- windows forms
- paramiko
- VS Code
- 컨테이너
- Numpy
- 프로그래머스
- Docker
- 채보
- pytorch
- SSH
- pandas
- Selenium
- 오류
- 핑거스타일
- ubuntu
- 기타 연주
Archives
- Today
- Total
목록튜플 (1)
기계는 거짓말하지 않는다

프로그래머스 - 튜플 문제입니다. 양쪽의 중괄호를 먼저 제거하고, 다음 중괄호 안의 원소만 ,를 포함해서 string 벡터에 담아야겠다는 생각을 했습니다. 원소 수가 적은 집합을 오름차순으로 정렬 후 중복되지 않게 차례대로 정답 벡터에 추가합니다. ,를 기준으로 끊어 number를 확인 합니다. 중복 확인은 unordered_set 을 사용했습니다. 마지막에는 ,가 없으므로 배열 길이의 마지막에 도달하면 number를 한번 더 확인합니다. #include #include #include #include using namespace std; bool cmp(string a, string b) { return a.length() < b.length(); } vector solution(string s) { ..
Programming Test
2021. 4. 27. 16:59