전체 글
-
[programmers] 폰켓몬 / C++공부/PS (programmers) 2022. 7. 27. 00:54
https://school.programmers.co.kr/learn/courses/30/lessons/1845 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include using namespace std; set pokemon; int solution(vector nums) { int answer = 0; int N = nums.size(); // 1 - 10000 for(int i=0; i
-
[MySQL] Database/Table 생성하기공부/MySQL 2022. 7. 25. 00:12
1. cmd로 MySQL 실행 mysql -u root -p 2. Database 조회 SHOW DATABASES; 3. Database 생성 및 사용 CREATE DATABASE [database_name]; USE [database_name]; 4. Table 생성 5. TABLE에 UNIQUE Key 추가 id를 기준으로 중복되는 컬럼을 허용하고 싶지 않기 때문에 id 컬럼을 UNIQUE key로 지정해줄것이다. 즉, 하나의 id에 대해서 항상 하나의 row를 유지할 것이다. ALTER TABLE [table_name] ADD UNIQUE KEY ([column_name]); 6. Table에 column 추가 🎈 맨 앞에 추가하는 경우 ALTER TABLE [table_name] ADD [colu..
-
[programmers] 이상한 문자 만들기 / C++공부/PS (programmers) 2022. 7. 20. 23:18
https://school.programmers.co.kr/learn/courses/30/lessons/12930?language=cpp 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include using namespace std; string solution(string s) { string answer = ""; string tmp = ""; string space_delimiter = " "; vector vec; size_t pos = 0; while ((pos = s.find(space_delimiter)) ..
-
[programmers] 제일 작은 수 제거하기 / C++공부/PS (programmers) 2022. 7. 19. 23:02
https://school.programmers.co.kr/learn/courses/30/lessons/12935 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include #include using namespace std; vector solution(vector arr) { vector answer; if(arr.size() == 1) answer.push_back(-1); else { int minNum = *min_element(arr.begin(), arr.end()); //cout
-
[programmers] 소수 만들기 / C++공부/PS (programmers) 2022. 7. 19. 22:33
https://school.programmers.co.kr/learn/courses/30/lessons/12977 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include using namespace std; int answer = 0; int visited[1001]; int sel[10]; int isPrime(int num) { if(num == 1) return 0; // 소수 X int root = sqrt(num); for(int i=2; i= 3) { int sum = 0; for(int i=0; i
-
[programmers] 두 개 뽑아서 더하기 / C++공부/PS (programmers) 2022. 7. 19. 22:14
https://school.programmers.co.kr/learn/courses/30/lessons/68644 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include #include #include using namespace std; set s; vector solution(vector numbers) { vector answer; int size = numbers.size(); for(int i=0; i
-
Adafruit ESP32 Feather V2 CH2102F 사용해보기 (1) - 환경설정부터 예제 코드 실행까지공부/etc 2022. 6. 22. 23:16
1. Arduino IDE setup 참고) https://learn.adafruit.com/adafruit-esp32-feather-v2/arduino-ide-setup 1) CP210x Windows Drivers 설치 https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers CP210x USB to UART Bridge VCP Drivers - Silicon Labs The CP210x USB to UART Bridge Virtual COM Port (VCP) drivers are required for device operation as a Virtual COM Port to facilitate host communication with ..