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 |
Tags
- 핑거스타일
- pytorch
- YOLO
- 채보
- 컨테이너
- Linux
- windows forms
- mysql
- Numpy
- paramiko
- C#
- Selenium
- Docker
- Python
- C++
- VS Code
- LIST
- JSON
- C
- pandas
- pip
- label
- 오류
- OpenCV
- SSH
- 기타 연주
- Visual Studio
- ubuntu
- error
- 프로그래머스
Archives
- Today
- Total
목록튜플 (1)
기계는 거짓말하지 않는다
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bkuRv6/btq3y6RvHJC/gPShPkFcIbgECwvYqNSY10/img.png)
프로그래머스 - 튜플 문제입니다. 양쪽의 중괄호를 먼저 제거하고, 다음 중괄호 안의 원소만 ,를 포함해서 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